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
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 = ""

Antworten:

Zur Information:
MySnip.de 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.