|
| Printing PDF with different Orientation Windev 19 |
| Iniciado por guest, 06,nov. 2015 14:52 - No hay respuesta |
| |
| | | |
|
| |
| Publicado el 06,noviembre 2015 - 14:52 |
Hello All,
I am trying to print a pdf that can have different Orientations. First I print a report then need to print a attached pdf.
BTW is there any way to doing this in a report without code?
This is what I am doing:
//need the doc id to print nDocId is int = EDT_Doc_ID sDocumentPath is string = gp_Docs_TempDoc(nDocId) //Get the number of pages that need to be printed NbPages is int = PDFNumberOfPages(sDocumentPath) //Temp file path to open pdf that needs printing sTempDir is string = fTempPath() sTempImage is string // Resize the image control sBitmapInfo is string = BitmapInfo(sDocumentPath) IMG_PrintCopy..Width = ExtractString(sBitmapInfo, 2,TAB) IMG_PrintCopy..Height = ExtractString(sBitmapInfo, 3,TAB) IMG_PrintCopy = sDocumentPath //Loop thru all the pages FOR i = 1 _TO_ IMG_PrintCopy..NumberPage IMG_PrintCopy..PageNumber = i sTempImage = sTempDir + ["\"] + i + "_pdf.jpg" // Save the image dSaveImagePNG(IMG_PrintCopy,sTempImage,100) // Print the image iPrintImage(sTempImage,0,0,IMG_PrintCopy..Width,IMG_PrintCopy..Height) IF i < IMG_PrintCopy..NumberPage THEN iSkipPage() END END iEndPrinting() // Delete the temporary images FOR i = 1 _TO_ IMG_PrintCopy..NumberPage sTempImage = sTempDir + ["\"] + i + "_pdf.jpg" fDelete(sTempImage) END IMG_PrintCopy = "" |
| |
| |
| | | |
|
| | | | |
| | |
|