Comment 60 for bug 998156

Revision history for this message
TJ (tj) wrote :

This also affects Evince and Gedit.

I discovered the bug whilst trying to print using Evince to a custom page size (A4 but with a 40mm left border) which I called "Sunshine Border".
Both preview and printing either fail or sometimes print using default A4 margins. I was trying to track down the cause for that inconsistency and followed a bug-trail to this report.

I compared Evince against Gedit. After selecting the custom size in the Print dialog (in my case "Sunshine Border) I found Gedit's preview will show the 40mm border, but printing fails...
... UNLESS I have previously used the CUPS printer administration to set the default page-size to 'Custom' and entered the 210x297 millimetre values.

http://localhost:631/admin/

> Printers > DESKJET-995C > Administration > Set Default Options... > Media Size = "Custom", Width=210, Height=297, Units=Millimeters > Set Default Options.

I noticed in CUPS error_log that PageSize wasn't 0x0 for me (only get that when selecting "Custom" when the size hasn't been configured in CUPS administrator):

PageSize=Custom.Custom.595.28x841.89

At first I thought this was in millimeters and is wrong, but then realised the units are points (1 PostScript point = 0.352777778 millimetres).

So, in summary:

Gedit: Can print using custom paper size as long as CUPS default custom size is also configured, and custom margins are honoured.
Evince: Can print using custom paper size as long as CUPS default custom size is also configured, but custom margins are ignored.