Poppler Qt6 24.02.0
Public Types | Public Member Functions | List of all members
Poppler::PSConverter Class Reference

#include <poppler-qt6.h>

Inheritance diagram for Poppler::PSConverter:
Inheritance graph
Collaboration diagram for Poppler::PSConverter:
Collaboration graph

Public Types

enum  PSOption {
  Printing = 0x00000001 , StrictMargins = 0x00000002 , ForceRasterization = 0x00000004 , PrintToEPS = 0x00000008 ,
  HideAnnotations = 0x00000010 , ForceOverprintPreview = 0x00000020
- 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 setForceOverprintPreview (bool forceOverprintPreview)
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 () override
- Public Member Functions inherited from Poppler::BaseConverter
Error lastError () const
void setOutputDevice (QIODevice *device)
void setOutputFileName (const QString &outputFileName)
virtual ~BaseConverter ()

Detailed Description

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:

QPrinter dummy(QPrinter::PrinterResolution);
width = dummy.width();
height = dummy.height();

Member Enumeration Documentation

◆ PSOption

Options for the PS export.


The PS is generated for printing purposes.


Output EPS instead of PS.


Don't print annotations.


Force rasterized overprint preview during conversion.


Member Function Documentation

◆ convert()

bool Poppler::PSConverter::convert ( )

Does the conversion.

whether the conversion succeeded

Implements Poppler::BaseConverter.

◆ psOptions()

PSOptions Poppler::PSConverter::psOptions ( ) const

The currently set options for the PS export.

The default flags are: Printing.

◆ setBottomMargin()

void Poppler::PSConverter::setBottomMargin ( int  marginBottom)

Sets the output bottom margin.

Defaults to 0

◆ setForceOverprintPreview()

void Poppler::PSConverter::setForceOverprintPreview ( bool  forceOverprintPreview)

Defines if the page will be rasterized to an image with overprint preview enabled before printing.

Defaults to false


◆ setForceRasterize()

void Poppler::PSConverter::setForceRasterize ( bool  forceRasterize)

Defines if the page will be rasterized to an image before printing.

Defaults to false

◆ setHDPI()

void Poppler::PSConverter::setHDPI ( double  hDPI)

Sets the horizontal DPI.

Defaults to 72.0

◆ setLeftMargin()

void Poppler::PSConverter::setLeftMargin ( int  marginLeft)

Sets the output left margin.

Defaults to 0

◆ setPageConvertedCallback()

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.

◆ setPageList()

void Poppler::PSConverter::setPageList ( const QList< int > &  pageList)

Sets the list of pages to print.


◆ setPaperHeight()

void Poppler::PSConverter::setPaperHeight ( int  paperHeight)

Sets the output paper height.

Has to be set.

◆ setPaperWidth()

void Poppler::PSConverter::setPaperWidth ( int  paperWidth)

Sets the output paper width.

Has to be set.

◆ setRightMargin()

void Poppler::PSConverter::setRightMargin ( int  marginRight)

Sets the output right margin.

Defaults to 0

◆ setRotate()

void Poppler::PSConverter::setRotate ( int  rotate)

Sets the rotate.

Defaults to not rotated

◆ setStrictMargins()

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.

◆ setTitle()

void Poppler::PSConverter::setTitle ( const QString &  title)

Sets the title of the PS Document.


◆ setTopMargin()

void Poppler::PSConverter::setTopMargin ( int  marginTop)

Sets the output top margin.

Defaults to 0

◆ setVDPI()

void Poppler::PSConverter::setVDPI ( double  vDPI)

Sets the vertical DPI.

Defaults to 72.0

The documentation for this class was generated from the following file: