Bug 196590

Summary: [PDF 4.3beta2 regression] bad margins, printing cuts off parts of the document
Product: [Applications] okular Reporter: paolo.crosetto
Component: PDF backendAssignee: Okular developers <okular-devel>
Status: RESOLVED WORKSFORME    
Severity: normal CC: A.Fettouhi, aacid, andreas, armin.widegreen, blizzz, christiandehne, danilo.luvizotto, felix_michel, finex, ietc, kdebugs.20.orzelf, materka, michael, progger1986, sjakub, stephanolbrich
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description paolo.crosetto 2009-06-15 11:27:06 UTC
Version:           0.8.80 (using KDE 4.2.90)
OS:                Linux
Installed from:    SuSE RPMs

After upgrading to kde 4.3beta2, in OpenSuse using Factory RPMs on OpenSuse11.1, whenever I print whatever PDF the print lies partly 'out' of the paper area, i.e. margins imposed by okular on the pdf do not match with printer and prints show only part of what they should.

Note that this does not happen with kpdf from kde3 (same machine etc), nor is a kde-related problem, since both gwenview and kwrite (the only apps I tried) print correctly.

The problem appears also in the print preview, which a) takes a lot to generate (~5secs on my Intel CoreDuo T7500 laptop); b) displays content out of margins (but consistent with what will be later printed).

Reinstalling the printer driver did not work, as well as generating a new printer, as well as printing on another printer altogether. [note: they are all network printers, all of them hp LaserJet 4200dtn]

How to reproduce:
- print a file.

Final note: used to work on 4.3.beta1 and previous releases from the same repo.
Comment 1 Christian Trippe 2009-06-15 20:34:26 UTC
I have the same problem also using openSUSE packages.
Comment 2 Danilo Luvizotto 2009-06-15 23:45:59 UTC
I have this problem using the same version of Paolo, opensuse packages. Here's a image of what happen: http://picasaweb.google.com/lh/photo/Q5EV5hRXOo_HD8gyMjX-gQ?feat=directlink
Comment 3 Pino Toscano 2009-06-16 16:14:57 UTC
*** Bug 196722 has been marked as a duplicate of this bug. ***
Comment 4 Pino Toscano 2009-06-16 16:26:07 UTC
*** Bug 196060 has been marked as a duplicate of this bug. ***
Comment 5 Pino Toscano 2009-06-16 16:28:22 UTC
*** Bug 195719 has been marked as a duplicate of this bug. ***
Comment 6 FiNeX 2009-06-17 14:34:38 UTC
Reproduced in trunk too (r982970) with Qt 4.5.1
Comment 7 Konrad Materka 2009-06-17 22:56:45 UTC
I can confirm this behaviour on Kubuntu, KDE 4.2.90 (KDE 4.3 Beta2), packages from the Kubuntu Backports PPA:
deb http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu jaunty main

PDF printing works from GhostView.
Changing margins setting doesn't change anything.
Comment 8 Stephan Olbrich 2009-06-18 23:26:35 UTC
same here
(Also KDE 4.2.90 from PPA on Kubuntu jaunty)
Comment 9 Luca 2009-06-22 11:29:54 UTC
*** This bug has been confirmed by popular vote. ***
Comment 10 Armin Widegreen 2009-06-22 14:51:23 UTC
i also confirm this behaviour kubuntu kde4.2 beta2 (ppa)
Comment 11 ietc 2009-06-23 00:58:34 UTC
Confirming that Okular places the print-content too far up and right, causing part of the content content to be out of the printable area and leaving a huge empty space along the left and bottom edges regardless of what margins I set.

Also confirming that other KDE programs like KWrite, and also GIMP and Adobe Reader 9, print correctly.

As for Print Preview (which has the same output as Print to File [PDF]), it appears that the same oversized margins that Okular is using for the left and bottom edges during printing are in place, but instead of cutting off the content the same margins are being used for the opposite edges and the content is being shrunk instead.

Okular version 0.8.80
Using KDE 4.2.90 (KDE 4.3 Beta2) "release 138"
OpenSUSE 11.1
Brother HL-4070cdw
  Brother's PPD file version 1 (2007-04-18)
  WITH AND WITHOUT
     Brother's lpr driver version 1.0.2-4 (2009-04-09)
     Brother's cupswrapper driver 1.0.2-4 (2009-04-09)
Comment 12 Michael Liddle 2009-06-23 14:56:11 UTC
I too am getting this problem with opensuse factory builds on 11.0. 

