Skip to main content

Module prelude

Module prelude 

Source
Expand description

A prelude for conveniently importing all public pdfium-render definitions at once.

Usage:

use pdfium_render::prelude::*;

Modules§

char
Defines the PdfPageTextChar struct, exposing functionality related to a single character in a PdfPageTextChars collection.
chars
Defines the PdfPageTextChars struct, a collection of nominated PdfPageTextChar characters selected from a single PdfPage.
common
Defines the PdfPageObjectsCommon trait, providing functionality common to all containers of multiple PdfPageObject objects.
embedded_destination
Defines the PdfActionEmbeddedDestination struct, exposing functionality related to a single action of type PdfActionType::GoToDestinationInEmbeddedDocument.
glyph
Defines the PdfFontGlyph struct, exposing functionality related to a single font glyph in a PdfFontGlyphs collection.
glyphs
Defines the PdfFontGlyphs struct, a collection of all the PdfFontGlyph objects in a PdfFont.
launch
Defines the PdfActionLaunch struct, exposing functionality related to a single action of type PdfActionType::Launch.
local_destination
Defines the PdfActionLocalDestination struct, exposing functionality related to a single action of type PdfActionType::GoToDestinationInSameDocument.
provider
Defines the PdfiumCustomFontProvider trait, used to define and configure custom font providers for a Pdfium instance to use in place of the default system font provider.
remote_destination
Defines the PdfActionRemoteDestination struct, exposing functionality related to a single action of type PdfActionType::GoToDestinationInRemoteDocument.
search
Defines the PdfPageTextSearch struct, exposing functionality related to searching the collection of Unicode characters visible in a single PdfPage.
segment
Defines the PdfPageTextSegment struct, exposing functionality related to a single rectangular text segment in a PdfPageTextSegments collection.
segments
Defines the PdfPageTextSegments struct, a collection of all the distinct rectangular areas of a single PdfPage occupied by spans of text that share a common text style.
unsupported
Defines the PdfActionUnsupported struct, exposing functionality related to a single action of type PdfActionType::Unsupported.
uri
Defines the PdfActionUri struct, exposing functionality related to a single action of type PdfActionType::Uri.
version
Defines the PdfiumApiVersion enum, the set of Pdfium API versions supported by pdfium-render.

Structs§

