Paper Size
Paper size may be necessary to your printer. A couple of different settings determine the paper's kind or size.
The layout has a paper kind property, and a direct printer also has a paper size or kind defined. Paper dimensions defined in those two places influence the report generation differently.
Layout paper size determines the calculated height when rendering data.
Printer paper size determines the page size of the PDF document when it is printed from the report request page or AL-code using
Report.Print
.If the report is saved as a PDF, the layout paper size controls the size. You can save it as a PDF from the report request page or AL-code using
Report.SaveAS
.
Unit of measure
When setting the paper size, you should use the same unit of measure as the printer driver. If the printer uses metric measurements, you should, too.
Printers ignore jobs with incorrect paper size
If you do not use the same unit of measurement and the exact same paper size as your printer, your printer may discard your print job. This behavior has been seen with label printers.
Best practice
We recommend setting the exact paper size in your layout and the direct printer definition.
When setting the paper kind to Custom, it will use the values from Unit, Width, and Height.
Tip
We have seen that Word layouts saved on a MAC computer can get the layout dimensions wrong by a fraction of a millimeter. This may seem insignificant, but the label printer used failed when the job was printed.
Auto-detect paper size
In some cases, you may not know the size of the paper for the print job. This can happen if you create a print job directly from a PDF in a BLOB field. If your printer supports multiple paper sizes, you can leave it up to the printer to determine which paper and tray to use.
Auto-detection is enabled if you set the paper kind to Default, the unit to Point, and leave the height and width to 0 (zero). When direct print receives a job with these properties, it will try to read the paper size from the PDF on the job.
This will only work if your printer can select the proper tray for the used paper size.