QPdfDocumentRenderOptions Class

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

Header: #include <QPdfDocumentRenderOptions>

Public Types

enum class RenderFlag { None, Annotations, OptimizedForLcd, Grayscale, ForceHalftone, …, PathAliased }
flags RenderFlags
enum class Rotation { None, Clockwise90, Clockwise180, Clockwise270 }

Public Functions

QPdfDocumentRenderOptions()
QPdfDocumentRenderOptions::RenderFlags renderFlags() const
QPdfDocumentRenderOptions::Rotation rotation() const
QRect scaledClipRect() const
QSize scaledSize() const
void setRenderFlags(QPdfDocumentRenderOptions::RenderFlags flags)
void setRotation(QPdfDocumentRenderOptions::Rotation rotation)
void setScaledClipRect(const QRect &r)
void setScaledSize(const QSize &s)

Detailed Description

See also QPdfDocument.

Member Type Documentation

enum class QPdfDocumentRenderOptions::RenderFlag
flags QPdfDocumentRenderOptions::RenderFlags

This enum is used to describe how a page should be rendered.

ConstantValueDescription
QPdfDocumentRenderOptions::RenderFlag::None0x000The default value, representing no flags.
QPdfDocumentRenderOptions::RenderFlag::Annotations0x001The page is rendered with annotations.
QPdfDocumentRenderOptions::RenderFlag::OptimizedForLcd0x002The text of the page is rendered optimized for LCD display.
QPdfDocumentRenderOptions::RenderFlag::Grayscale0x004The page is rendered grayscale.
QPdfDocumentRenderOptions::RenderFlag::ForceHalftone0x008Always use halftones for rendering if the output image is stretched.
QPdfDocumentRenderOptions::RenderFlag::TextAliased0x010Anti-aliasing is disabled for rendering text.
QPdfDocumentRenderOptions::RenderFlag::ImageAliased0x020Anti-aliasing is disabled for rendering images.
QPdfDocumentRenderOptions::RenderFlag::PathAliased0x040Anti-aliasing is disabled for rendering paths.

The RenderFlags type is a typedef for QFlags<RenderFlag>. It stores an OR combination of RenderFlag values.

See also QPdfDocument::render().

enum class QPdfDocumentRenderOptions::Rotation

This enum describes the rotation of the page for rendering.

ConstantValueDescription
QPdfDocumentRenderOptions::Rotation::None0Do not rotate (the default)
QPdfDocumentRenderOptions::Rotation::Clockwise901Rotate 90 degrees clockwise
QPdfDocumentRenderOptions::Rotation::Clockwise1802Rotate 180 degrees
QPdfDocumentRenderOptions::Rotation::Clockwise2703Rotate 270 degrees clockwise

See also QPdfDocument::render().

Member Function Documentation

[constexpr] QPdfDocumentRenderOptions::QPdfDocumentRenderOptions()

Constructs a QPdfDocumentRenderOptions object.

[constexpr] QPdfDocumentRenderOptions::RenderFlags QPdfDocumentRenderOptions::renderFlags() const

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

See also setRenderFlags().

[constexpr] QPdfDocumentRenderOptions::Rotation QPdfDocumentRenderOptions::rotation() const

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

See also setRotation().

[constexpr] QRect QPdfDocumentRenderOptions::scaledClipRect() const

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

See also setScaledClipRect().

[constexpr] QSize QPdfDocumentRenderOptions::scaledSize() const

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

See also setScaledSize().

[constexpr] void QPdfDocumentRenderOptions::setRenderFlags(QPdfDocumentRenderOptions::RenderFlags flags)

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

See also renderFlags().

[constexpr] void QPdfDocumentRenderOptions::setRotation(QPdfDocumentRenderOptions::Rotation rotation)

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

See also rotation().

[constexpr] void QPdfDocumentRenderOptions::setScaledClipRect(const QRect &r)

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

See also scaledClipRect().

[constexpr] void QPdfDocumentRenderOptions::setScaledSize(const QSize &s)

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

See also scaledSize().

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.