pdfium_dart library

Dart FFI bindings for PDFium library.

This package provides low-level FFI bindings to the PDFium C API. It is intended to be used by higher-level packages that provide a more user-friendly API for working with PDF documents.

Classes

fpdf_action_t__
fpdf_annotation_t__
fpdf_attachment_t__
fpdf_avail_t__
fpdf_bitmap_t__
fpdf_bookmark_t__
FPDF_BSTR_
Structure for persisting a string beyond the duration of a callback. Note: although represented as a char*, string may be interpreted as a UTF-16LE formated string. Used only by XFA callbacks.
FPDF_CharsetFontMap_
Struct: FPDF_CharsetFontMap Provides the name of a font to use for a given charset value.
fpdf_clippath_t__
FPDF_COLORSCHEME_
Struct for color scheme. Each should be a 32-bit value specifying the color, in 8888 ARGB format.
fpdf_dest_t__
fpdf_document_t__
FPDF_FILEACCESS
Structure for custom file access.
FPDF_FILEHANDLER_
Structure for file reading or writing (I/O).
FPDF_FILEWRITE_
Structure for custom file write
fpdf_font_t__
fpdf_form_handle_t__
fpdf_glyphpath_t__
FPDF_IMAGEOBJ_METADATA
fpdf_javascript_action_t
FPDF_LIBRARY_CONFIG_
Process-wide options for initializing the library.
fpdf_page_t__
fpdf_pageobject_t__
fpdf_pageobjectmark_t__
fpdf_pagerange_t__
fpdf_pathsegment_t
fpdf_schhandle_t__
fpdf_signature_t__
fpdf_structelement_attr_t__
fpdf_structelement_attr_value_t__
fpdf_structelement_t__
fpdf_structtree_t__
fpdf_textpage_t__
fpdf_widget_t__
fpdf_xobject_t__
FS_POINTF_
2D Point. Coordinate system agnostic.
FS_SIZEF_
Rectangle size. Coordinate system agnostic.
PDFium
Bindings for PDFium C API
tm

Enums

FPDF_FILEIDTYPE
The file identifier entry type. See section 14.4 "File Identifiers" of the ISO 32000-1:2008 spec.
FPDF_FONT_BACKEND_TYPE
PDF font library types - Experimental. Selection of font backend library to use.
FPDF_RENDERER_TYPE
PDF renderer types - Experimental. Selection of 2D graphics library to use for rendering to FPDF_BITMAPs.
FPDF_TEXT_RENDERMODE
PDF text rendering modes
FPDFANNOT_COLORTYPE
FWL_EVENTFLAG
Key flags.
FWL_VKEYCODE
Virtual keycodes.

Constants