FPDF_FILEACCESS
Structure for custom file access.
FPDF_IMAGEOBJ_METADATA
PageBoundaryIterator
An iterator over all the PdfPageBoundaryBox objects defined for a PdfPage. Not all boxes are guaranteed to exist for all pages, but where they are defined they will be returned strictly in enclosing order from outermost to innermost: Media, Art, Bleed, Trim, Crop, Bounding.
PdfAttachment
A single attached data file embedded in a PdfDocument.
PdfAttachments
The collection of PdfAttachment objects embedded in a PdfDocument.
PdfAttachmentsIterator
An iterator over all the PdfAttachment objects in a PdfAttachments collection.
PdfBitmap
A bitmap image with a specific width and height.
PdfBookmark
A single bookmark in a PdfBookmarks collection.
PdfBookmarks
The bookmarks contained within a single PdfDocument.
PdfBookmarksIterator
An iterator over all the PdfBookmark objects in a PdfBookmarks collection.
PdfClipPath
A single clip path, containing zero or more path objects.
PdfClipPathIterator
An iterator over all the PdfPathSegments path objects in a PdfClipPath instance.
PdfClipPathSegments
The collection of PdfPathSegment objects inside a single path within a clip path.
PdfColor
A 32-bit RGB color value with an optional alpha channel.
PdfDestination
The page and region, if any, that will be the target of any behaviour that will occur when the user interacts with a link in a PDF viewer.
PdfDocument
An entry point to all the various object collections contained in a single PDF file. These collections include:
PdfDocumentMetadataTag
A single metadata tag in a PdfDocument.
PdfFont
A single font used to render text in a PdfDocument.
PdfFontGlyph
A single font glyph in a PdfFontGlyphs collection.
PdfFontGlyphPath
The collection of PdfPathSegment objects inside a font glyph path.
PdfFontGlyphs
A collection of all the PdfFontGlyph objects in a PdfFont.
PdfFontGlyphsIterator
An iterator over all the PdfFontGlyph objects in a PdfFontGlyphs collection.
PdfFontToken
A reusable token referencing a PdfFont previously added to the PdfFonts collection of a PdfDocument.
PdfFonts
A collection of all the PdfFont objects in a PdfDocument.
PdfForm
The PdfForm embedded inside a PdfDocument.
PdfFormCheckboxField
A single PdfFormField of type PdfFormFieldType::Checkbox. The form field object defines an interactive checkbox widget that can be toggled by the user.
PdfFormComboBoxField
A single PdfFormField of type PdfFormFieldType::ComboBox. The form field object defines an interactive drop-down list widget that allows the user to either select a value from a list of options or type a value into a text field.
PdfFormFieldOption
A single selectable option in a list box or check box form field widget.
PdfFormFieldOptions
A collection of all selectable options in a list box or check box form field widget.
PdfFormFieldOptionsIterator
An iterator over all the PdfFormFieldOption objects in a PdfFormFieldOptions collection.
PdfFormListBoxField
A single PdfFormField of type PdfFormFieldType::ListBox. The form field object defines an interactive drop-down list widget that allows the user to select a value from a list of options.
PdfFormPushButtonField
A single PdfFormField of type PdfFormFieldType::PushButton. The form field object defines an interactive button widget that can be clicked or tapped by the user.
PdfFormRadioButtonField
A single PdfFormField of type PdfFormFieldType::RadioButton. The form field object defines an interactive radio button widget that can be toggled by the user.
PdfFormSignatureField
A single PdfFormField of type PdfFormFieldType::Signature. The form field object defines an interactive data entry widget that allows the user to draw a signature.
PdfFormTextField
A single PdfFormField of type PdfFormFieldType::Text. The form field object defines an interactive data entry widget that allows the user to enter data by typing.
PdfFormUnknownField
A single PdfFormField of type PdfFormFieldType::Unknown.
PdfLink
A single link contained within a PdfPage, a PdfPageAnnotation, or a PdfBookmark.
PdfMatrix
Six floating-point values, labelled a, b, c, d, e, and f, that represent the six configurable elements of a nine-element 3x3 PDF transformation matrix.
PdfMetadata
A collection of all the metadata tags in a PdfDocument.
PdfPage
A single page in a PdfDocument.
PdfPageAnnotationAttachmentPoints
A set of all the attachment points that visually connect a PdfPageAnnotation object to one or more PdfPageObject objects on a PdfPage.
PdfPageAnnotationAttachmentPointsIterator
An iterator over all the attachment points in a PdfPageAnnotationAttachmentPoints collection.
PdfPageAnnotationObjects
The page objects contained within a single PdfPageAnnotation.
PdfPageAnnotations
The annotations that have been added to a single PdfPage.
PdfPageAnnotationsIterator
An iterator over all the PdfPageAnnotation objects in a PdfPageAnnotations collection.
PdfPageBoundaries
The page boundaries of a single PdfPage.
PdfPageBoundaryBox
The type and bounds of a single boundary box in a PdfPage.
PdfPageCircleAnnotation
A single PdfPageAnnotation of type PdfPageAnnotationType::Circle.
PdfPageFreeTextAnnotation
A single PdfPageAnnotation of type PdfPageAnnotationType::FreeText.
PdfPageGroupObject
A group of PdfPageObject objects contained in the same PdfPageObjects collection. The page objects contained in the group can be manipulated and transformed together as if they were a single object.
PdfPageGroupObjectIterator
An iterator over all the PdfPageObject objects in a PdfPageGroupObject group.
PdfPageHighlightAnnotation
A single PdfPageAnnotation of type PdfPageAnnotationType::Highlight.
PdfPageImageObject
A single PdfPageObject of type PdfPageObjectType::Image. The page object defines a single image, where the image data is sourced from a PdfBitmap buffer.
PdfPageImageObjectFilter
A single image filter applied to a PdfPageImageObject.
PdfPageImageObjectFilters
A collection of all the image filters applied to a PdfPageImageObject.
PdfPageImageObjectFiltersIterator
An iterator over all the PdfPageImageObjectFilter objects in a PdfPageImageObjectFilters collection.
PdfPageInkAnnotation
A single PdfPageAnnotation of type PdfPageAnnotationType::Ink.
PdfPageLinkAnnotation
A single PdfPageAnnotation of type PdfPageAnnotationType::Link.
PdfPageLinks
The links contained within a single PdfPage.
PdfPageLinksIterator
An iterator over all the PdfLink objects in a PdfPageLinksIterator collection.
PdfPageObjects
The page objects contained within a single PdfPage.
PdfPageObjectsIterator
An iterator over all the PdfPageObject objects in a page objects collection.
PdfPagePathObject
A single PdfPageObject of type PdfPageObjectType::Path. The page object defines a path.
PdfPagePathObjectSegments
The collection of PdfPathSegment objects inside a path page object.
PdfPagePopupAnnotation
A single PdfPageAnnotation of type PdfPageAnnotationType::Popup.
PdfPageRedactedAnnotation
A single PdfPageAnnotation of type PdfPageAnnotationType::Redacted.
PdfPageShadingObject
A single PdfPageObject of type PdfPageObjectType::Shading.
PdfPageSquareAnnotation
A single PdfPageAnnotation of type PdfPageAnnotationType::Square.
PdfPageSquigglyAnnotation
A single PdfPageAnnotation of type PdfPageAnnotationType::Squiggly.
PdfPageStampAnnotation
A single PdfPageAnnotation of type PdfPageAnnotationType::Stamp.
PdfPageStrikeoutAnnotation
A single PdfPageAnnotation of type PdfPageAnnotationType::Strikeout.
PdfPageText
A collection of all Unicode characters on a single PdfPage.
PdfPageTextAnnotation
A single PdfPageAnnotation of type PdfPageAnnotationType::Text.
PdfPageTextChar
A single character in a PdfPageTextChars collection.
PdfPageTextChars
A collection of nominated PdfPageTextChar characters selected from a single PdfPage.
PdfPageTextCharsIterator
An iterator over all the PdfPageTextChar objects in a PdfPageTextChars collection.
PdfPageTextObject
A single PdfPageObject of type PdfPageObjectType::Text. The page object defines a single piece of formatted text.
PdfPageTextSearch
Yields the results of searching for a given string within the collection of Unicode characters visible on a single PdfPage.
PdfPageTextSearchIterator
An iterator over all the PdfPageTextSegments search results yielded by a PdfPageTextSearch object.
PdfPageTextSegment
A single rectangular text segment in a PdfPageTextSegments collection.
PdfPageTextSegments
A collection of all the distinct rectangular areas of a single PdfPage occupied by spans of text that share a common text style.
PdfPageTextSegmentsIterator
An iterator over all the PdfPageTextSegment objects in a PdfPageTextSegments collection.
PdfPageUnderlineAnnotation
A single PdfPageAnnotation of type PdfPageAnnotationType::Underline.
PdfPageUnsupportedAnnotation
A single PdfPageAnnotation of any annotation type not supported by Pdfium.
PdfPageUnsupportedObject
A single PdfPageObject of any object type not supported by Pdfium.
PdfPageWidgetAnnotation
A single PdfPageAnnotation of type PdfPageAnnotationType::Widget.
PdfPageXObjectFormObject
A single PdfPageObject of type PdfPageObjectType::XObjectForm. The page object contains a content stream that itself may consist of multiple other page objects. When this page object is rendered, it renders all its constituent page objects, effectively serving as a template or stamping object.
PdfPageXfaWidgetAnnotation
A single PdfPageAnnotation of type PdfPageAnnotationType::XfaWidget.
PdfPages
The collection of PdfPage objects inside a PdfDocument.
PdfPagesIterator
An iterator over all the PdfPage objects in a PdfPages collection.
PdfPathSegment
A single PdfPathSegment in a PdfPathSegments collection.
PdfPathSegmentsIterator
An iterator over all the PdfPathSegment objects in a PdfPathSegments collection.
PdfPermissions
The collection of document permissions and security handler settings for a single PdfDocument.
PdfPoints
The internal coordinate system inside a PdfDocument is measured in Points, a device-independent unit equal to 1/72 inches, roughly 0.358 mm. Points are converted to pixels when a PdfPage is rendered into a PdfBitmap.
PdfQuadPoints
A set of four coordinates expressed in PdfPoints that outline the bounds of a four-sided quadrilateral. The coordinates specify the quadrilateral’s four vertices in counter-clockwise order:
PdfRect
A rectangle measured in PdfPoints.
PdfRenderConfig
Configures the scaling, rotation, and rendering settings that should be applied to a PdfPage to create a PdfBitmap for that page. PdfRenderConfig can accommodate pages of different sizes while correctly maintaining each page’s aspect ratio, automatically rotate portrait or landscape pages, generate page thumbnails, apply maximum pixel size constraints to the scaled width and height of the final rendering, highlight form fields with different colors, apply custom transforms to the page during rendering, and set internal Pdfium rendering flags.
PdfSearchOptions
Configures the search options that should be applied when creating a new PdfPageTextSearch object.
PdfSignature
A single digital signature in a PdfDocument.
PdfSignatures
The collection of PdfSignature objects inside a PdfDocument.
PdfSignaturesIterator
An iterator over all the PdfSignature objects in a PdfSignatures collection.
Pdfium
A high-level idiomatic Rust wrapper around Pdfium, the C++ PDF library used by the Google Chromium project.
PdfiumCustomFontProviderRequest
A single custom font lookup request from Pdfium.
PdfiumCustomFontProviderResponse
The response to a single custom font lookup request from Pdfium.
PdfiumLibraryConfig

