Poppler Qt5 25.12.90
Poppler::PSConverter Class Reference

#include <poppler-qt5.h>

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

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);
dummy.setFullPage(true);
dummy.setPageSize(myPageSize);
width = dummy.width();
height = dummy.height();
Since
0.6

Member Enumeration Documentation

◆ PSOption

Options for the PS export.

Since
0.10
Enumerator
Printing 

The PS is generated for printing purposes.

PrintToEPS 

Output EPS instead of PS.

Since
0.20
HideAnnotations 

Don't print annotations.

Since
0.20
ForceOverprintPreview 

Force rasterized overprint preview during conversion.

Since
23.09

Member Function Documentation

◆ convert()

bool Poppler::PSConverter::convert ( )
overridevirtual

Does the conversion.

Returns
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.

Since
0.10

◆ 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

Since
23.09

◆ 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(* callback )(int page, void *payload),
void * payload )

Sets a function that will be called each time a page is converted.

The payload belongs to the caller.

Since
0.16

◆ setPageList()

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

Sets the list of pages to print.

Mandatory.

◆ 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.

◆ setPSOptions()

void Poppler::PSConverter::setPSOptions ( PSOptions options)

Sets the options for the PS export.

Since
0.10

◆ 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.

Optional

◆ 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: