PrintDocument margins ignored
-
Hi, i am developing an app that prints on label sheets, this requires setting the data in the
OnPrintPage
from pixel 0,0. When i draw the document on theOnPrintPage
in all looks ok with a PrintPreviewControl, but when i actually print the page with a printer it start printing with a margin, how do i get the printer to print the exact same as thePrintDocument
and if the printer is not capable to print the margins then he should just ignore these pixels?! does it have with any margin settings? PageBounds? -
Hi, i am developing an app that prints on label sheets, this requires setting the data in the
OnPrintPage
from pixel 0,0. When i draw the document on theOnPrintPage
in all looks ok with a PrintPreviewControl, but when i actually print the page with a printer it start printing with a margin, how do i get the printer to print the exact same as thePrintDocument
and if the printer is not capable to print the margins then he should just ignore these pixels?! does it have with any margin settings? PageBounds?I've run into similar problems and honestly haven't found a good way around them. You see, in my case, people can change the printer selection and so my program doesn't really know what margins a printer may have, etc. The best I can tell, you can specify margins, etc, but the system doesn't enforce them automatically. At least with the lower level functions, it's up to your code to enforce the margins. My solution kludge was to compute the page margins in pixels for each device and then blank the margin rectangles after drawing and before printing each page. Don't forget that the PixelsPerInch numbers can be pretty strange for different devices. Perhaps someone else has a better solution.
CQ de W5ALT
Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software
-
I've run into similar problems and honestly haven't found a good way around them. You see, in my case, people can change the printer selection and so my program doesn't really know what margins a printer may have, etc. The best I can tell, you can specify margins, etc, but the system doesn't enforce them automatically. At least with the lower level functions, it's up to your code to enforce the margins. My solution kludge was to compute the page margins in pixels for each device and then blank the margin rectangles after drawing and before printing each page. Don't forget that the PixelsPerInch numbers can be pretty strange for different devices. Perhaps someone else has a better solution.
CQ de W5ALT
Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software
Thanks for the reply. The strange thing is that when i print to a PDF file with BullZip and from there to my printer he will ignore the margins just like i want. and if BullZip can so can we! BUT HOW?