Enums§

PdfAction
The action associated with a clickable link or document bookmark.
PdfActionType
The type of action associated with a clickable link or document bookmark.
PdfAppearanceMode
The type of appearance stream that should apply to a given PdfPageAnnotation or PdfFormField object.
PdfBitmapFormat
The pixel format of the rendered image data in the backing buffer of a PdfBitmap.
PdfColorSpace
The color space of any displayable object on a PdfPage.
PdfDestinationViewSettings
The view settings that a PDF viewer should apply when displaying the target PdfPage nominated by a PdfDestination in its display window.
PdfDocumentMetadataTagType
Valid metadata tag types in a PdfDocument.
PdfDocumentVersion
The file version of a PdfDocument.
PdfFontBuiltin
The 14 built-in fonts provided as part of the PDF specification.
PdfFontCharacterSet
The character set of a PdfFont.
PdfFontWeight
The weight of a PdfFont. Typical values are 400 (normal) and 700 (bold).
PdfFormField
A single interactive form field in a PdfForm.
PdfFormFieldType
The widget display type of a single interactive form field in a PdfForm.
PdfFormType
The internal definition type of a PdfForm embedded in a PdfDocument.
PdfPageAnnotation
A single user annotation on a PdfPage.
PdfPageAnnotationType
The type of a single PdfPageAnnotation, as defined in table 8.20 of the PDF Reference, version 1.7, on page 615.
PdfPageAnnotationVariableTextJustification
The form of justification that should be used when displaying the text assigned to a PdfPageAnnotation that supports variable text.
PdfPageBoundaryBoxType
The box type of a single boundary box in a PdfPage.
PdfPageContentRegenerationStrategy
Content regeneration strategies that instruct pdfium-render when, if ever, it should automatically regenerate the content of a PdfPage.
PdfPageMode
A hint to a PDF document reader (such as Adobe Acrobat) as to how the creator intended the PdfPage objects in a PdfDocument to be displayed to the viewer when the document is opened.
PdfPageObject
A single renderable object on a PdfPage.
PdfPageObjectBlendMode
The method used to combine overlapping colors when painting one PdfPageObject on top of another.
PdfPageObjectLineCap
The shape that should be used at the ends of open stroked paths.
PdfPageObjectLineJoin
The shape that should be used at the corners of stroked paths.
PdfPageObjectType
The type of a single renderable PdfPageObject.
PdfPageOrientation
The orientation of a PdfPage.
PdfPagePaperSize
The paper size of a PdfPage.
PdfPagePaperStandardSize
A standardized paper size.
PdfPageRenderRotation
A rotation transformation that should be applied to a PdfPage when it is rendered into a PdfBitmap.
PdfPageTextRenderMode
The text rendering modes supported by the PDF standard, as listed in table 5.3 on page 402 in the PDF Reference manual version 1.7.
PdfPathFillMode
Sets the method used to determine the path region to fill.
PdfPathSegmentType
The type of a single PdfPathSegment.
PdfSearchDirection
The direction in which to search for the next result.
PdfSecurityHandlerRevision
The revision of the standard security handler for a single PdfDocument.
PdfSignatureModificationDetectionPermission
The modification detection permission (MDP) applicable to a single digital signature in a PdfDocument.
PdfiumError
A wrapper enum for handling Pdfium errors as standard Rust Err values.
PdfiumInternalError
A wrapped internal library error from Pdfium’s FPDF_ERR_* constant values.

