QPdfDocumentRenderOptions#

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

Synopsis#

Functions#

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 PySide6.QtPdf.QPdfDocumentRenderOptions#

Constructs a QPdfDocumentRenderOptions object.

PySide6.QtPdf.QPdfDocumentRenderOptions.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.

PySide6.QtPdf.QPdfDocumentRenderOptions.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.

PySide6.QtPdf.QPdfDocumentRenderOptions.__ne__(rhs)#
Parameters:

rhsPySide6.QtPdf.QPdfDocumentRenderOptions

Return type:

bool

PySide6.QtPdf.QPdfDocumentRenderOptions.__eq__(rhs)#
Parameters:

rhsPySide6.QtPdf.QPdfDocumentRenderOptions

Return type:

bool

PySide6.QtPdf.QPdfDocumentRenderOptions.renderFlags()#
Return type:

Combination of QPdfDocumentRenderOptions.RenderFlag

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

See also

setRenderFlags()

PySide6.QtPdf.QPdfDocumentRenderOptions.rotation()#
Return type:

Rotation

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

See also

setRotation()

PySide6.QtPdf.QPdfDocumentRenderOptions.scaledClipRect()#
Return type:

PySide6.QtCore.QRect

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

PySide6.QtPdf.QPdfDocumentRenderOptions.scaledSize()#
Return type:

PySide6.QtCore.QSize

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

See also

setScaledSize()

PySide6.QtPdf.QPdfDocumentRenderOptions.setRenderFlags(r)#
Parameters:

r – Combination of QPdfDocumentRenderOptions.RenderFlag

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

See also

renderFlags()

PySide6.QtPdf.QPdfDocumentRenderOptions.setRotation(r)#
Parameters:

rRotation

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

See also

rotation()

PySide6.QtPdf.QPdfDocumentRenderOptions.setScaledClipRect(r)#
Parameters:

rPySide6.QtCore.QRect

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

See also

scaledClipRect()

PySide6.QtPdf.QPdfDocumentRenderOptions.setScaledSize(s)#
Parameters:

sPySide6.QtCore.QSize

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

See also

scaledSize()