Printing PDF with different Orientation Windev 19

Startbeitrag von DW am 06.11.2015 13: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

// Print the image

IF i < IMG_PrintCopy..NumberPage THEN

// Delete the temporary images
FOR i = 1 _TO_ IMG_PrintCopy..NumberPage
sTempImage = sTempDir + ["\"] + i + "_pdf.jpg"

IMG_PrintCopy = ""


Zur Information: hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.