evince shrinks pages on printer

Bug #509652 reported by Christoph Bier
40
This bug affects 7 people
Affects Status Importance Assigned to Milestone
evince (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: evince

Evince down scales the content of a page when printed i. e. margins are too wide. lpr, Adobe Reader and xpdf print pages in its correct size---whereas the last two actually invoke lpr ...

ProblemType: Bug
Architecture: i386
Date: Tue Jan 19 15:16:53 2010
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: evince 2.28.1-0ubuntu1.2
ProcEnviron:
 PATH=(custom, user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-17.54-generic
SourcePackage: evince
Uname: Linux 2.6.31-17-generic i686

Revision history for this message
Christoph Bier (christoph-bier) wrote :
Revision history for this message
madbiologist (me-again) wrote :

Could you attach a PDF showing this issue to this bug report? Does changing the Scale setting on the Page Setup tab of the print dialog have any effect on your issue? What about changing the options on the Page Handling tab of the print dialog?

Changed in evince (Ubuntu):
status: New → Incomplete
Revision history for this message
Christoph Bier (christoph-bier) wrote :

I attached a PDF and a screenshot of the Page Setup tab of the print dialog. Scaling works (e. g. 120 percent) but there's still the same offset on the left as with scale set to 100 percent. What's the Page Handling tab of the print dialog?

Revision history for this message
Christoph Bier (christoph-bier) wrote :
Revision history for this message
madbiologist (me-again) wrote :

I've just printed your document from Karmic 9.10, using the same version of Evince (evince 2.28.1-0ubuntu1.2) as you. The document looks the same on screen as it does when printed, including having the same size margins.

If your issue is visible in Evince's Print-preview, could you attach a screenshot of that? Can you also attach a screenshot of the Print-preview in Adobe Reader and/or xpdf?

The Page Handling tab of the print dialog seems to be an evince 2.29.5-0ubuntu1 thing (I was using Lucid Lynx 10.04 alpha 2 at the time).

Changed in evince (Ubuntu):
status: Incomplete → New
Revision history for this message
Christoph Bier (christoph-bier) wrote :

Print preview of Evince is attached (in front of Evince's main window)---issue is visible. AR and Xpdf don't offer a print preview. But you can print to a file from Evince and AR to see the difference. I'll attach both files.

Revision history for this message
Christoph Bier (christoph-bier) wrote :
Revision history for this message
Christoph Bier (christoph-bier) wrote :
Revision history for this message
madbiologist (me-again) wrote :

Thanks for that, although I'm a bit confused. The evince-print-preview.png image in comment 6 doesn't match the mexp-evince-scaling-Evince.ps file in comment 7, but it does match the mexp-evince-scaling-AR.ps file in comment 8. Did you get the names of the .ps files mixed up?

And just to clarify - is the issue that the right-margin should be 0/very small, with the text against the edge of the page? Is evince enlarging the right margin when printing?

Revision history for this message
madbiologist (me-again) wrote :

Actually, from counting the major grid lines, it's not the margin that has changed, but part of the page has been cut off. Did you turn on "Shrink-to-fit page" (or whatever it's called) in Adobe Reader and xpdf?

Revision history for this message
Christoph Bier (christoph-bier) wrote :

Now I'm confused, too---I can't confirm your observation. Indeed evince-print-preview.png doesn't match the mexp-evince-scaling-Evince.ps according to the right and bottom margins (I overlooked those margins). But it does not match mexp-evince-scaling-AR.ps! I didn't mix up the files ... But forget about the both PostScript files I attached, they just seem to confuse us. evince-print-preview.png shows everything: The isssue is that Evince shrinks the page by adding margins all around. The example PDF file mexp-evince-scaling.pdf has no margins at all. You can see this in the background window (Evince's main window) in evince-print-preview.png. How Evince prints this document (adding margins all around) is shown in the foreground window (Evince's Print preview window) in evince-print-preview.png.

Unfortunately AR doesn't offer a print preview and I have only a german AR installation, so it doesn't make sense to attach a screenshot of the page setup. I didn't chose any scaling option in AR (Xpdf doesn't know such thing), they are disabled by default on my machines. But strictly speaking it doesn't matter how AR or Xpdf print the file. Evince shrinks it when it's not asked for. This is true for every PDF file I printed with Evince since I upgrade to Karmic---mexp-evince-scaling.pdf is just an example I created for this bug report.

Revision history for this message
Matthaus Litteken (matthaus) wrote :

This also affects me (although I'm not sure exactly where the bug is). I'm running Document Viewer 2.28.1 on Karmic. When I print out pdfs that are set up very specifically for labels, and used to print and fit perfectly, they are now being scaled and do not fit on the page properly. I'm attaching the input.pdf file here. The scale was set to 100% in print settings and that was the only option that seemed like it would make any difference. I'll attach output.pdf (from print to pdf) in another comment. The scaling is obvious just from viewing the two one top each other. Let me know if there's anything else I should be supplying to help figure out what's going on.

Revision history for this message
Matthaus Litteken (matthaus) wrote :

And here is output.pdf, the result of printing input.pdf to a pdf file. It is scaled similarly to output to the printer.

Revision history for this message
madbiologist (me-again) wrote :

@Matthaus - I can confirm your issue on Karmic 9.10.

Uname: Linux 2.6.31-17-generic i686
Package: evince 2.28.1-0ubuntu1.2

However I don't think you are experiencing the same bug as Christoph. I think it's just a matter of the non-printable area of your printer being added to the margins of the document. I saw the same thing when I printed out Christoph's mexp-evince-scaling.pdf, but that was in addition to his main issue of part of the page being cut off.

When you say that your labels used to print and fit perfectly, are you referring to the same version of Ubuntu you are using now or a previous version? Or are you referring to a different printer? If it was a previous version of Ubuntu, which one?

If your printer supports full-bleed printing (printing right to the edge of the paper), you may be able to fix your issue by enabling this feature in the printer configuration. This will depend on whether the full-bleed option has been exposed in (supported by) the printer driver stack (cups + the .ppd file you are using).

Otherwise you may need to edit the files to have smaller margins to compensate.

Revision history for this message
madbiologist (me-again) wrote :

@Christoph - The issue shown in evince-print-preview.png is the same one as what I've just described above, and is to be expected on most printers as they are unable to print to the edge of the paper. You may be able to fix it using the suggestion I gave to Christoph.

I was more worried about mexp-evince-scaling-Evince.ps which shows the right-hand part of the page being cut off. Is that still occurring for you?

If Acrobat Reader and xpdf are printing to the edge of the paper then that is perplexing.

@Matthaus - If Acrobat Reader and xpdf are printing to the edge of the paper for Christoph then it seems that you do have the same bug as him after all.

Revision history for this message
Christoph Bier (christoph-bier) wrote :

No, my main issue is not that the right-hand part of the page is cutt off. I even can't confirm this for evince-print-preview.png ... It's the same amount of grid lines in the original PDF and the print preview (and when printed on paper): There are twelve red vertical lines (I guess what you called major grid lines) and further four green lines right to the twelvth line (counted from the left). The red line on the left is not viewable in Evince's screenshot since it matches the paper edge (nevertheless AR shows even this red line). Thus I still can't confirm your observations from #9 and #10. Please count again the grid lines.

My main issue is that Evince *shrinks* the page, or in other words it scales down the page. It's not a matter of the printer's printable area---then I would observe the same issue when printing with AR and Xpdf. AR and Xpdf are nearly printing to the edge of the paper (1.5 mm margins all around according to the printable area---Evince adds 9 mm left and top margin, 1.2 mm right margin,, 2.2 mm bottom margin). Evince's print preview doesn't know anything about the printers printable area. Even if it would it must not shrink the page! Evince must not add the non printable area/margins to the original margins. And it didn't till Karmic. Now there's something wrong with Evince that should be fixed---maybe it already is in 10.04 ...

Revision history for this message
madbiologist (me-again) wrote :

OK, I think I understand now. Thanks for your patience.

Regarding comments #9 and #10, as you said, I think it is best to forget about the .ps files, they just confuse us. I concur that there are 12 red vertical major grid lines and a further four green lines to the right of the twelfth line. It looks like the red line on the left is visible in the evince-print-preview.png screenshot however. I think it was also present when I printed the .pdf file on paper.

As you say, your main issue is that Evince shrinks the page. I understand this better now. It is perplexing that Adobe Reader and Xpdf are nearly printing to the edge of the paper (1.5 mm margins all around according to the printable area) and Evince is not. I'm not sure why Evince is adding extra margins - I agree that it should not.

The good news is that it seems to be fixed in 10.04 alpha 2 - see attached screenshot. I'm just printing a couple of test pages on paper and then I'll go to 9.10 and compare.

Revision history for this message
madbiologist (me-again) wrote :

This is the screenshot from print preview in 9.10. It looks a lot like your evince-print-preview.png

Revision history for this message
madbiologist (me-again) wrote :

The printout from Evince in 9.10 matches the print preview. There is a red vertical line on the left of the page but there are enlarged blank margins. In Lucid the print preview looks correct, but when I print onto paper I have the opposite problem. The top, left and right margins are much smaller with the remaining white space probably representing my printers non-printable area (the bottom margin is the same). However all four sides of the document have been chopped off. This could be only a problem with my Canon i965 (using the Canon BJC8200 foomatic driver). Using the "Shrink to fit printable area" on the new Page Handling tab of Evince's print dialog does not change this at all. Note that the Page Handling tab is a new feature in Evince 2.29.5-0ubuntu1 which is the version in Lucid Lynx 10.04 alpha 2, however it seems not to be working properly yet - either that or it is just a problem with my printer.

I'm going to return to 10.04 and play around with the scaling in an attempt to get an accurate printout.

Confirming your bug. Can you test with a Live CD of 10.04 alpha 2 and see if it's fixed for you? And also whether the edges are chopped off when actually printing on paper?

Changed in evince (Ubuntu):
status: New → Confirmed
Revision history for this message
madbiologist (me-again) wrote :

On 10.04: Reducing the Scale: setting on the Page Setup tab of Evince's printing dialog allows all ot the right and bottom edges of the document to be printed, at the expense of larger blank margins on the right and bottom. The left and top edges of the document are still chopped off.

Uname: Linux 2.6.32-10-generic i686
Package: evince 2.29.5-0ubuntu1

Are there any Evince gurus around who can look into this for us?

Revision history for this message
Christoph Bier (christoph-bier) wrote :

Thanks for your patience, too. I'm downloading alpha 2 and will test it tomorrow.

Revision history for this message
Matthaus Litteken (matthaus) wrote :

@madbiologist - Thanks for the followup

I was running Hardy with the default (but up to date) version of evince. That was the last time it worked (there was a different bug (in cairo in Karmic) that was masking the current problem in evince, so I didn't become aware of this problem until the cairo bug was squashed).

As for printer margins, I don't know why printing to file/pdf would take any printer margins into account. The printers are the same as when it used to work (HP 3390 and HP CM2320fxi).

The pdfs are being created with the fpdf library for php, and they are being created with margins, but I'll look into changing that if it's causing the issue.

I'm not sure if my printers support full-bleed printing, but they've definitely been able to handle printing to these margins before.

Thanks again,
Matthaus

Revision history for this message
Christoph Bier (christoph-bier) wrote :

On 10.04 alpha 2 the problem is fixed. Evince's print preview and print results are even better than expected.

Revision history for this message
madbiologist (me-again) wrote :

@Christoph - That's great news! I'm glad to hear that it's fixed in Lucid 10.04.

@Matthaus - are you also able to try the Lucid Lynx 10.04 alpha 2 LiveCD and see if your problem is fixed. If it's fixed I'll be able to change the status of this bug to Fix Committed.

Revision history for this message
Matthaus Litteken (matthaus) wrote :

@madbiologlist - I'll give it a go today or tomorrow and report back. If it does fix the issue, what are the chances of that fix/change getting into Karmic?

Revision history for this message
madbiologist (me-again) wrote :

I'm not a developer, nor a member of Ubuntu MOTU, but my guess would be that the chances of such a change making it into Karmic are almost zero.

The good news is that Lucid Lynx 10.04 alpha 3 will be out on February 25th - see https://wiki.ubuntu.com/LucidReleaseSchedule for the full release schedule.

Revision history for this message
Matthaus Litteken (matthaus) wrote :

I can confirm the issue is resolved in Lucid Alpha 2. Printing PDFs in evince (looks like lucid currently has evince 2.29.5 with cairo 0.12.2) worked fine, with no shrink. I'm just hoping that these changes make it into Karmic, because Lucid release is still 2 months away.

madbiologist (me-again)
Changed in evince (Ubuntu):
status: Confirmed → Fix Committed
madbiologist (me-again)
Changed in evince (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.