FLAT_NORMALDISPLAY → const int
FLAT_PRINT → const int
FLATTEN_FAIL → const int
FLATTEN_NOTHINGTODO → const int
FLATTEN_SUCCESS → const int
FORMTYPE_ACRO_FORM → const int
FORMTYPE_COUNT → const int
FORMTYPE_NONE → const int
FORMTYPE_XFA_FOREGROUND → const int
FORMTYPE_XFA_FULL → const int
FPDF_ANNOT → const int
FPDF_ANNOT_AACTION_CALCULATE → const int
FPDF_ANNOT_AACTION_FORMAT → const int
FPDF_ANNOT_AACTION_KEY_STROKE → const int
FPDF_ANNOT_AACTION_VALIDATE → const int
FPDF_ANNOT_APPEARANCEMODE_COUNT → const int
FPDF_ANNOT_APPEARANCEMODE_DOWN → const int
FPDF_ANNOT_APPEARANCEMODE_NORMAL → const int
FPDF_ANNOT_APPEARANCEMODE_ROLLOVER → const int
FPDF_ANNOT_CARET → const int
FPDF_ANNOT_CIRCLE → const int
FPDF_ANNOT_FILEATTACHMENT → const int
FPDF_ANNOT_FLAG_HIDDEN → const int
FPDF_ANNOT_FLAG_INVISIBLE → const int
FPDF_ANNOT_FLAG_LOCKED → const int
FPDF_ANNOT_FLAG_NONE → const int
FPDF_ANNOT_FLAG_NOROTATE → const int
FPDF_ANNOT_FLAG_NOVIEW → const int
FPDF_ANNOT_FLAG_NOZOOM → const int
FPDF_ANNOT_FLAG_PRINT → const int
FPDF_ANNOT_FLAG_READONLY → const int
FPDF_ANNOT_FLAG_TOGGLENOVIEW → const int
FPDF_ANNOT_FREETEXT → const int
FPDF_ANNOT_HIGHLIGHT → const int
FPDF_ANNOT_INK → const int
FPDF_ANNOT_LINE → const int
FPDF_ANNOT_MOVIE → const int
FPDF_ANNOT_POLYGON → const int
FPDF_ANNOT_POLYLINE → const int
FPDF_ANNOT_POPUP → const int
FPDF_ANNOT_PRINTERMARK → const int
FPDF_ANNOT_REDACT → const int
FPDF_ANNOT_RICHMEDIA → const int
FPDF_ANNOT_SCREEN → const int
FPDF_ANNOT_SOUND → const int
FPDF_ANNOT_SQUARE → const int
FPDF_ANNOT_SQUIGGLY → const int
FPDF_ANNOT_STAMP → const int
FPDF_ANNOT_STRIKEOUT → const int
FPDF_ANNOT_TEXT → const int
FPDF_ANNOT_THREED → const int
FPDF_ANNOT_TRAPNET → const int
FPDF_ANNOT_UNDERLINE → const int
FPDF_ANNOT_UNKNOWN → const int
FPDF_ANNOT_WATERMARK → const int
FPDF_ANNOT_WIDGET → const int
FPDF_ANNOT_XFAWIDGET → const int
FPDF_COLORSPACE_CALGRAY → const int
FPDF_COLORSPACE_CALRGB → const int
FPDF_COLORSPACE_DEVICECMYK → const int
FPDF_COLORSPACE_DEVICEGRAY → const int
FPDF_COLORSPACE_DEVICEN → const int
FPDF_COLORSPACE_DEVICERGB → const int
FPDF_COLORSPACE_ICCBASED → const int
FPDF_COLORSPACE_INDEXED → const int
FPDF_COLORSPACE_LAB → const int
FPDF_COLORSPACE_PATTERN → const int
FPDF_COLORSPACE_SEPARATION → const int
FPDF_COLORSPACE_UNKNOWN → const int
FPDF_CONSECUTIVE → const int
FPDF_CONVERT_FILL_TO_STROKE → const int
FPDF_DEBUG_INFO → const int
FPDF_ERR_FILE → const int
FPDF_ERR_FORMAT → const int
FPDF_ERR_PAGE → const int
FPDF_ERR_PASSWORD → const int
FPDF_ERR_SECURITY → const int
FPDF_ERR_SUCCESS → const int
FPDF_ERR_UNKNOWN → const int
FPDF_FILLMODE_ALTERNATE → const int
FPDF_FILLMODE_NONE → const int
FPDF_FILLMODE_WINDING → const int
FPDF_FONT_TRUETYPE → const int
FPDF_FONT_TYPE1 → const int
FPDF_FORMFIELD_CHECKBOX → const int
FPDF_FORMFIELD_COMBOBOX → const int
FPDF_FORMFIELD_COUNT → const int
FPDF_FORMFIELD_LISTBOX → const int
FPDF_FORMFIELD_PUSHBUTTON → const int
FPDF_FORMFIELD_RADIOBUTTON → const int
FPDF_FORMFIELD_SIGNATURE → const int
FPDF_FORMFIELD_TEXTFIELD → const int
FPDF_FORMFIELD_UNKNOWN → const int
FPDF_FORMFLAG_CHOICE_COMBO → const int
FPDF_FORMFLAG_CHOICE_EDIT → const int
FPDF_FORMFLAG_CHOICE_MULTI_SELECT → const int
FPDF_FORMFLAG_NOEXPORT → const int
FPDF_FORMFLAG_NONE → const int
FPDF_FORMFLAG_READONLY → const int
FPDF_FORMFLAG_REQUIRED → const int
FPDF_FORMFLAG_TEXT_MULTILINE → const int
FPDF_FORMFLAG_TEXT_PASSWORD → const int
FPDF_GRAYSCALE → const int
FPDF_INCREMENTAL → const int
FPDF_LCD_TEXT → const int
FPDF_LINECAP_BUTT → const int
FPDF_LINECAP_PROJECTING_SQUARE → const int
FPDF_LINECAP_ROUND → const int
FPDF_LINEJOIN_BEVEL → const int
FPDF_LINEJOIN_MITER → const int
FPDF_LINEJOIN_ROUND → const int
FPDF_MATCHCASE → const int
FPDF_MATCHWHOLEWORD → const int
FPDF_NO_CATCH → const int
FPDF_NO_INCREMENTAL → const int
FPDF_NO_NATIVETEXT → const int
FPDF_OBJECT_ARRAY → const int
FPDF_OBJECT_BOOLEAN → const int
FPDF_OBJECT_DICTIONARY → const int
FPDF_OBJECT_NAME → const int
FPDF_OBJECT_NULLOBJ → const int
FPDF_OBJECT_NUMBER → const int
FPDF_OBJECT_REFERENCE → const int
FPDF_OBJECT_STREAM → const int
FPDF_OBJECT_STRING → const int
FPDF_OBJECT_UNKNOWN → const int
FPDF_PAGEOBJ_FORM → const int
FPDF_PAGEOBJ_IMAGE → const int
FPDF_PAGEOBJ_PATH → const int
FPDF_PAGEOBJ_SHADING → const int
FPDF_PAGEOBJ_TEXT → const int
FPDF_PAGEOBJ_UNKNOWN → const int
FPDF_POLICY_MACHINETIME_ACCESS → const int
FPDF_PRINTING → const int
FPDF_PRINTMODE_EMF → const int
FPDF_PRINTMODE_EMF_IMAGE_MASKS → const int
FPDF_PRINTMODE_POSTSCRIPT2 → const int
FPDF_PRINTMODE_POSTSCRIPT2_PASSTHROUGH → const int
FPDF_PRINTMODE_POSTSCRIPT3 → const int
FPDF_PRINTMODE_POSTSCRIPT3_PASSTHROUGH → const int
FPDF_PRINTMODE_POSTSCRIPT3_TYPE42 → const int
FPDF_PRINTMODE_POSTSCRIPT3_TYPE42_PASSTHROUGH → const int
FPDF_PRINTMODE_TEXTONLY → const int
FPDF_REMOVE_SECURITY → const int
FPDF_REMOVE_SECURITY_DEPRECATED → const int
FPDF_RENDER_DONE → const int
FPDF_RENDER_FAILED → const int
FPDF_RENDER_FORCEHALFTONE → const int
FPDF_RENDER_LIMITEDIMAGECACHE → const int
FPDF_RENDER_NO_SMOOTHIMAGE → const int
FPDF_RENDER_NO_SMOOTHPATH → const int
FPDF_RENDER_NO_SMOOTHTEXT → const int
FPDF_RENDER_READY → const int
FPDF_RENDER_TOBECONTINUED → const int
FPDF_REVERSE_BYTE_ORDER → const int
FPDF_SEGMENT_BEZIERTO → const int
FPDF_SEGMENT_LINETO → const int
FPDF_SEGMENT_MOVETO → const int
FPDF_SEGMENT_UNKNOWN → const int
FPDF_SUBSET_NEW_FONTS → const int
FPDF_UNSP_ANNOT_3DANNOT → const int
FPDF_UNSP_ANNOT_ATTACHMENT → const int
FPDF_UNSP_ANNOT_MOVIE → const int
FPDF_UNSP_ANNOT_SCREEN_MEDIA → const int
FPDF_UNSP_ANNOT_SCREEN_RICHMEDIA → const int
FPDF_UNSP_ANNOT_SIG → const int
FPDF_UNSP_ANNOT_SOUND → const int
FPDF_UNSP_DOC_ATTACHMENT → const int
FPDF_UNSP_DOC_PORTABLECOLLECTION → const int
FPDF_UNSP_DOC_SECURITY → const int
FPDF_UNSP_DOC_SHAREDFORM_ACROBAT → const int
FPDF_UNSP_DOC_SHAREDFORM_EMAIL → const int
FPDF_UNSP_DOC_SHAREDFORM_FILESYSTEM → const int
FPDF_UNSP_DOC_SHAREDREVIEW → const int
FPDF_UNSP_DOC_XFAFORM → const int
FPDFBitmap_BGR → const int
FPDFBitmap_BGRA → const int
FPDFBitmap_BGRA_Premul → const int
FPDFBitmap_BGRx → const int
FPDFBitmap_Gray → const int
FPDFBitmap_Unknown → const int
FPDFDOC_AACTION_DP → const int
FPDFDOC_AACTION_DS → const int
FPDFDOC_AACTION_WC → const int
FPDFDOC_AACTION_WP → const int
FPDFDOC_AACTION_WS → const int
FPDFPAGE_AACTION_CLOSE → const int
FPDFPAGE_AACTION_OPEN → const int
FXCT_ARROW → const int
FXCT_HAND → const int
FXCT_HBEAM → const int
FXCT_NESW → const int
FXCT_NWSE → const int
FXCT_VBEAM → const int
FXFONT_ANSI_CHARSET → const int
FXFONT_ARABIC_CHARSET → const int
FXFONT_CHINESEBIG5_CHARSET → const int
FXFONT_CYRILLIC_CHARSET → const int
FXFONT_DEFAULT_CHARSET → const int
FXFONT_EASTERNEUROPEAN_CHARSET → const int
FXFONT_FF_FIXEDPITCH → const int
FXFONT_FF_ROMAN → const int
FXFONT_FF_SCRIPT → const int
FXFONT_FW_BOLD → const int
FXFONT_FW_NORMAL → const int
FXFONT_GB2312_CHARSET → const int
FXFONT_GREEK_CHARSET → const int
FXFONT_HANGEUL_CHARSET → const int
FXFONT_HEBREW_CHARSET → const int
FXFONT_SHIFTJIS_CHARSET → const int
FXFONT_SYMBOL_CHARSET → const int
FXFONT_THAI_CHARSET → const int
FXFONT_VIETNAMESE_CHARSET → const int
JSPLATFORM_ALERT_BUTTON_DEFAULT → const int
JSPLATFORM_ALERT_BUTTON_OK → const int
JSPLATFORM_ALERT_BUTTON_OKCANCEL → const int
JSPLATFORM_ALERT_BUTTON_YESNO → const int
JSPLATFORM_ALERT_BUTTON_YESNOCANCEL → const int
JSPLATFORM_ALERT_ICON_ASTERISK → const int
JSPLATFORM_ALERT_ICON_DEFAULT → const int
JSPLATFORM_ALERT_ICON_ERROR → const int
JSPLATFORM_ALERT_ICON_QUESTION → const int
JSPLATFORM_ALERT_ICON_STATUS → const int
JSPLATFORM_ALERT_ICON_WARNING → const int
JSPLATFORM_ALERT_RETURN_CANCEL → const int
JSPLATFORM_ALERT_RETURN_NO → const int
JSPLATFORM_ALERT_RETURN_OK → const int
JSPLATFORM_ALERT_RETURN_YES → const int
JSPLATFORM_BEEP_DEFAULT → const int
JSPLATFORM_BEEP_ERROR → const int
JSPLATFORM_BEEP_QUESTION → const int
JSPLATFORM_BEEP_STATUS → const int
JSPLATFORM_BEEP_WARNING → const int
PAGEMODE_FULLSCREEN → const int
PAGEMODE_UNKNOWN → const int
PAGEMODE_USEATTACHMENTS → const int
PAGEMODE_USENONE → const int
PAGEMODE_USEOC → const int
PAGEMODE_USEOUTLINES → const int
PAGEMODE_USETHUMBS → const int
PDF_DATA_AVAIL → const int
PDF_DATA_ERROR → const int
PDF_DATA_NOTAVAIL → const int
PDF_FORM_AVAIL → const int
PDF_FORM_ERROR → const int
PDF_FORM_NOTAVAIL → const int
PDF_FORM_NOTEXIST → const int
PDF_LINEARIZATION_UNKNOWN → const int
PDF_LINEARIZED → const int
PDF_NOT_LINEARIZED → const int
PDFACTION_EMBEDDEDGOTO → const int
PDFACTION_GOTO → const int
PDFACTION_LAUNCH → const int
PDFACTION_REMOTEGOTO → const int
PDFACTION_UNSUPPORTED → const int
PDFACTION_URI → const int
PDFDEST_VIEW_FIT → const int
PDFDEST_VIEW_FITB → const int
PDFDEST_VIEW_FITBH → const int
PDFDEST_VIEW_FITBV → const int
PDFDEST_VIEW_FITH → const int
PDFDEST_VIEW_FITR → const int
PDFDEST_VIEW_FITV → const int
PDFDEST_VIEW_UNKNOWN_MODE → const int
PDFDEST_VIEW_XYZ → const int

