Bug 336617

Summary: Feature request: disable fit-to-page while printing.
Product: [Applications] okular Reporter: energie.mc2
Component: printingAssignee: Okular developers <okular-devel>
Severity: wishlist CC: aacid, amyekut, auxsvr, budinero, fstboard-kde, germano.massullo, gianluca.pettinello, hohmuth, ilovekde, juergen.scholz.84, listes.rusconi, m.weghorn, marfin, nate, nortexoid, oliver.sander, robert.falkenberg, simonandric5
Priority: NOR Keywords: usability
Version: 1.6.0   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=332331
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description energie.mc2 2014-06-23 14:46:54 UTC
Newer versions of okular automatically scale down PDFs according to printer margins. I consider this a bug, since most PDFs are produced for a specific paper format. Therefore, most of them contain the margins already and I never printed a PDF that has no margin. As pointed out in https://bugs.kde.org/show_bug.cgi?id=332331 the fit-to-page is a feature and I don't want to argue about it.

I'd like to request an option to turn off the automatic page fit. For example something similar to acroread, where you have a dropdown menu for the scaling with "none" and "fit to page". Setting all four margins to 0 manually is not an option since it takes too long.

Reproducible: Always

Steps to Reproduce:
1. Open any standard PDF (e.g. a latex-output) in Okular
2. Print it
Actual Results:  
The printed document is smaller than expected (scaled down).

Expected Results:  
I expect the printed copy of an document to have the same margins as I see on the screen.
Comment 1 Albert Astals Cid 2014-07-10 21:49:16 UTC
You could also buy a printer with no unprintable areas :/
Comment 2 Christoph Feck 2014-07-11 01:16:42 UTC
I generated several hundreds PDF documents from TeX files with two pages on a single sheet, separated by a thin line. The line, unfortunately, spans the complete page, and thus now causes the pages to print in reduced size, unless I remember to visit the printer dialog and clear all margins there. Since these settings do not stick, I have to be careful not to forget this on every document I print.
Comment 3 Albert Astals Cid 2014-07-14 20:55:15 UTC
Christoph i'm not sure what you are supposed to add to this bug with that comment. Are you +1 the request? If so please vote on it. I'm not saying this does not make sense.

Or are you voting for printer settings to be remember? that's a different bug please vote on it too if you agree on it

I'm going to set this to confirmed, but i don't have time to work on a patch.
Comment 4 Christoph Feck 2014-12-02 13:34:02 UTC
*** Bug 341480 has been marked as a duplicate of this bug. ***
Comment 5 Jürgen Scholz 2015-01-30 18:25:04 UTC
I am also affected by this bug. It prevents me from printing drawings which have a scale which needs to be maintained/preserved.

Instead of that the PDF is scaled when the size of the margins is changed (by the driver or by the user in the printing dialog).

E.g.: a line on a printed page needs to be 181mm. If I print it with one printer it is 176mm and if I print it with another printer it is 181mm, probably due to the margins used by the driver.

lagerimsi pointed out that this could be solved together with another issue: https://bugs.kde.org/show_bug.cgi?id=339176#c3

Can I supply more information regarding this issue?
Comment 6 Jürgen Scholz 2015-01-30 19:14:07 UTC
I just installed and tried printing with Evince. The gnome printing dialog offers options for scaling in percent and for scaling to "fit to printable area", "shring to printable are" and "none"

With these options set to 100% and "none" the difference in size of the printed document to the digital size is below 1mm (tested on three printers using different drivers).

The issue seems to be with the presets of the printing dialog which the user can not modify.
Comment 7 Michael D 2015-06-26 08:15:18 UTC
I'm using KDE 4.14.2 and it's not fitting to page by default when printing. A document seems to print the same regardless of whether I crop out the margins. If I crop them and print in Evince with the "fit to page" setting, the text is much larger, as expected. I wish KDE's print dialog had such a feature. Is there a wishlist/bug about this?
Comment 8 Falkenberg 2017-08-20 12:33:12 UTC
+1 For an option to choose whether to fit to page or not. This "feature" of always fitting to the printable area nearly always distors my printouts, where absolute distances are important, e.g.

- templates/stencils for SIM cards for cutting them into micro or nano SIM
- printing PCBs (printed circuit boards) of electrical circuits

This renders okular totally unusable for these purposes, although okular is a very powerful pdf-viewer, which I normally prefer to use.
Comment 9 Oliver Sander 2017-12-06 19:34:04 UTC
See https://phabricator.kde.org/D7962

But please read the entire discussion before getting too excited. :-)
Comment 10 Michael Weghorn 2018-01-18 13:42:58 UTC
*** Bug 356466 has been marked as a duplicate of this bug. ***
Comment 11 Albert Astals Cid 2018-01-24 23:35:41 UTC
This should be relatively easy to do, all you need to do is add a new checkbox in the options print page of all the generators that use fileprinter to print and then with that you set QPrinter::setFullPage and then in fileprinter you check that and in FilePrinter::optionPageMargins you give cups the correct parameters.

But honestly I am *way beyond* in reviewing stuff from https://phabricator.kde.org/differential/query/qqtiK_7v34YX/ (I am not the maintainer but noone else seems to be doing reviews so I guess people still wait for he to do the reviews) so the little free hobby time i have to work on Okular I will try to spend it trying to get that list shorter by doing reviews, not longer by doing new code.
Comment 12 Michael Weghorn 2018-01-25 07:29:56 UTC
Unless anybody else does in the meantime, I'll probably have a look at this sometime next month (if I find the time).
Comment 13 Michael Weghorn 2018-03-03 05:10:53 UTC
Review request on Phabricator: https://phabricator.kde.org/D10974

@Oliver: If you see the need to adapt it to make it less pain to continue your work on implementing more print scaling options ( https://phabricator.kde.org/D7962 ), please leave a comment there.
Comment 14 Oliver Sander 2018-03-05 12:45:19 UTC
@Michael I see no need, but thank's for asking.  My work only touches the QPrinter code paths anyway.
Comment 15 Michael Weghorn 2018-07-20 15:31:55 UTC
*** Bug 396664 has been marked as a duplicate of this bug. ***
Comment 16 Michael Weghorn 2018-09-29 16:15:01 UTC
*** Bug 399198 has been marked as a duplicate of this bug. ***
Comment 17 Frank Steiner 2018-12-18 14:34:13 UTC

after reading through https://phabricator.kde.org/D7962 it looks like this feature is more or less ready. Is there a plan to release it?

Comment 18 Gianluca Pettinello 2018-12-31 18:07:14 UTC
+1 to have the possibility to set scaling options in printing. Also it would be nice if the options are already displayed when printing (follow the philosophy of less clicks).
Comment 19 Nate Graham 2018-12-31 20:59:59 UTC
Scaling options just went in a few days ago! See Bug 348172.

*** This bug has been marked as a duplicate of bug 348172 ***