class QPdfDocumentRenderOptions#

The QPdfDocumentRenderOptions class holds the options to render a page from a PDF document. More

Synopsis#

Methods#

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description#

See also

QPdfDocument

class Rotation#

This enum describes the rotation of the page for rendering.

Constant

Description

QPdfDocumentRenderOptions.Rotation.None

Do not rotate (the default)

QPdfDocumentRenderOptions.Rotation.Clockwise90

Rotate 90 degrees clockwise

QPdfDocumentRenderOptions.Rotation.Clockwise180

Rotate 180 degrees

QPdfDocumentRenderOptions.Rotation.Clockwise270

Rotate 270 degrees clockwise

See also

render()

New in version 6.5.

class RenderFlag#

(inherits enum.Flag) This enum is used to describe how a page should be rendered.

Constant

Description

QPdfDocumentRenderOptions.RenderFlag.None

The default value, representing no flags.

QPdfDocumentRenderOptions.RenderFlag.Annotations

The page is rendered with annotations.

QPdfDocumentRenderOptions.RenderFlag.OptimizedForLcd

The text of the page is rendered optimized for LCD display.

QPdfDocumentRenderOptions.RenderFlag.Grayscale

The page is rendered grayscale.

QPdfDocumentRenderOptions.RenderFlag.ForceHalftone

Always use halftones for rendering if the output image is stretched.

QPdfDocumentRenderOptions.RenderFlag.TextAliased

Anti-aliasing is disabled for rendering text.

QPdfDocumentRenderOptions.RenderFlag.ImageAliased

Anti-aliasing is disabled for rendering images.

QPdfDocumentRenderOptions.RenderFlag.PathAliased

Anti-aliasing is disabled for rendering paths.

See also

render()

New in version 6.5.

__init__()#

Constructs a QPdfDocumentRenderOptions object.

__ne__(rhs)#
Parameters:

rhsQPdfDocumentRenderOptions

Return type:

bool

__eq__(rhs)#
Parameters:

rhsQPdfDocumentRenderOptions

Return type:

bool

renderFlags()#
Return type:

Combination of RenderFlag

Returns the special flags used for rendering a page from a PDF document.

See also

setRenderFlags()

rotation()#
Return type:

Rotation

Returns the rotation used for rendering a page from a PDF document.

See also

setRotation()

scaledClipRect()#
Return type:

QRect

Returns the rectangular region to be clipped from the page after having been scaled to scaledSize() .

scaledSize()#
Return type:

QSize

Returns the size of the page to be rendered, in pixels.

See also

setScaledSize()

setRenderFlags(r)#
Parameters:

r – Combination of RenderFlag

Sets the special flags used for rendering a page from a PDF document.

See also

renderFlags()

setRotation(r)#
Parameters:

rRotation

Sets the rotation used for rendering a page from a PDF document.

See also

rotation()

setScaledClipRect(r)#
Parameters:

rQRect

Sets the rectangle region (r) to be clipped from the page after having been scaled to scaledSize() .

See also

scaledClipRect()

setScaledSize(s)#
Parameters:

sQSize

Sets the size (s) of the page to be rendered, in pixels.

See also

scaledSize()