Bug 309385 - Using PDF as a print job format
Summary: Using PDF as a print job format
Status: RESOLVED DUPLICATE of bug 286825
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 0.15.2
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-01 16:31 UTC by Artyom Aleksyuk
Modified: 2017-08-11 23:25 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Artyom Aleksyuk 2012-11-01 16:31:14 UTC
Modern versions of CUPS are using PDF as a standart print job format (http://www.linuxfoundation.org/collaborate/workgroups/openprinting/pdfasstandardprintjobformat), but Okular still converts all PDFs to PostScript before printing. This step is useless, furthermore, it requires some time and may break things like transparency, which are not supported in PostScript, so Okular should print PDFs directly, without any conversion.

Reproducible: Always




I'm using cups version 1.6.1.
Comment 1 Albert Astals Cid 2012-11-01 16:41:34 UTC
Right. Problem is we support more stuff than cups and checking what "lpr" command is the one you are using is kind of impossible since it does not have any kind of -h or -v that will tell you which lpr you are using (i.e. cups vs non cups, old cups vs new cups, etc) So to be honest i would not hold my breath in getting someone to work on this
Comment 2 Artyom Aleksyuk 2012-11-01 18:17:15 UTC
(In reply to comment #1)
> Right. Problem is we support more stuff than cups and checking what "lpr"
> command is the one you are using is kind of impossible since it does not
> have any kind of -h or -v that will tell you which lpr you are using (i.e.
> cups vs non cups, old cups vs new cups, etc) So to be honest i would not
> hold my breath in getting someone to work on this

I tried to find how this issue was resolved in other projects. Looks like all (GTK, Qt, Mozilla, LibreOffice) are detecting if current version of CUPS is 1.2 or newer (this is a minimal version for direct PDF printing). In Qt, this is done in src/gui/painting/qprinter.cpp:650
if (QCUPSSupport::cupsVersion() >= 10200 && QCUPSSupport().currentPPD()) {
        setOutputFormat(QPrinter::PdfFormat);
        d->outputFormat = QPrinter::NativeFormat;
    }
cupsVersion is declared in src/gui/painting/qcups_p.h:75
static int cupsVersion() { return isAvailable() ? CUPS_VERSION_MAJOR*10000+CUPS_VERSION_MINOR*100+CUPS_VERSION_PATCH : 0; }
So, it simply uses values from cups.h.

Anyway, do you know any programs which can be used to print PDF directly? lpr is too complex in case custom print settings are used.
Comment 3 Artyom Aleksyuk 2012-11-01 18:51:09 UTC
Sorry, I din't understood your comment properly :) What about something like --with-cups compilation option?
Comment 4 Albert Astals Cid 2012-11-01 23:35:29 UTC
If you want to work on that a "Convert PDF to PS when printing" compilation option that defaults to true might be a solution, yes
Comment 5 Albert Astals Cid 2017-08-11 23:25:10 UTC

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