Commit graph

47 commits

Author SHA1 Message Date
Oliver Sander 5fdbecf446 Simplify method FilePrinter::psPaperSize
The method FilePrinter::psPaperSize used to contain a long
list of hard-coded paper sizes for the different paper formats.
This patch makes the method get the same information
from QPrinter directly, which is much simpler and more
robust, too.

Note that the method is not actually used anywhere in okular,
though, so this change is purely cosmetic.

REVIEW: 130043
2017-07-05 20:37:36 +02:00
Albert Vaca c71f308252 Fixes suggested by Clazy 2016-10-29 16:33:05 +02:00
Olivier CHURLAUD 33122dd825 Uncomment printing option pdf2ps 2016-07-21 20:33:04 +02:00
Martin T. H. Sandsmark f05d42eac3 core: Fix build without implicit cast to/from ascii
See previous commits for details.
2016-07-11 22:07:57 +02:00
Krzysztof Pyrkosz 14c936ea1b Fix for CUPS printing
Okular was checking for Q_WS_X11 definition (which is not available since Qt 5) to detect CUPS, so detection always fails making CUPS parameters ignored.

REVIEW: 127036
2016-02-16 01:27:29 +01:00
Montel Laurent 466eb79615 Use QStringLiteral 2015-10-29 13:37:11 +01:00
Alex Richardson e608908961 Remove check for Qt < 4.7
Useless as we currently require at least 5.2
2015-08-19 15:14:29 +01:00
Montel Laurent c50c3d5332 kdelibs4support-- 2015-03-06 14:00:25 +01:00
Montel Laurent 08013f87d0 Port to QStandardPaths 2014-10-07 13:21:58 +02:00
Frederik Gladhorn 6c602bf0e7 Use categorized logging even more 2014-09-16 23:38:25 +02:00
Frederik Gladhorn 9d89739972 Use categorized logging 2014-09-16 23:24:36 +02:00
Frederik Gladhorn 83d3f1f6b7 Revert "Some more kDebug->qDebug"
Seems like kDebug doesn't spam the user, so this needs to use qCDebug.

This reverts commit 34fbdf8c85.
2014-09-11 02:03:46 +02:00
Frederik Gladhorn 34fbdf8c85 Some more kDebug->qDebug 2014-09-09 18:17:36 +02:00
Frederik Gladhorn 51e5589e71 Phonon fix, good bye klocalsocket 2014-08-09 21:29:06 +02:00
Frederik Gladhorn c7e003d7bc Port to QCommandLineParser 2014-08-09 13:27:12 +02:00
Frederik Gladhorn 4efd432537 Disable PostScript printing 2014-08-09 00:26:26 +02:00
Frederik Gladhorn 4f196da176 Include more kde4support 2014-08-08 23:48:20 +02:00
Frederik Gladhorn 75031eee7e Fix includes 2014-08-08 01:59:55 +02:00
Jan Kundrát 677e0660fa Remove unused arguments
REVIEW: 114958
2014-01-11 00:25:09 +01:00
Albert Astals Cid 88e4bbbbf5 Merge remote-tracking branch 'origin/KDE/4.11' into KDE/4.12 2013-12-15 23:47:27 +01:00
Albert Astals Cid 5dfffec650 Make sure string passed to -J is no more than 255 bytes
lpr refuses to print referencing http://tools.ietf.org/search/rfc2911#section-4.1.2
Unfortunately cutting at 255 bytes may mess up the end of the name, but oh well
BUGS: 326617
FIXED-IN: 4.11.5
2013-12-15 23:46:27 +01:00
Albert Astals Cid 5a1afc51e3 Pass down to lpr the printer margins
This makes automagically work the printing on printers with
hard-margins since the QPrinter dialog margins are initialized to the printer
hard-margins. If you still want the old and mostly unuseful
behaviour of not having any margin (and thus your printer not printing things on the borders) you
can always set the margins to 0 in the dialog

BUGS: 319476
FIXED-IN: 4.12.0
2013-10-29 21:25:54 +01:00
Yuri Chornoivan 3b73357d2f Fix some typos found by Krazy2 2013-06-24 13:46:16 +03:00
Albert Astals Cid 42c03e2139 Merge remote-tracking branch 'origin/KDE/4.9' 2012-10-10 23:18:56 +02:00
Albert Astals Cid 1525dea87d Fix printing contiguous selected pages with bookmarks
BUGS: 308200
FIXED-IN: 4.9.3
2012-10-10 23:17:17 +02:00
Albert Astals Cid a716b3e4e0 kill all the deprecated functions now that we've change ABI anyway 2012-09-06 19:10:03 +02:00
Albert Astals Cid d3ebf089c4 Do not rely on extension but on output format for conversion
BUGS: 277801
2011-08-11 16:17:24 +01:00
Kevin Kofler e001fbab55 Fix landscape documents getting printed in portrait format if "Landscape" is selected in the print dialog (the default).
Partly based on a patch by Falk from KDE bug #181290.

BUG: 181290
REVIEW: 101513
2011-07-28 01:41:48 +02:00
John Layt 80a04bd577 Whoops! Didn't relise we had an API/BIC guarantee on Okular. Restore previous
API and make it call the new API.

CCMAIL: kde-bindings@kde.org
CCMAIL: aacid@kde.org
CCBUG: 194586


