okular
#include <fileprinter.h>
Public Types | |
enum | FileDeletePolicy { ApplicationDeletesFiles, SystemDeletesFiles } |
enum | PageSelectPolicy { ApplicationSelectsPages, SystemSelectsPages } |
Static Public Member Functions | |
static bool | cupsAvailable () |
static QList< int > | pageList (QPrinter &printer, int lastPage, int currentPage, const QList< int > &selectedPageList) |
static QList< int > | pageList (QPrinter &printer, int lastPage, const QList< int > &selectedPageList) |
static QString | pageListToPageRange (const QList< int > &pageList) |
static QString | pageRange (QPrinter &printer, int lastPage, const QList< int > &selectedPageList) |
static bool | pdf2psAvailable () |
static Generator::PrintError | printError (int c) |
static int | printFile (QPrinter &printer, const QString file, QPrinter::Orientation documentOrientation, FileDeletePolicy fileDeletePolicy=FilePrinter::ApplicationDeletesFiles, PageSelectPolicy pageSelectPolicy=FilePrinter::ApplicationSelectsPages, const QString &pageRange=QString()) |
static bool | ps2pdfAvailable () |
static QSize | psPaperSize (QPrinter &printer) |
Detailed Description
Definition at line 28 of file fileprinter.h.
Member Enumeration Documentation
Whether file(s) get deleted by the application or by the print system.
You may need to chose system deletion if your temp file clean-up deletes the file before the print system is finished with it.
Enumerator | |
---|---|
ApplicationDeletesFiles | |
SystemDeletesFiles |
Definition at line 37 of file fileprinter.h.
Whether pages to be printed are selected by the application or the print system.
If application side, then the generated file will only contain those pages selected by the user, so FilePrinter will print all the pages in the file.
If system side, then the file will contain all the pages in the document, and the print system will print the users selected print range from out of the file.
Note system side only works in CUPS, not LPR.
Enumerator | |
---|---|
ApplicationSelectsPages | |
SystemSelectsPages |
Definition at line 49 of file fileprinter.h.
Member Function Documentation
|
protected |
Definition at line 409 of file fileprinter.cpp.
|
static |
Return if CUPS Print System is available on this system.
- Returns
- Returns true if CUPS available
Definition at line 236 of file fileprinter.cpp.
|
protected |
Definition at line 486 of file fileprinter.cpp.
|
protected |
Definition at line 441 of file fileprinter.cpp.
|
protected |
Definition at line 396 of file fileprinter.cpp.
|
protected |
Definition at line 261 of file fileprinter.cpp.
|
protected |
Definition at line 252 of file fileprinter.cpp.
|
protected |
Definition at line 45 of file fileprinter.cpp.
|
protected |
Definition at line 424 of file fileprinter.cpp.
Definition at line 541 of file fileprinter.cpp.
Definition at line 582 of file fileprinter.cpp.
|
protected |
Definition at line 640 of file fileprinter.cpp.
|
protected |
Definition at line 662 of file fileprinter.cpp.
|
protected |
Definition at line 617 of file fileprinter.cpp.
|
protected |
Definition at line 519 of file fileprinter.cpp.
|
protected |
Definition at line 603 of file fileprinter.cpp.
|
protected |
Definition at line 648 of file fileprinter.cpp.
|
protected |
Definition at line 632 of file fileprinter.cpp.
|
static |
Return the list of pages selected by the user in the Print Dialog.
- Parameters
-
printer the print settings to use lastPage the last page number, needed if AllPages option is selected currentPage the current page number, needed if CurrentPage option is selected selectedPageList list of pages to use if Selection option is selected
- Returns
- Returns list of pages to print
Definition at line 150 of file fileprinter.cpp.
|
static |
Return the list of pages selected by the user in the Print Dialog.
- Parameters
-
printer the print settings to use lastPage the last page number, needed if AllPages option is selected selectedPageList list of pages to use if Selection option is selected
- Returns
- Returns list of pages to print
Definition at line 145 of file fileprinter.cpp.
convert a Page List into a Page Range
- Parameters
-
pageList list of pages to convert
- Returns
- Returns equivalent page range
Definition at line 193 of file fileprinter.cpp.
|
static |
Return the range of pages selected by the user in the Print Dialog.
- Parameters
-
printer the print settings to use lastPage the last page number, needed if AllPages option is selected selectedPageList list of pages to use if Selection option is selected
- Returns
- Returns range of pages to print
Definition at line 180 of file fileprinter.cpp.
|
protected |
Definition at line 450 of file fileprinter.cpp.
|
static |
Return if Ghostscript pdf2ps is available on this system.
- Returns
- Returns true if Ghostscript pdf2ps available
Definition at line 231 of file fileprinter.cpp.
|
protected |
Definition at line 358 of file fileprinter.cpp.
|
static |
Convert the code returned by printFile* to PrintError.
- Since
- 0.11 (KDE 4.5)
Definition at line 318 of file fileprinter.cpp.
|
static |
Print a file using the settings in QPrinter.
Only supports CUPS and LPR on *NIX. Page Range only supported in CUPS. Most settings unsupported by LPR, some settings unsupported by CUPS.
The documentOrientation parameter was added in version 0.14.
- Parameters
-
printer the print settings to use file the file to print documentOrientation the orientation stored in the document itself fileDeletePolicy if the application or system deletes the file pageSelectPolicy if the application or system selects the pages to print pageRange page range to print if SystemSlectsPages and user chooses Selection in Print Dialog
- Returns
- Returns exit code: -9 if lpr not found -8 if empty file name -7 if unable to find file -6 if invalid printer state -5 if print to file copy failed -2 if the KProcess could not be started -1 if the KProcess crashed otherwise the KProcess exit code
- Since
- 0.14 (KDE 4.8)
Definition at line 36 of file fileprinter.cpp.
|
static |
Return if Ghostscript ps2pdf is available on this system.
- Returns
- Returns true if Ghostscript ps2pdf available
Definition at line 226 of file fileprinter.cpp.
Returns the postscript standard page size.
- Returns
- Returns paper size in ps points
Definition at line 271 of file fileprinter.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:19:26 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.