Functions

getPdfium({String? modulePath}) PDFium
Helper function to get PDFium instance.

Typedefs

Dart__time_t = int
DartFPDF_ANNOT_APPEARANCEMODE = int
DartFPDF_ANNOTATION_SUBTYPE = int
DartFPDF_BOOL = int
DartFPDF_DWORD = int
DartFPDF_OBJECT_TYPE = int
DartFPDF_RESULT = int
DartFPDF_WCHAR = int
DartFS_FLOAT = double
DartTimerCallbackFunction = void Function(int idEvent)
FPDF_ACTION = Pointer<fpdf_action_t__>
PDF types - use incomplete types (never completed) to force API type safety.
FPDF_ANNOT_APPEARANCEMODE = Int
FPDF_ANNOTATION = Pointer<fpdf_annotation_t__>
FPDF_ANNOTATION_SUBTYPE = Int
Annotation enums.
FPDF_ATTACHMENT = Pointer<fpdf_attachment_t__>
FPDF_AVAIL = Pointer<fpdf_avail_t__>
FPDF_BITMAP = Pointer<fpdf_bitmap_t__>
FPDF_BOOKMARK = Pointer<fpdf_bookmark_t__>
FPDF_BOOL = Int
Basic data types
FPDF_BSTR = FPDF_BSTR_
Structure for persisting a string beyond the duration of a callback. Note: although represented as a char*, string may be interpreted as a UTF-16LE formated string. Used only by XFA callbacks.
FPDF_BYTESTRING = Pointer<Char>
Public PDFium API type for byte strings.
FPDF_CharsetFontMap = FPDF_CharsetFontMap_
Struct: FPDF_CharsetFontMap Provides the name of a font to use for a given charset value.
FPDF_CLIPPATH = Pointer<fpdf_clippath_t__>
FPDF_COLORSCHEME = FPDF_COLORSCHEME_
Struct for color scheme. Each should be a 32-bit value specifying the color, in 8888 ARGB format.
FPDF_DEST = Pointer<fpdf_dest_t__>
FPDF_DOCUMENT = Pointer<fpdf_document_t__>
FPDF_DWORD = UnsignedLong
FPDF_FILEHANDLER = FPDF_FILEHANDLER_
Structure for file reading or writing (I/O).
FPDF_FILEWRITE = FPDF_FILEWRITE_
Structure for custom file write
FPDF_FONT = Pointer<fpdf_font_t__>
FPDF_FORMFILLINFO = _FPDF_FORMFILLINFO
FPDF_FORMHANDLE = Pointer<fpdf_form_handle_t__>
FPDF_GLYPHPATH = Pointer<fpdf_glyphpath_t__>
FPDF_JAVASCRIPT_ACTION = Pointer<fpdf_javascript_action_t>
FPDF_LIBRARY_CONFIG = FPDF_LIBRARY_CONFIG_
Process-wide options for initializing the library.
FPDF_OBJECT_TYPE = Int
Dictionary value types.
FPDF_PAGE = Pointer<fpdf_page_t__>
FPDF_PAGEOBJECT = Pointer<fpdf_pageobject_t__>
FPDF_PAGEOBJECTMARK = Pointer<fpdf_pageobjectmark_t__>
FPDF_PAGERANGE = Pointer<fpdf_pagerange_t__>
FPDF_PATHSEGMENT = Pointer<fpdf_pathsegment_t>
FPDF_RESULT = Int
FPDF_SCHHANDLE = Pointer<fpdf_schhandle_t__>
FPDF_SIGNATURE = Pointer<fpdf_signature_t__>
FPDF_SKIA_CANVAS = Pointer<Void>
FPDF_STRING = Pointer<Char>
For Windows programmers: In most cases it's OK to treat FPDF_WIDESTRING as a Windows unicode string, however, special care needs to be taken if you expect to process Unicode larger than 0xffff.
FPDF_STRUCTELEMENT = Pointer<fpdf_structelement_t__>
FPDF_STRUCTELEMENT_ATTR = Pointer<fpdf_structelement_attr_t__>
FPDF_STRUCTELEMENT_ATTR_VALUE = Pointer<fpdf_structelement_attr_value_t__>
FPDF_STRUCTTREE = Pointer<fpdf_structtree_t__>
FPDF_SYSFONTINFO = _FPDF_SYSFONTINFO
Interface: FPDF_SYSFONTINFO Interface for getting system font information and font mapping
FPDF_SYSTEMTIME = _FPDF_SYSTEMTIME
Declares of a struct type to the local system time.
FPDF_TEXTPAGE = Pointer<fpdf_textpage_t__>
FPDF_WCHAR = UnsignedShort
String types
FPDF_WIDESTRING = Pointer<FPDF_WCHAR>
The public PDFium API always uses UTF-16LE encoded wide strings, each character uses 2 bytes (except surrogation), with the low byte first.
FPDF_WIDGET = Pointer<fpdf_widget_t__>
FPDF_XOBJECT = Pointer<fpdf_xobject_t__>
FS_FLOAT = Float
FS_LPCPOINTF = Pointer<FS_POINTF>
Const Pointer to FS_POINTF structure.
FS_LPCRECTF = Pointer<FS_RECTF>
Const Pointer to FS_RECTF structure.
FS_LPCSIZEF = Pointer<FS_SIZEF>
Const Pointer to FS_SIZEF structure.
FS_LPPOINTF = Pointer<FS_POINTF_>
2D Point. Coordinate system agnostic.
FS_LPRECTF = Pointer<_FS_RECTF_>
Rectangle area(float) in device or page coordinate system.
FS_LPSIZEF = Pointer<FS_SIZEF_>
Rectangle size. Coordinate system agnostic.
FS_MATRIX = _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 = FS_POINTF_
FS_QUADPOINTSF = _FS_QUADPOINTSF
FS_RECTF = _FS_RECTF_
FS_SIZEF = FS_SIZEF_
FX_DOWNLOADHINTS = _FX_DOWNLOADHINTS
Download hints interface. Used to receive hints for further downloading.
FX_FILEAVAIL = _FX_FILEAVAIL
Interface for checking whether sections of the file are available.
IFSDK_PAUSE = _IFSDK_PAUSE
IFPDF_RENDERINFO interface.
IPDF_JSPLATFORM = _IPDF_JsPlatform
time_t = __time_t
TimerCallback = Pointer<NativeFunction<TimerCallbackFunction>>
Function signature for the callback function passed to the FFI_SetTimer method. Parameters: idEvent - Identifier of the timer. Return value: None.
TimerCallbackFunction = Void Function(Int idEvent)
UNSUPPORT_INFO = _UNSUPPORT_INFO
Interface for unsupported feature notifications.