The PrinterPageHeight() and PrinterPageWidth() commands are fine, but for pixel perfect printing more is needed:
1.) Real Paper Size (Letter or A4 etc.)
2.) DPI (could be calculated from paper size and page height/width)
3.) Margins of all 4 sides (they differ from printer to printer).
Feel free to add more functions to this list if you see a need.
Thanks
Cross-platform printer commands for pixel perfect printing
Cross-platform printer commands for pixel perfect printing
I am to provide the public with beneficial shocks.
Alfred Hitshock
-
- Enthusiast
- Posts: 542
- Joined: Tue Apr 24, 2012 5:08 pm
- Location: Ontario, Canada
Re: Cross-platform printer commands for pixel perfect printi
This has already been requested.
http://www.purebasic.fr/english/viewtop ... =3&t=35987
A simple workaround is to set up a preferences file that contains the characteristics of each printer. We've been doing this since we first started using DOS in the early 1980's. Back then it was necessary to include all the control code sequences, but with today's printers it's only necessary to include the few items that you've suggested.
However, as has been suggested in the above link, it would be nice to have commands that would allow for direct control over printer features, such as orientation and bin selection.
http://www.purebasic.fr/english/viewtop ... =3&t=35987
A simple workaround is to set up a preferences file that contains the characteristics of each printer. We've been doing this since we first started using DOS in the early 1980's. Back then it was necessary to include all the control code sequences, but with today's printers it's only necessary to include the few items that you've suggested.
However, as has been suggested in the above link, it would be nice to have commands that would allow for direct control over printer features, such as orientation and bin selection.
For ten years Caesar ruled with an iron hand, then with a wooden foot, and finally with a piece of string.
~ Spike Milligan
~ Spike Milligan