WPCubed Product Support

Printer top margin different if preview vs print

We've installed a new printer (Xerox) to replace an older Ricoh. Some of the things we print are on legal sized paper. When they're previewed and then printed using the wptools preview dialog, all works fine. If they are printed directly, the top margin is increased by about an inch. What should I be looking for in my software or printer settings?

We setup a specific printer on the PC for each type of print job so we can deviate the settings individually. My software knows the paper tray and sets that prior to printing.

#1 ♥ 0
5.4k Views 2 users read 2 min
support

"Printed directly" - how?
The preview dialog only calls the print method.

Usually the physical margins are retrieved from the printer prior to printout and subtracted from the logical margins. This is the code for this:

if not PrintPage(i, -GetDeviceCaps(Printer.Canvas.Handle,
PHYSICALOFFSETX), -GetDeviceCaps(Printer.Canvas.Handle,
PHYSICALOFFSETY), Options) then
Result := FALSE;

You can created a breakpoint to check the values.

#2 ♥ 0

Thanks for your quick reply. TWPCustomRichText.Print is how we're printing the merged document directly. The same rich text object is assigned to the preview dialog when previewing and printing.

We seem to have fixed this by changing a printer setting in the PC's control panel. When setting the paper size to Legal, there is also an item called "Other Size"/"Change Document Size", which was set to letter size. We changed that to Legal, and now the Print method honors the margins as expected.

I don't pretend to understand why it matters, but I can't argue with the result. Thanks again for your support.

#3 ♥ 0
support

I guess this has to do with how the printer handles the discrepancy of paper size. Unless wpDoNotChangePrinterDefaults was set in PrintParameter.PrintOptions WPTools will try to set the page size in Printer, this can cause a different top/left offset.

#4 ♥ 0
This category is archived. No new posts are possible.