Poppler Qt5
0.74.0
|
#include <poppler-qt5.h>
Public Types | |
enum | PSOption { Printing = 0x00000001, StrictMargins = 0x00000002, ForceRasterization = 0x00000004, PrintToEPS = 0x00000008, HideAnnotations = 0x00000010 } |
Public Types inherited from Poppler::BaseConverter | |
enum | Error { NoError, FileLockedError, OpenOutputError, NotSupportedInputFileError } |
Public Member Functions | |
bool | convert () override |
PSOptions | psOptions () const |
void | setBottomMargin (int marginBottom) |
void | setForceRasterize (bool forceRasterize) |
void | setHDPI (double hDPI) |
void | setLeftMargin (int marginLeft) |
void | setPageConvertedCallback (void(*callback)(int page, void *payload), void *payload) |
void | setPageList (const QList< int > &pageList) |
void | setPaperHeight (int paperHeight) |
void | setPaperWidth (int paperWidth) |
void | setPSOptions (PSOptions options) |
void | setRightMargin (int marginRight) |
void | setRotate (int rotate) |
void | setStrictMargins (bool strictMargins) |
void | setTitle (const QString &title) |
void | setTopMargin (int marginTop) |
void | setVDPI (double vDPI) |
~PSConverter () | |
Public Member Functions inherited from Poppler::BaseConverter | |
Error | lastError () const |
void | setOutputDevice (QIODevice *device) |
void | setOutputFileName (const QString &outputFileName) |
virtual | ~BaseConverter () |
Converts a PDF to PS Sizes have to be in Points (1/72 inch) If you are using QPrinter you can get paper size by doing: \code
QPrinter dummy(QPrinter::PrinterResolution); dummy.setFullPage(true); dummy.setPageSize(myPageSize); width = dummy.width(); height = dummy.height();
|
overridevirtual |
PSOptions Poppler::PSConverter::psOptions | ( | ) | const |
The currently set options for the PS export.
The default flags are: Printing.
void Poppler::PSConverter::setBottomMargin | ( | int | marginBottom | ) |
Sets the output bottom margin.
Defaults to 0
void Poppler::PSConverter::setForceRasterize | ( | bool | forceRasterize | ) |
Defines if the page will be rasterized to an image before printing.
Defaults to false
void Poppler::PSConverter::setHDPI | ( | double | hDPI | ) |
Sets the horizontal DPI.
Defaults to 72.0
void Poppler::PSConverter::setLeftMargin | ( | int | marginLeft | ) |
Sets the output left margin.
Defaults to 0
void Poppler::PSConverter::setPageConvertedCallback | ( | void(*)(int page, void *payload) | callback, |
void * | payload | ||
) |
Sets a function that will be called each time a page is converted.
The payload belongs to the caller.
void Poppler::PSConverter::setPageList | ( | const QList< int > & | pageList | ) |
Sets the list of pages to print.
Mandatory.
void Poppler::PSConverter::setPaperHeight | ( | int | paperHeight | ) |
Sets the output paper height.
Has to be set.
void Poppler::PSConverter::setPaperWidth | ( | int | paperWidth | ) |
Sets the output paper width.
Has to be set.
void Poppler::PSConverter::setPSOptions | ( | PSOptions | options | ) |
Sets the options for the PS export.
void Poppler::PSConverter::setRightMargin | ( | int | marginRight | ) |
Sets the output right margin.
Defaults to 0
void Poppler::PSConverter::setRotate | ( | int | rotate | ) |
Sets the rotate.
Defaults to not rotated
void Poppler::PSConverter::setStrictMargins | ( | bool | strictMargins | ) |
Defines if margins have to be strictly followed (even if that means changing aspect ratio), or if the margins can be adapted to keep aspect ratio.
Defaults to false.
void Poppler::PSConverter::setTitle | ( | const QString & | title | ) |
Sets the title of the PS Document.
Optional
void Poppler::PSConverter::setTopMargin | ( | int | marginTop | ) |
Sets the output top margin.
Defaults to 0
void Poppler::PSConverter::setVDPI | ( | double | vDPI | ) |
Sets the vertical DPI.
Defaults to 72.0