I noticed that the document output by print-to-file (PDF) has a larger pages size than the original document.

Original size (from Okular File->Properties): 209.903 x 297.039 mm (i.e. A4)
Output PDF size (from Okular File->Properties): 257.175 x 373.592 mm

Hope that helps :)
Comment 13 Michael Liddle 2009-06-23 15:02:58 UTC
Additional note: print to postscript appears to exhibit the same behaviour.
Comment 14 Pino Toscano 2009-06-24 00:30:57 UTC
SVN commit 986019 by pino:

temporary restore back old behaviour, so margin people are happy but page size ones are not
CCBUG: 196590


 M  +2 -1      generator_pdf.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=986019
Comment 15 Thomas Kamps 2009-07-06 21:37:43 UTC
For me the printing problem is not fixed in RC1 (4.2.95 release 139)
Packages: openSuse factory for 11.1 (i386)
Comment 16 paolo.crosetto 2009-07-06 23:44:58 UTC
I can confirm what Thomas says. 4.2.95 release 139, but for x86_64: still not fixed in RC1.
Comment 17 Pino Toscano 2009-07-07 00:26:00 UTC
The commit that caused this regression in 4.3 beta2 was reverted as it was done.
Thus, if you have the problem in any version different than kde 4.3 beta2, your bug is NOT this one. Bug #179804 might look like a good candidate.
Comment 18 Pino Toscano 2009-08-27 12:26:08 UTC
As said in comment #17, the specific margin issue appeared in 4.3beta2 was fixed in rc1, so this bug can be closed.
Comment 19 André Fettouhi 2010-10-08 20:37:58 UTC
I still have this error on my machine running Arch Linux 64 bit with KDE 4.5.2 (KDEmod). Printing from Okular is impossible for me because everything is off center on the print-out. Acrobat reader works fine and everything else.
Comment 20 André Fettouhi 2011-08-05 14:42:23 UTC
Has anyone ever been able to fix this. I'm still having this problem with cut margins when printing with kde4 apps. Gone/gtk etc. apps print fine no matter what type of file it is.
Comment 21 Myriam Schweingruber 2011-12-27 17:21:36 UTC
And what version of Okular do you talk about exactly? We need the Okular version, not the KDE version
Comment 22 Myriam Schweingruber 2011-12-27 17:21:51 UTC
*** Bug 188112 has been marked as a duplicate of this bug. ***
Comment 23 André Fettouhi 2011-12-27 17:23:58 UTC
This is fixed in my case. The cause for me was a defect printer driver for my brother printer.
Comment 24 Thomas Capricelli 2011-12-27 17:34:25 UTC
Guys, you are merging different reports, but i'm not sure the problem is always
the same. Quick summary concerning my problem:

* it appeared long before kde 4.3beta2 (this bug 196590 speaks about a
regression, this is not my case)
* it seems the problem was in poppler, see link to upstream ticket by a
commenter different than me in my original bug report. So this would be neither
kde or qt.
* When i do 'print preview', i have no error, only when actually printing

Also, i have the problem when printing with almost anything : okular and other
tools, most of them kde, but not all. I guess all are based on poppler.. ?

With the very important exception of official 'acroread', which prints
perfectly whatever i send it. This is my current 'workaround' and has been so
for the last... 6 years....? This kinda seems to confirm that for me the
problem is not in the printer driver.

Still, i would be really interested in more details from "Comment #23 From
André Fettouhi" : which driver ? which version ? where did you get it ?
Comment 25 André Fettouhi 2011-12-27 17:45:35 UTC
I have a brother-dcp7045n printer and I'm using it on Arch Linux 64 bit. I was using it with official driver from brother

http://solutions.brother.com/linux/en_us/index.html

(version 2.0.2). With this printer driver (cups) I always had this issue with cutoff margins in KDE applications but not in gnome/gtk applications. I found a forum post on the ubuntu forums a whilw back that stated that this driver was broken and to resolve this issue one had to switch to the open driver for the brother dcp-8045D from gutenprint. I did that and now the issue with the cut-off margins is gone.
Comment 26 Albert Astals Cid 2014-05-08 09:41:43 UTC
I'm going to close this as worksforme since André got it to work. Anyway this is another of those dumping ground bugs where people go and say "me too" when it's actually not the same at all, so please if you still have a similar problem go and open a new bug and be as specific as possible of what is your issue.