Constants§

FPDF_PAGEOBJ_FORM
FPDF_PAGEOBJ_IMAGE
FPDF_PAGEOBJ_PATH
FPDF_PAGEOBJ_SHADING
FPDF_PAGEOBJ_TEXT
FPDF_PAGEOBJ_UNKNOWN

Traits§

PdfActionCommon
Functionality common to all PdfAction objects, regardless of their PdfActionType.
PdfFormFieldCommon
Functionality common to all PdfFormField objects, regardless of their PdfFormFieldType.
PdfPageAnnotationCommon
Functionality common to all PdfPageAnnotation objects, regardless of their PdfPageAnnotationType.
PdfPageAnnotationVariableText
Text-handling functions common to all PdfPageAnnotation types that support custom text.
PdfPageObjectCommon
Functionality common to all PdfPageObject objects, regardless of their PdfPageObjectType.
PdfPageObjectsCommon
Functionality common to all containers of multiple PdfPageObject objects. Both pages and annotations can contain page objects.
PdfPathSegments
The collection of PdfPathSegment objects inside a path page object, a font glyph path, or a clip path.
PdfiumCustomFontProvider
At trait that responds to a single custom font lookup request from Pdfium.
PdfiumLibraryBindings
Platform-independent function bindings to an external Pdfium library. On most platforms this will be an external shared library loaded dynamically at runtime, either bundled alongside your compiled Rust application or provided as a system library by the platform. On WASM, this will be a set of Javascript functions exposed by a separate WASM module that is imported into the same browser context.
PdfiumLibraryBindingsAccessor
ToPdfFontToken
Allows font-handling functions to take either a PdfFont owned instance, a PdfFont reference, or a PdfFontToken.