svn path=/trunk/KDE/kdegraphics/okular/; revision=1134631
2010-06-04 19:04:05 +00:00
John Layt b30305b668 Enable Current Page option in Okular print dialog if running Qt >= 4.7
Changed exported api so cc: to bindings.
CCMAIL: kde-bindings@kde.org

CCBUG: 194586


svn path=/trunk/KDE/kdegraphics/okular/; revision=1134379
2010-06-04 08:25:25 +00:00
Luigi Toscano 2bacaf9e14 New method to get the proper PrintError from the printFile* return value
svn path=/trunk/KDE/kdegraphics/okular/; revision=1115578
2010-04-16 21:56:16 +00:00
Albert Astals Cid ce41955ab8 avoid copying a file if we can just rename it
svn path=/trunk/KDE/kdegraphics/okular/; revision=1114913
2010-04-14 21:38:40 +00:00
Glen Kaukola 122fab0eee Krazy: Check single-char QString operations for efficiency.
svn path=/trunk/KDE/kdegraphics/okular/; revision=1110335
2010-04-02 19:07:36 +00:00
John Layt 9122f0db26 Improve CUPS detection to always match Qt, including if remote CUPS server
svn path=/trunk/KDE/kdegraphics/okular/; revision=1088926
2010-02-11 22:48:06 +00:00
John Layt ed9bbddace Print correct number of copies using new Qt api
Add eror code if print to file fails

BUG: 155695

svn path=/trunk/KDE/kdegraphics/okular/; revision=1065863
2009-12-24 14:39:49 +00:00
John Layt cc45ce4a1e Fix Print to File output by using Ghostscript ps2pdf to convert ps print file
into pdf format and save that.  Only enabled in PDF, DVI, and DJVU generators
if ps2pdf is found in the path.  Ghostscript is almost always guaranteed to
be installed given many parts of the printing stack depends on it.

Note that resulting PDF or PS file will have the page size as set in the print
dialog and not the page size of the original document, i.e. if an A5 booklet
is printed but the dialog page size is set to A4 then the resulting file will
be A4 and not A5.

svn path=/trunk/KDE/kdegraphics/okular/; revision=897000
2008-12-14 23:18:52 +00:00
John Layt 2550898805 Fixes to FilePrinter for Qt 4.4:
1) detectCupsService() finally works because QTCPSocket finally works.
   Assumes Cups is on localhost:631 which is a compromise as Qt won't
   even tell us if it is using Cups, let alone where Cups is.

2) Duplex printing obeys user selected option from dialog rather than 
   just guessing.

3) If custom page margins set then respect these


svn path=/trunk/KDE/kdegraphics/okular/; revision=895905
2008-12-11 23:04:07 +00:00
Laurent Montel c2fc9836e8 Fix iterator
svn path=/trunk/KDE/kdegraphics/okular/; revision=882957
2008-11-11 18:48:40 +00:00
John Layt c262ebf0bf Read the Cups options set in the Printer Properties window and the KDE
Cups Page and Job Options tabs, and pass these on to lpr.

CCBUG: 160381

This needs to be backported to 4.0 but I don't have a checkout.

svn path=/trunk/KDE/kdegraphics/okular/; revision=817393
2008-06-05 23:06:21 +00:00
John Layt 6b4adcee27 Some distros rename the CUPS version of lpr as lpr-cups or lpr.cups .
When detecting which exe to use, check for these first.

CCBUG: 156639

This should be backported to 4.0, but I don't have a checkout of that.

svn path=/trunk/KDE/kdegraphics/okular/; revision=816881
2008-06-04 21:28:48 +00:00
Pino Toscano af4fc6bc99 no moc needed
svn path=/trunk/KDE/kdegraphics/okular/; revision=811988
2008-05-24 10:53:57 +00:00
Adriaan de Groot 872d380582 Match const in implementation to interface (why isn't it a QString &, anyway?)
svn path=/trunk/KDE/kdegraphics/okular/; revision=791625
2008-03-30 01:36:05 +00:00
Pino Toscano 1f43811f61 redirect all the debug output of core to the debug area
svn path=/trunk/KDE/kdegraphics/okular/; revision=763941
2008-01-20 16:39:21 +00:00
Pino Toscano a35532befd I feel really sorry in reverting the last commit, but we keep binary compatibility :/
svn path=/trunk/KDE/kdegraphics/okular/; revision=760476
2008-01-12 18:52:27 +00:00
Albert Astals Cid 1c6cc2484f const & is your friend
svn path=/trunk/KDE/kdegraphics/okular/; revision=760473
2008-01-12 18:36:53 +00:00
Pino Toscano bd294e1de6 move the FilePrinterPreview to the kpart (no need for it to be in the core library)
svn path=/trunk/KDE/kdegraphics/okular/; revision=744225
2007-12-03 00:17:12 +00:00
John Layt 1b1ed9451b Enable Okular printing features:
* Add FilePrinter class to enable printing via postscript files
* DJVU, PDF, and PS backends print FilePrinter
* All backends enable printing of bookmarked pages
* Print and Print Preview actions enabled/disabled depending on backends
  printing ability

Note that FilePrinter only works on *NIX platforms with Cups, lpr, or lp.



svn path=/trunk/KDE/kdegraphics/okular/; revision=741990
2007-11-26 21:43:54 +00:00