[Lazarus] Printer printable width&height

Jesus Reyes A. jesusrmx at gmail.com
Fri Aug 10 11:31:04 CEST 2018

>> The top-left of the paper canvas is 0,0 and coincide with the area of  
>> the
>> whole paper. Any drawing outside of this area would be clipped. Some
>> printers also do not allow drawing outside of the working area.
> This does not correspond to my findings.
> I did many tests (using a lot of paper in the process) and found
> that (0,0) is the origin of the printable area, NOT the paper area.

Yes sorry I got confused. The origin should be the printable area.

>> About why the selectprinter demo is wrong have to check, last time I did
>> it worked fine in windows, linux at least, IIRC.
> Well, definitely not today on a HP laserjet P2015n, linux mint, 64bit,  
> GTK2.
> I can send a picture of the produced output if you want :-)

Tested again, it seems to work in my old hp laserjet 1200, the linux mint  
I have in a virtualbox was not able to connect through usb apparently due  
a driver problem in my pc, so I compiled the program saved it in a usb  
stick and boot a xubuntu live session which detected the hp 1200 printer  
without problems, ran the selectprinter app and after changed the paper  
size which defaulted to A4 (mine is Letter) it printed correctly the demo.  
I would took a picture of it but the toner is so old that its barely  
noticeable but I checked with a ruler and the measures were +- 0.5-1.0 mm,  
acceptable to me.

My guess is that your problem might be a bad PPD file for your printer,  
check the *ImageableArea values for your selected paper, the  
*PaperDimension first value minus the *ImageableArea third value should be  
the same as the the *ImageableArea first value (for symmetrical printable  
margins). You can also try another printer driver if available.

Jesus Reyes A.

More information about the Lazarus mailing list