Type Aliases§

FPDFANNOT_COLORTYPE
FPDF_ACTION
PDF types - use incomplete types (never completed) to force API type safety.
FPDF_ANNOTATION
FPDF_ANNOTATION_SUBTYPE
Annotation enums.
FPDF_ANNOT_APPEARANCEMODE
FPDF_ATTACHMENT
FPDF_AVAIL
FPDF_BITMAP
FPDF_BOOKMARK
FPDF_BOOL
Basic data types
FPDF_CLIPPATH
FPDF_COLORSCHEME
Struct for color scheme. Each should be a 32-bit value specifying the color, in 8888 ARGB format.
FPDF_CharsetFontMap
Struct: FPDF_CharsetFontMap Provides the name of a font to use for a given charset value.
FPDF_DEST
FPDF_DOCUMENT
FPDF_DUPLEXTYPE
Duplex types Duplex types
FPDF_DWORD
FPDF_FILEIDTYPE
The file identifier entry type. See section 14.4 “File Identifiers” of the ISO 32000-1:2008 spec.
FPDF_FILEWRITE
Structure for custom file write
FPDF_FONT
FPDF_FORMFILLINFO
FPDF_FORMHANDLE
FPDF_GLYPHPATH
FPDF_JAVASCRIPT_ACTION
FPDF_LIBRARY_CONFIG
Process-wide options for initializing the library.
FPDF_LINK
FPDF_OBJECT_TYPE
Dictionary value types.
FPDF_PAGE
FPDF_PAGELINK
FPDF_PAGEOBJECT
FPDF_PAGEOBJECTMARK
FPDF_PAGERANGE
FPDF_PATHSEGMENT
FPDF_SCHHANDLE
FPDF_SIGNATURE
FPDF_STRUCTELEMENT
FPDF_STRUCTELEMENT_ATTR
FPDF_STRUCTELEMENT_ATTR_VALUE
FPDF_STRUCTTREE
FPDF_SYSFONTINFO
Interface: FPDF_SYSFONTINFO Interface for getting system font information and font mapping
FPDF_TEXTPAGE
FPDF_TEXT_RENDERMODE
PDF text rendering modes
FPDF_WCHAR
String types
FPDF_WIDESTRING
The public PDFium API always uses UTF-16LE encoded wide strings, each character uses 2 bytes (except surrogation), with the low byte first.
FPDF_XOBJECT
FS_FLOAT
FS_MATRIX
Matrix for transformation, in the form [a b c d e f], equivalent to: | a b 0 | | c d 0 | | e f 1 |
FS_POINTF
2D Point. Coordinate system agnostic.
FS_QUADPOINTSF
FS_RECTF
Rectangle area(float) in device or page coordinate system.
FS_SIZEF
Rectangle size. Coordinate system agnostic.
FX_DOWNLOADHINTS
Download hints interface. Used to receive hints for further downloading.
FX_FILEAVAIL
Interface for checking whether sections of the file are available.
IFSDK_PAUSE
IFPDF_RENDERINFO interface.
PdfAttachmentIndex
The zero-based index of a single attachment inside its containing PdfAttachments collection.
PdfClipPathSegmentIndex
The zero-based index of a single PdfClipPathSegments path object inside its containing PdfClipPath instance.
PdfFontGlyphIndex
The zero-based index of a single PdfFontGlyph inside its containing PdfFontGlyphs collection.
PdfFormFieldOptionIndex
The zero-based index of a single PdfFormFieldOption inside its PdfFormFieldOptions collection.
PdfMatrixValue
The floating-point data type used internally by a PdfMatrix.
PdfPageAnnotationAttachmentPointIndex
The zero-based index of a single attachment point inside its containing PdfPageAnnotationAttachmentPoints collection.
PdfPageAnnotationIndex
The zero-based index of a single PdfPageAnnotation inside its containing PdfPageAnnotations collection.
PdfPageImageObjectFilterIndex
The zero-based index of a single PdfPageImageObjectFilter inside its containing PdfPageImageObjectFilters collection.
PdfPageIndex
The zero-based index of a single PdfPage inside its containing PdfPages collection.
PdfPageLinkIndex
The zero-based index of a single PdfLink inside its containing PdfPageLinks collection.
PdfPageObjectIndex
The zero-based index of a single PdfPageObject inside its containing PdfPageObjects collection.
PdfPageTextCharIndex
The zero-based index of a single PdfPageTextChar inside its containing PdfPageTextChars collection.
PdfPageTextSegmentIndex
The zero-based index of a single PdfPageTextSegment inside its containing PdfPageTextSegments collection.
PdfPathSegmentIndex
The zero-based index of a single PdfPathSegment inside its containing PdfPathSegments collection.
PdfSignatureIndex
The zero-based index of a single PdfSignature inside its containing PdfSignatures collection.
PdfiumCustomFontHandle
The unique ID of a single custom font lookup result.
Pixels
The device coordinate system when rendering or displaying an image.