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
PdfFontGlyphscollection. - 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
PdfPageTextSegmentscollection. - 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 - Page
Boundary Iterator - 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.
- PdfAttachments
Iterator - 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. - PdfBookmarks
Iterator - An iterator over all the PdfBookmark objects in a PdfBookmarks collection.
- PdfClip
Path - A single clip path, containing zero or more path objects.
- PdfClip
Path Iterator - An iterator over all the PdfPathSegments path objects in a PdfClipPath instance.
- PdfClip
Path Segments - 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:
- PdfDocument
Metadata Tag - A single metadata tag in a PdfDocument.
- PdfFont
- A single font used to render text in a PdfDocument.
- PdfFont
Glyph - A single font glyph in a
PdfFontGlyphscollection. - PdfFont
Glyph Path - The collection of PdfPathSegment objects inside a font glyph path.
- PdfFont
Glyphs - A collection of all the PdfFontGlyph objects in a PdfFont.
- PdfFont
Glyphs Iterator - An iterator over all the PdfFontGlyph objects in a PdfFontGlyphs collection.
- PdfFont
Token - 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.
- PdfForm
Checkbox Field - A single PdfFormField of type PdfFormFieldType::Checkbox. The form field object defines an interactive checkbox widget that can be toggled by the user.
- PdfForm
Combo BoxField - 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.
- PdfForm
Field Option - A single selectable option in a list box or check box form field widget.
- PdfForm
Field Options - A collection of all selectable options in a list box or check box form field widget.
- PdfForm
Field Options Iterator - An iterator over all the PdfFormFieldOption objects in a PdfFormFieldOptions collection.
- PdfForm
List BoxField - 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.
- PdfForm
Push Button Field - A single
PdfFormFieldof type PdfFormFieldType::PushButton. The form field object defines an interactive button widget that can be clicked or tapped by the user. - PdfForm
Radio Button Field - A single PdfFormField of type PdfFormFieldType::RadioButton. The form field object defines an interactive radio button widget that can be toggled by the user.
- PdfForm
Signature Field - 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.
- PdfForm
Text Field - 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.
- PdfForm
Unknown Field - 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, andf, 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. - PdfPage
Annotation Attachment Points - A set of all the attachment points that visually connect a
PdfPageAnnotationobject to one or morePdfPageObjectobjects on aPdfPage. - PdfPage
Annotation Attachment Points Iterator - An iterator over all the attachment points in a PdfPageAnnotationAttachmentPoints collection.
- PdfPage
Annotation Objects - The page objects contained within a single
PdfPageAnnotation. - PdfPage
Annotations - The annotations that have been added to a single
PdfPage. - PdfPage
Annotations Iterator - An iterator over all the PdfPageAnnotation objects in a PdfPageAnnotations collection.
- PdfPage
Boundaries - The page boundaries of a single PdfPage.
- PdfPage
Boundary Box - The type and bounds of a single boundary box in a PdfPage.
- PdfPage
Circle Annotation - A single PdfPageAnnotation of type PdfPageAnnotationType::Circle.
- PdfPage
Free Text Annotation - A single PdfPageAnnotation of type PdfPageAnnotationType::FreeText.
- PdfPage
Group Object - 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.
- PdfPage
Group Object Iterator - An iterator over all the PdfPageObject objects in a PdfPageGroupObject group.
- PdfPage
Highlight Annotation - A single PdfPageAnnotation of type PdfPageAnnotationType::Highlight.
- PdfPage
Image Object - A single PdfPageObject of type PdfPageObjectType::Image. The page object defines a single image, where the image data is sourced from a PdfBitmap buffer.
- PdfPage
Image Object Filter - A single image filter applied to a PdfPageImageObject.
- PdfPage
Image Object Filters - A collection of all the image filters applied to a PdfPageImageObject.
- PdfPage
Image Object Filters Iterator - An iterator over all the PdfPageImageObjectFilter objects in a PdfPageImageObjectFilters collection.
- PdfPage
InkAnnotation - A single PdfPageAnnotation of type PdfPageAnnotationType::Ink.
- PdfPage
Link Annotation - A single PdfPageAnnotation of type PdfPageAnnotationType::Link.
- PdfPage
Links - The links contained within a single
PdfPage. - PdfPage
Links Iterator - An iterator over all the PdfLink objects in a PdfPageLinksIterator collection.
- PdfPage
Objects - The page objects contained within a single PdfPage.
- PdfPage
Objects Iterator - An iterator over all the PdfPageObject objects in a page objects collection.
- PdfPage
Path Object - A single PdfPageObject of type PdfPageObjectType::Path. The page object defines a path.
- PdfPage
Path Object Segments - The collection of PdfPathSegment objects inside a path page object.
- PdfPage
Popup Annotation - A single PdfPageAnnotation of type PdfPageAnnotationType::Popup.
- PdfPage
Redacted Annotation - A single PdfPageAnnotation of type PdfPageAnnotationType::Redacted.
- PdfPage
Shading Object - A single PdfPageObject of type PdfPageObjectType::Shading.
- PdfPage
Square Annotation - A single PdfPageAnnotation of type PdfPageAnnotationType::Square.
- PdfPage
Squiggly Annotation - A single PdfPageAnnotation of type PdfPageAnnotationType::Squiggly.
- PdfPage
Stamp Annotation - A single PdfPageAnnotation of type PdfPageAnnotationType::Stamp.
- PdfPage
Strikeout Annotation - A single PdfPageAnnotation of type PdfPageAnnotationType::Strikeout.
- PdfPage
Text - A collection of all Unicode characters on a single PdfPage.
- PdfPage
Text Annotation - A single PdfPageAnnotation of type PdfPageAnnotationType::Text.
- PdfPage
Text Char - A single character in a PdfPageTextChars collection.
- PdfPage
Text Chars - A collection of nominated PdfPageTextChar characters selected from a single PdfPage.
- PdfPage
Text Chars Iterator - An iterator over all the PdfPageTextChar objects in a PdfPageTextChars collection.
- PdfPage
Text Object - A single PdfPageObject of type PdfPageObjectType::Text. The page object defines a single piece of formatted text.
- PdfPage
Text Search - Yields the results of searching for a given string within the collection of Unicode characters visible on a single PdfPage.
- PdfPage
Text Search Iterator - An iterator over all the PdfPageTextSegments search results yielded by a PdfPageTextSearch object.
- PdfPage
Text Segment - A single rectangular text segment in a
PdfPageTextSegmentscollection. - PdfPage
Text Segments - A collection of all the distinct rectangular areas of a single PdfPage occupied by spans of text that share a common text style.
- PdfPage
Text Segments Iterator - An iterator over all the PdfPageTextSegment objects in a PdfPageTextSegments collection.
- PdfPage
Underline Annotation - A single PdfPageAnnotation of type PdfPageAnnotationType::Underline.
- PdfPage
Unsupported Annotation - A single PdfPageAnnotation of any annotation type not supported by Pdfium.
- PdfPage
Unsupported Object - A single PdfPageObject of any object type not supported by Pdfium.
- PdfPage
Widget Annotation - A single PdfPageAnnotation of type PdfPageAnnotationType::Widget.
- PdfPageX
Object Form Object - 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.
- PdfPage
XfaWidget Annotation - A single PdfPageAnnotation of type PdfPageAnnotationType::XfaWidget.
- PdfPages
- The collection of PdfPage objects inside a PdfDocument.
- PdfPages
Iterator - An iterator over all the PdfPage objects in a PdfPages collection.
- PdfPath
Segment - A single PdfPathSegment in a
PdfPathSegmentscollection. - PdfPath
Segments Iterator - 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.
- PdfQuad
Points - 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.
- PdfRender
Config - 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.
- PdfSearch
Options - 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. - PdfSignatures
Iterator - 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.
- Pdfium
Custom Font Provider Request - A single custom font lookup request from Pdfium.
- Pdfium
Custom Font Provider Response - The response to a single custom font lookup request from Pdfium.
- Pdfium
Library Config
Enums§
- PdfAction
- The action associated with a clickable link or document bookmark.
- PdfAction
Type - The type of action associated with a clickable link or document bookmark.
- PdfAppearance
Mode - The type of appearance stream that should apply to a given
PdfPageAnnotationorPdfFormFieldobject. - PdfBitmap
Format - The pixel format of the rendered image data in the backing buffer of a PdfBitmap.
- PdfColor
Space - The color space of any displayable object on a PdfPage.
- PdfDestination
View Settings - The view settings that a PDF viewer should apply when displaying the target PdfPage nominated by a PdfDestination in its display window.
- PdfDocument
Metadata TagType - Valid metadata tag types in a PdfDocument.
- PdfDocument
Version - The file version of a PdfDocument.
- PdfFont
Builtin - The 14 built-in fonts provided as part of the PDF specification.
- PdfFont
Character Set - The character set of a PdfFont.
- PdfFont
Weight - The weight of a PdfFont. Typical values are 400 (normal) and 700 (bold).
- PdfForm
Field - A single interactive form field in a PdfForm.
- PdfForm
Field Type - The widget display type of a single interactive form field in a PdfForm.
- PdfForm
Type - The internal definition type of a PdfForm embedded in a PdfDocument.
- PdfPage
Annotation - A single user annotation on a PdfPage.
- PdfPage
Annotation Type - The type of a single PdfPageAnnotation, as defined in table 8.20 of the PDF Reference, version 1.7, on page 615.
- PdfPage
Annotation Variable Text Justification - The form of justification that should be used when displaying the text assigned to a PdfPageAnnotation that supports variable text.
- PdfPage
Boundary BoxType - The box type of a single boundary box in a PdfPage.
- PdfPage
Content Regeneration Strategy - Content regeneration strategies that instruct
pdfium-renderwhen, if ever, it should automatically regenerate the content of a PdfPage. - PdfPage
Mode - 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.
- PdfPage
Object - A single renderable object on a PdfPage.
- PdfPage
Object Blend Mode - The method used to combine overlapping colors when painting one PdfPageObject on top of another.
- PdfPage
Object Line Cap - The shape that should be used at the ends of open stroked paths.
- PdfPage
Object Line Join - The shape that should be used at the corners of stroked paths.
- PdfPage
Object Type - The type of a single renderable PdfPageObject.
- PdfPage
Orientation - The orientation of a PdfPage.
- PdfPage
Paper Size - The paper size of a PdfPage.
- PdfPage
Paper Standard Size - A standardized paper size.
- PdfPage
Render Rotation - A rotation transformation that should be applied to a PdfPage when it is rendered into a PdfBitmap.
- PdfPage
Text Render Mode - 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.
- PdfPath
Fill Mode - Sets the method used to determine the path region to fill.
- PdfPath
Segment Type - The type of a single PdfPathSegment.
- PdfSearch
Direction - The direction in which to search for the next result.
- PdfSecurity
Handler Revision - The revision of the standard security handler for a single PdfDocument.
- PdfSignature
Modification Detection Permission - The modification detection permission (MDP) applicable to a single digital signature
in a
PdfDocument. - Pdfium
Error - A wrapper enum for handling Pdfium errors as standard Rust
Errvalues. - Pdfium
Internal Error - 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§
- PdfAction
Common - Functionality common to all PdfAction objects, regardless of their PdfActionType.
- PdfForm
Field Common - Functionality common to all PdfFormField objects, regardless of their PdfFormFieldType.
- PdfPage
Annotation Common - Functionality common to all PdfPageAnnotation objects, regardless of their PdfPageAnnotationType.
- PdfPage
Annotation Variable Text - Text-handling functions common to all PdfPageAnnotation types that support custom text.
- PdfPage
Object Common - Functionality common to all PdfPageObject objects, regardless of their PdfPageObjectType.
- PdfPage
Objects Common - Functionality common to all containers of multiple PdfPageObject objects. Both pages and annotations can contain page objects.
- PdfPath
Segments - The collection of PdfPathSegment objects inside a path page object, a font glyph path, or a clip path.
- Pdfium
Custom Font Provider - At trait that responds to a single custom font lookup request from Pdfium.
- Pdfium
Library Bindings - 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.
- Pdfium
Library Bindings Accessor - ToPdf
Font Token - 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_
Charset Font Map - 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.
- PdfAttachment
Index - The zero-based index of a single attachment inside its containing PdfAttachments collection.
- PdfClip
Path Segment Index - The zero-based index of a single PdfClipPathSegments path object inside its containing PdfClipPath instance.
- PdfFont
Glyph Index - The zero-based index of a single PdfFontGlyph inside its containing PdfFontGlyphs collection.
- PdfForm
Field Option Index - The zero-based index of a single PdfFormFieldOption inside its PdfFormFieldOptions collection.
- PdfMatrix
Value - The floating-point data type used internally by a PdfMatrix.
- PdfPage
Annotation Attachment Point Index - The zero-based index of a single attachment point inside its containing PdfPageAnnotationAttachmentPoints collection.
- PdfPage
Annotation Index - The zero-based index of a single PdfPageAnnotation inside its containing PdfPageAnnotations collection.
- PdfPage
Image Object Filter Index - The zero-based index of a single PdfPageImageObjectFilter inside its containing PdfPageImageObjectFilters collection.
- PdfPage
Index - The zero-based index of a single PdfPage inside its containing PdfPages collection.
- PdfPage
Link Index - The zero-based index of a single PdfLink inside its containing PdfPageLinks collection.
- PdfPage
Object Index - The zero-based index of a single PdfPageObject inside its containing PdfPageObjects collection.
- PdfPage
Text Char Index - The zero-based index of a single PdfPageTextChar inside its containing PdfPageTextChars collection.
- PdfPage
Text Segment Index - The zero-based index of a single PdfPageTextSegment inside its containing PdfPageTextSegments collection.
- PdfPath
Segment Index - The zero-based index of a single PdfPathSegment inside its containing PdfPathSegments collection.
- PdfSignature
Index - The zero-based index of a single PdfSignature inside its containing PdfSignatures collection.
- Pdfium
Custom Font Handle - The unique ID of a single custom font lookup result.
- Pixels
- The device coordinate system when rendering or displaying an image.