Printing a QRP via a PDF printer results in cut-off footer, can I prevent this?

219 Views Asked by At

I am generating various invoices, shipping manifests and similar documents via QRPs from an ERP program written in TD 4.1. When my customer just prints these regularly from the program to a normal printer, they come out fine. The customer also prints them to PDF via FreePDF XP, this happens from the printing dialogue (FreePDF XP being selected as a printer). This results in part of the right side and the footer being cut off.

Format-wise, the reports are using Paper Style A4, page margins are top=0.8, bottom=0.85, left=0.95, right=1.0. The PDF printer is also set to A4, but has no margin settings available.

I'm grasping for straws here, but is there any way I can make this work from within the report or possibly programmatically, or is this purely on the printer driver side?

Oh, decreasing the width/height is not an option for these documents, sadly.

2

There are 2 best solutions below

1
On BEST ANSWER

Pity you don't use a newer version. With TD5 and newer you can create PDFs with the integrated Report Builder, so you don't need any 3rd party tool. Couple of ideas:

  • SalReportPrintToFile() and eMail the file.
  • SalPrtSetParmNum( PRT_nMarginTop, nMargin) ( i.e. adjust the margins via TD app for PDF's )
  • Have a separate .qrp for PDF's with the larger margins already preset in the qrp.
1
On
  1. Is it possible to try the output on another pdf printer as well ? If possible try the output on another pdfprinters like PDF24Creator also.
  2. If available in version version 4.1, have a look on SalReportSetPrinterSettings( ) function and its parameters. bOk = SalReportSetPrinterSettings (hWndReport, strPrinterName, nOrientation, nPaperType, nWidth, nHeight)

SalReportSetPrinterSettings function sets the printer properties at runtime. The function can be called from the message action of SAM_ReportStart message. Passing an invalid value in a parameter causes that parameter to be ignored, and the default setting will be used instead.

3.If feasible can try third party paid tools like BullZipPDFPrinter.apt that you can be intagrate with TD.