Unprintable area on a page

Every printer has an area that it can’t print to the edge.

So if I try to print an image at x=0 and y=0 on a document part of it gets “cut off” because that part is unprintable.

Doesn’t the size of that unprintable area vary by printer?

Is there a way to get the size of that unprintable area to know where to place an image as close
to the edge as possible???

short answer: is yes.

most printers people have in homes or print from their desktops (err Laptops) has like 1/4" margins of not printable space. Some printers that are targeted at Enterprise or Commercial environments (more $$$) have smaller margins. My printer in my office has a zero dead space on it. If you use the “advanced” driver. If you use the standard driver that comes with Win10/MacOS then it is 1/8" dead space.

so yeah it is variable based on printer and driver.

You can use the PageHeight, PageLeft, PageRight and PageTop properties of the PrinterSetup class.

OK got it.

However the code to create that page with the image is BEFORE they select the printer.

I suppose I can check the printersetup pageLeft property but that would be for the “default” printer?

And then they could select a different printer when they go to print which could mess that up?

Any suggestions on how to handle that…



Note: Through my use of the Windows OS only.

The OS queries the printer driver. See below.

Correct. The OS has to query the driver to get the necessary dimensions, info etc it has to work within. Hence install the printer driver locally to your development machine. Set it as default. Design your report as close as you can to the final output without having the necessary hardware connected.

Yes. Probably nothing you can do about that other than removing all other printers from that machines profile. Maybe prompt the user before a particular report is about to be generated.

Yes, it does. Besides, in Printer Setup, the user can often set the margins, and sometimes choose no border.

You should always make sure to present the printer setup at least once, to have the full printer resolution.