Poppler Qt5  0.74.0
Public Types | Public Member Functions | List of all members
Poppler::PSConverter Class Reference

#include <poppler-qt5.h>

Inheritance diagram for Poppler::PSConverter:
Inheritance graph
[legend]
Collaboration diagram for Poppler::PSConverter:
Collaboration graph
[legend]

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 ()
 

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:
   \code

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

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

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

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: