Trait pdfium_render::bindings::PdfiumLibraryBindings
source · [−]pub trait PdfiumLibraryBindings {
Show 281 methods
fn FPDF_InitLibrary(&self);
fn FPDF_DestroyLibrary(&self);
fn FPDF_GetLastError(&self) -> c_ulong;
fn FPDF_CreateNewDocument(&self) -> *mut fpdf_document_t__;
fn FPDF_LoadDocument(
&self,
file_path: &str,
password: Option<&str>
) -> *mut fpdf_document_t__;
fn FPDF_LoadMemDocument64(
&self,
data_buf: &[u8],
password: Option<&str>
) -> *mut fpdf_document_t__;
fn FPDF_LoadCustomDocument(
&self,
pFileAccess: *mut FPDF_FILEACCESS,
password: Option<&str>
) -> *mut fpdf_document_t__;
fn FPDF_SaveAsCopy(
&self,
document: *mut fpdf_document_t__,
pFileWrite: *mut FPDF_FILEWRITE_,
flags: c_ulong
) -> c_int;
fn FPDF_SaveWithVersion(
&self,
document: *mut fpdf_document_t__,
pFileWrite: *mut FPDF_FILEWRITE_,
flags: c_ulong,
fileVersion: c_int
) -> c_int;
fn FPDF_CloseDocument(&self, document: *mut fpdf_document_t__);
fn FPDF_GetFileVersion(
&self,
doc: *mut fpdf_document_t__,
fileVersion: *mut c_int
) -> c_int;
fn FPDF_GetFormType(&self, document: *mut fpdf_document_t__) -> c_int;
fn FPDF_GetMetaText(
&self,
document: *mut fpdf_document_t__,
tag: &str,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong;
fn FPDF_GetDocPermissions(&self, document: *mut fpdf_document_t__) -> c_ulong;
fn FPDF_GetSecurityHandlerRevision(
&self,
document: *mut fpdf_document_t__
) -> c_int;
fn FPDF_GetPageCount(&self, document: *mut fpdf_document_t__) -> c_int;
fn FPDF_LoadPage(
&self,
document: *mut fpdf_document_t__,
page_index: c_int
) -> *mut fpdf_page_t__;
fn FPDF_ClosePage(&self, page: *mut fpdf_page_t__);
fn FPDF_ImportPagesByIndex(
&self,
dest_doc: *mut fpdf_document_t__,
src_doc: *mut fpdf_document_t__,
page_indices: *const c_int,
length: c_ulong,
index: c_int
) -> c_int;
fn FPDF_ImportPages(
&self,
dest_doc: *mut fpdf_document_t__,
src_doc: *mut fpdf_document_t__,
pagerange: &str,
index: c_int
) -> c_int;
fn FPDF_ImportNPagesToOne(
&self,
src_doc: *mut fpdf_document_t__,
output_width: c_float,
output_height: c_float,
num_pages_on_x_axis: c_ulong,
num_pages_on_y_axis: c_ulong
) -> *mut fpdf_document_t__;
fn FPDF_GetPageWidthF(&self, page: *mut fpdf_page_t__) -> c_float;
fn FPDF_GetPageHeightF(&self, page: *mut fpdf_page_t__) -> c_float;
fn FPDF_GetPageLabel(
&self,
document: *mut fpdf_document_t__,
page_index: c_int,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong;
fn FPDFText_GetCharIndexFromTextIndex(
&self,
text_page: *mut fpdf_textpage_t__,
nTextIndex: c_int
) -> c_int;
fn FPDFText_GetTextIndexFromCharIndex(
&self,
text_page: *mut fpdf_textpage_t__,
nCharIndex: c_int
) -> c_int;
fn FPDF_GetSignatureCount(&self, document: *mut fpdf_document_t__) -> c_int;
fn FPDF_GetSignatureObject(
&self,
document: *mut fpdf_document_t__,
index: c_int
) -> *mut fpdf_signature_t__;
fn FPDFSignatureObj_GetContents(
&self,
signature: *mut fpdf_signature_t__,
buffer: *mut c_void,
length: c_ulong
) -> c_ulong;
fn FPDFSignatureObj_GetByteRange(
&self,
signature: *mut fpdf_signature_t__,
buffer: *mut c_int,
length: c_ulong
) -> c_ulong;
fn FPDFSignatureObj_GetSubFilter(
&self,
signature: *mut fpdf_signature_t__,
buffer: *mut c_char,
length: c_ulong
) -> c_ulong;
fn FPDFSignatureObj_GetReason(
&self,
signature: *mut fpdf_signature_t__,
buffer: *mut c_void,
length: c_ulong
) -> c_ulong;
fn FPDFSignatureObj_GetTime(
&self,
signature: *mut fpdf_signature_t__,
buffer: *mut c_char,
length: c_ulong
) -> c_ulong;
fn FPDFSignatureObj_GetDocMDPPermission(
&self,
signature: *mut fpdf_signature_t__
) -> c_uint;
fn FPDF_StructTree_GetForPage(
&self,
page: *mut fpdf_page_t__
) -> *mut fpdf_structtree_t__;
fn FPDF_StructTree_Close(&self, struct_tree: *mut fpdf_structtree_t__);
fn FPDF_StructTree_CountChildren(
&self,
struct_tree: *mut fpdf_structtree_t__
) -> c_int;
fn FPDF_StructTree_GetChildAtIndex(
&self,
struct_tree: *mut fpdf_structtree_t__,
index: c_int
) -> *mut fpdf_structelement_t__;
fn FPDF_StructElement_GetAltText(
&self,
struct_element: *mut fpdf_structelement_t__,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong;
fn FPDF_StructElement_GetID(
&self,
struct_element: *mut fpdf_structelement_t__,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong;
fn FPDF_StructElement_GetLang(
&self,
struct_element: *mut fpdf_structelement_t__,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong;
fn FPDF_StructElement_GetStringAttribute(
&self,
struct_element: *mut fpdf_structelement_t__,
attr_name: *const c_char,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong;
fn FPDF_StructElement_GetMarkedContentID(
&self,
struct_element: *mut fpdf_structelement_t__
) -> c_int;
fn FPDF_StructElement_GetType(
&self,
struct_element: *mut fpdf_structelement_t__,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong;
fn FPDF_StructElement_GetTitle(
&self,
struct_element: *mut fpdf_structelement_t__,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong;
fn FPDF_StructElement_CountChildren(
&self,
struct_element: *mut fpdf_structelement_t__
) -> c_int;
fn FPDF_StructElement_GetChildAtIndex(
&self,
struct_element: *mut fpdf_structelement_t__,
index: c_int
) -> *mut fpdf_structelement_t__;
fn FPDFPage_New(
&self,
document: *mut fpdf_document_t__,
page_index: c_int,
width: c_double,
height: c_double
) -> *mut fpdf_page_t__;
fn FPDFPage_Delete(&self, document: *mut fpdf_document_t__, page_index: c_int);
fn FPDFPage_GetRotation(&self, page: *mut fpdf_page_t__) -> c_int;
fn FPDFPage_SetRotation(&self, page: *mut fpdf_page_t__, rotate: c_int);
fn FPDF_GetPageBoundingBox(
&self,
page: *mut fpdf_page_t__,
rect: *mut _FS_RECTF_
) -> c_int;
fn FPDFPage_GetMediaBox(
&self,
page: *mut fpdf_page_t__,
left: *mut c_float,
bottom: *mut c_float,
right: *mut c_float,
top: *mut c_float
) -> c_int;
fn FPDFPage_GetCropBox(
&self,
page: *mut fpdf_page_t__,
left: *mut c_float,
bottom: *mut c_float,
right: *mut c_float,
top: *mut c_float
) -> c_int;
fn FPDFPage_GetBleedBox(
&self,
page: *mut fpdf_page_t__,
left: *mut c_float,
bottom: *mut c_float,
right: *mut c_float,
top: *mut c_float
) -> c_int;
fn FPDFPage_GetTrimBox(
&self,
page: *mut fpdf_page_t__,
left: *mut c_float,
bottom: *mut c_float,
right: *mut c_float,
top: *mut c_float
) -> c_int;
fn FPDFPage_GetArtBox(
&self,
page: *mut fpdf_page_t__,
left: *mut c_float,
bottom: *mut c_float,
right: *mut c_float,
top: *mut c_float
) -> c_int;
fn FPDFPage_SetMediaBox(
&self,
page: *mut fpdf_page_t__,
left: c_float,
bottom: c_float,
right: c_float,
top: c_float
);
fn FPDFPage_SetCropBox(
&self,
page: *mut fpdf_page_t__,
left: c_float,
bottom: c_float,
right: c_float,
top: c_float
);
fn FPDFPage_SetBleedBox(
&self,
page: *mut fpdf_page_t__,
left: c_float,
bottom: c_float,
right: c_float,
top: c_float
);
fn FPDFPage_SetTrimBox(
&self,
page: *mut fpdf_page_t__,
left: c_float,
bottom: c_float,
right: c_float,
top: c_float
);
fn FPDFPage_SetArtBox(
&self,
page: *mut fpdf_page_t__,
left: c_float,
bottom: c_float,
right: c_float,
top: c_float
);
fn FPDFPage_HasTransparency(&self, page: *mut fpdf_page_t__) -> c_int;
fn FPDFPage_GenerateContent(&self, page: *mut fpdf_page_t__) -> c_int;
fn FPDFBitmap_CreateEx(
&self,
width: c_int,
height: c_int,
format: c_int,
first_scan: *mut c_void,
stride: c_int
) -> *mut fpdf_bitmap_t__;
fn FPDFBitmap_Destroy(&self, bitmap: *mut fpdf_bitmap_t__);
fn FPDFBitmap_GetFormat(&self, bitmap: *mut fpdf_bitmap_t__) -> c_int;
fn FPDFBitmap_FillRect(
&self,
bitmap: *mut fpdf_bitmap_t__,
left: c_int,
top: c_int,
width: c_int,
height: c_int,
color: c_ulong
);
fn FPDFBitmap_GetBuffer(&self, bitmap: *mut fpdf_bitmap_t__) -> *mut c_void;
fn FPDFBitmap_GetWidth(&self, bitmap: *mut fpdf_bitmap_t__) -> c_int;
fn FPDFBitmap_GetHeight(&self, bitmap: *mut fpdf_bitmap_t__) -> c_int;
fn FPDFBitmap_GetStride(&self, bitmap: *mut fpdf_bitmap_t__) -> c_int;
fn FPDF_RenderPageBitmap(
&self,
bitmap: *mut fpdf_bitmap_t__,
page: *mut fpdf_page_t__,
start_x: c_int,
start_y: c_int,
size_x: c_int,
size_y: c_int,
rotate: c_int,
flags: c_int
);
fn FPDF_RenderPageBitmapWithMatrix(
&self,
bitmap: *mut fpdf_bitmap_t__,
page: *mut fpdf_page_t__,
matrix: *const _FS_MATRIX_,
clipping: *const _FS_RECTF_,
flags: c_int
);
fn FPDFAnnot_IsSupportedSubtype(&self, subtype: c_int) -> c_int;
fn FPDFPage_CreateAnnot(
&self,
page: *mut fpdf_page_t__,
subtype: c_int
) -> *mut fpdf_annotation_t__;
fn FPDFPage_GetAnnotCount(&self, page: *mut fpdf_page_t__) -> c_int;
fn FPDFPage_GetAnnot(
&self,
page: *mut fpdf_page_t__,
index: c_int
) -> *mut fpdf_annotation_t__;
fn FPDFPage_GetAnnotIndex(
&self,
page: *mut fpdf_page_t__,
annot: *mut fpdf_annotation_t__
) -> c_int;
fn FPDFPage_CloseAnnot(&self, annot: *mut fpdf_annotation_t__);
fn FPDFPage_RemoveAnnot(
&self,
page: *mut fpdf_page_t__,
index: c_int
) -> c_int;
fn FPDFAnnot_GetSubtype(&self, annot: *mut fpdf_annotation_t__) -> c_int;
fn FPDFAnnot_IsObjectSupportedSubtype(&self, subtype: c_int) -> c_int;
fn FPDFAnnot_UpdateObject(
&self,
annot: *mut fpdf_annotation_t__,
obj: *mut fpdf_pageobject_t__
) -> c_int;
fn FPDFAnnot_AddInkStroke(
&self,
annot: *mut fpdf_annotation_t__,
points: *const FS_POINTF_,
point_count: c_ulong
) -> c_int;
fn FPDFAnnot_RemoveInkList(&self, annot: *mut fpdf_annotation_t__) -> c_int;
fn FPDFAnnot_AppendObject(
&self,
annot: *mut fpdf_annotation_t__,
obj: *mut fpdf_pageobject_t__
) -> c_int;
fn FPDFAnnot_GetObjectCount(&self, annot: *mut fpdf_annotation_t__) -> c_int;
fn FPDFAnnot_GetObject(
&self,
annot: *mut fpdf_annotation_t__,
index: c_int
) -> *mut fpdf_pageobject_t__;
fn FPDFAnnot_RemoveObject(
&self,
annot: *mut fpdf_annotation_t__,
index: c_int
) -> c_int;
fn FPDFAnnot_SetColor(
&self,
annot: *mut fpdf_annotation_t__,
color_type: c_uint,
R: c_uint,
G: c_uint,
B: c_uint,
A: c_uint
) -> c_int;
fn FPDFAnnot_GetColor(
&self,
annot: *mut fpdf_annotation_t__,
color_type: c_uint,
R: *mut c_uint,
G: *mut c_uint,
B: *mut c_uint,
A: *mut c_uint
) -> c_int;
fn FPDFAnnot_HasAttachmentPoints(
&self,
annot: *mut fpdf_annotation_t__
) -> c_int;
fn FPDFAnnot_SetAttachmentPoints(
&self,
annot: *mut fpdf_annotation_t__,
quad_index: c_ulong,
quad_points: *const _FS_QUADPOINTSF
) -> c_int;
fn FPDFAnnot_AppendAttachmentPoints(
&self,
annot: *mut fpdf_annotation_t__,
quad_points: *const _FS_QUADPOINTSF
) -> c_int;
fn FPDFAnnot_CountAttachmentPoints(
&self,
annot: *mut fpdf_annotation_t__
) -> c_ulong;
fn FPDFAnnot_GetAttachmentPoints(
&self,
annot: *mut fpdf_annotation_t__,
quad_index: c_ulong,
quad_points: *mut _FS_QUADPOINTSF
) -> c_int;
fn FPDFAnnot_SetRect(
&self,
annot: *mut fpdf_annotation_t__,
rect: *const _FS_RECTF_
) -> c_int;
fn FPDFAnnot_GetRect(
&self,
annot: *mut fpdf_annotation_t__,
rect: *mut _FS_RECTF_
) -> c_int;
fn FPDFAnnot_GetVertices(
&self,
annot: *mut fpdf_annotation_t__,
buffer: *mut FS_POINTF_,
length: c_ulong
) -> c_ulong;
fn FPDFAnnot_GetInkListCount(
&self,
annot: *mut fpdf_annotation_t__
) -> c_ulong;
fn FPDFAnnot_GetInkListPath(
&self,
annot: *mut fpdf_annotation_t__,
path_index: c_ulong,
buffer: *mut FS_POINTF_,
length: c_ulong
) -> c_ulong;
fn FPDFAnnot_GetLine(
&self,
annot: *mut fpdf_annotation_t__,
start: *mut FS_POINTF_,
end: *mut FS_POINTF_
) -> c_int;
fn FPDFAnnot_SetBorder(
&self,
annot: *mut fpdf_annotation_t__,
horizontal_radius: c_float,
vertical_radius: c_float,
border_width: c_float
) -> c_int;
fn FPDFAnnot_GetBorder(
&self,
annot: *mut fpdf_annotation_t__,
horizontal_radius: *mut c_float,
vertical_radius: *mut c_float,
border_width: *mut c_float
) -> c_int;
fn FPDFAnnot_HasKey(
&self,
annot: *mut fpdf_annotation_t__,
key: &str
) -> c_int;
fn FPDFAnnot_GetValueType(
&self,
annot: *mut fpdf_annotation_t__,
key: &str
) -> c_int;
fn FPDFAnnot_SetStringValue(
&self,
annot: *mut fpdf_annotation_t__,
key: &str,
value: *const c_ushort
) -> c_int;
fn FPDFAnnot_GetStringValue(
&self,
annot: *mut fpdf_annotation_t__,
key: &str,
buffer: *mut c_ushort,
buflen: c_ulong
) -> c_ulong;
fn FPDFAnnot_GetNumberValue(
&self,
annot: *mut fpdf_annotation_t__,
key: &str,
value: *mut c_float
) -> c_int;
fn FPDFAnnot_SetAP(
&self,
annot: *mut fpdf_annotation_t__,
appearanceMode: c_int,
value: *const c_ushort
) -> c_int;
fn FPDFAnnot_GetAP(
&self,
annot: *mut fpdf_annotation_t__,
appearanceMode: c_int,
buffer: *mut c_ushort,
buflen: c_ulong
) -> c_ulong;
fn FPDFAnnot_GetLinkedAnnot(
&self,
annot: *mut fpdf_annotation_t__,
key: &str
) -> *mut fpdf_annotation_t__;
fn FPDFAnnot_GetFlags(&self, annot: *mut fpdf_annotation_t__) -> c_int;
fn FPDFAnnot_SetFlags(
&self,
annot: *mut fpdf_annotation_t__,
flags: c_int
) -> c_int;
fn FPDFAnnot_GetFormFieldFlags(
&self,
handle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__
) -> c_int;
fn FPDFAnnot_GetFormFieldAtPoint(
&self,
hHandle: *mut fpdf_form_handle_t__,
page: *mut fpdf_page_t__,
point: *const FS_POINTF_
) -> *mut fpdf_annotation_t__;
fn FPDFAnnot_GetFormFieldName(
&self,
hHandle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__,
buffer: *mut c_ushort,
buflen: c_ulong
) -> c_ulong;
fn FPDFAnnot_GetFormFieldType(
&self,
hHandle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__
) -> c_int;
fn FPDFAnnot_GetFormFieldValue(
&self,
hHandle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__,
buffer: *mut c_ushort,
buflen: c_ulong
) -> c_ulong;
fn FPDFAnnot_GetOptionCount(
&self,
hHandle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__
) -> c_int;
fn FPDFAnnot_GetOptionLabel(
&self,
hHandle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__,
index: c_int,
buffer: *mut c_ushort,
buflen: c_ulong
) -> c_ulong;
fn FPDFAnnot_IsOptionSelected(
&self,
handle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__,
index: c_int
) -> c_int;
fn FPDFAnnot_GetFontSize(
&self,
hHandle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__,
value: *mut c_float
) -> c_int;
fn FPDFAnnot_IsChecked(
&self,
hHandle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__
) -> c_int;
fn FPDFAnnot_SetFocusableSubtypes(
&self,
hHandle: *mut fpdf_form_handle_t__,
subtypes: *const c_int,
count: c_ulong
) -> c_int;
fn FPDFAnnot_GetFocusableSubtypesCount(
&self,
hHandle: *mut fpdf_form_handle_t__
) -> c_int;
fn FPDFAnnot_GetFocusableSubtypes(
&self,
hHandle: *mut fpdf_form_handle_t__,
subtypes: *mut c_int,
count: c_ulong
) -> c_int;
fn FPDFAnnot_GetLink(
&self,
annot: *mut fpdf_annotation_t__
) -> *mut fpdf_link_t__;
fn FPDFAnnot_GetFormControlCount(
&self,
hHandle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__
) -> c_int;
fn FPDFAnnot_GetFormControlIndex(
&self,
hHandle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__
) -> c_int;
fn FPDFAnnot_GetFormFieldExportValue(
&self,
hHandle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__,
buffer: *mut c_ushort,
buflen: c_ulong
) -> c_ulong;
fn FPDFAnnot_SetURI(
&self,
annot: *mut fpdf_annotation_t__,
uri: &str
) -> c_int;
fn FPDFDOC_InitFormFillEnvironment(
&self,
document: *mut fpdf_document_t__,
form_info: *mut _FPDF_FORMFILLINFO
) -> *mut fpdf_form_handle_t__;
fn FPDFDOC_ExitFormFillEnvironment(&self, handle: *mut fpdf_form_handle_t__);
fn FPDFDoc_GetPageMode(&self, document: *mut fpdf_document_t__) -> c_int;
fn FPDFPage_Flatten(&self, page: *mut fpdf_page_t__, nFlag: c_int) -> c_int;
fn FPDF_SetFormFieldHighlightColor(
&self,
handle: *mut fpdf_form_handle_t__,
field_type: c_int,
color: c_ulong
);
fn FPDF_SetFormFieldHighlightAlpha(
&self,
handle: *mut fpdf_form_handle_t__,
alpha: c_uchar
);
fn FPDF_FFLDraw(
&self,
handle: *mut fpdf_form_handle_t__,
bitmap: *mut fpdf_bitmap_t__,
page: *mut fpdf_page_t__,
start_x: c_int,
start_y: c_int,
size_x: c_int,
size_y: c_int,
rotate: c_int,
flags: c_int
);
fn FPDFBookmark_GetFirstChild(
&self,
document: *mut fpdf_document_t__,
bookmark: *mut fpdf_bookmark_t__
) -> *mut fpdf_bookmark_t__;
fn FPDFBookmark_GetNextSibling(
&self,
document: *mut fpdf_document_t__,
bookmark: *mut fpdf_bookmark_t__
) -> *mut fpdf_bookmark_t__;
fn FPDFBookmark_GetTitle(
&self,
bookmark: *mut fpdf_bookmark_t__,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong;
fn FPDFBookmark_Find(
&self,
document: *mut fpdf_document_t__,
title: *const c_ushort
) -> *mut fpdf_bookmark_t__;
fn FPDFBookmark_GetDest(
&self,
document: *mut fpdf_document_t__,
bookmark: *mut fpdf_bookmark_t__
) -> *mut fpdf_dest_t__;
fn FPDFBookmark_GetAction(
&self,
bookmark: *mut fpdf_bookmark_t__
) -> *mut fpdf_action_t__;
fn FPDFAction_GetType(&self, action: *mut fpdf_action_t__) -> c_ulong;
fn FPDFAction_GetDest(
&self,
document: *mut fpdf_document_t__,
action: *mut fpdf_action_t__
) -> *mut fpdf_dest_t__;
fn FPDFAction_GetFilePath(
&self,
action: *mut fpdf_action_t__,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong;
fn FPDFAction_GetURIPath(
&self,
document: *mut fpdf_document_t__,
action: *mut fpdf_action_t__,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong;
fn FPDFDest_GetDestPageIndex(
&self,
document: *mut fpdf_document_t__,
dest: *mut fpdf_dest_t__
) -> c_int;
fn FPDFText_LoadPage(
&self,
page: *mut fpdf_page_t__
) -> *mut fpdf_textpage_t__;
fn FPDFText_ClosePage(&self, text_page: *mut fpdf_textpage_t__);
fn FPDFText_CountChars(&self, text_page: *mut fpdf_textpage_t__) -> c_int;
fn FPDFText_GetUnicode(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int
) -> c_uint;
fn FPDFText_GetFontSize(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int
) -> c_double;
fn FPDFText_GetFontInfo(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int,
buffer: *mut c_void,
buflen: c_ulong,
flags: *mut c_int
) -> c_ulong;
fn FPDFText_GetFontWeight(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int
) -> c_int;
fn FPDFText_GetTextRenderMode(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int
) -> c_int;
fn FPDFText_GetFillColor(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int,
R: *mut c_uint,
G: *mut c_uint,
B: *mut c_uint,
A: *mut c_uint
) -> c_int;
fn FPDFText_GetStrokeColor(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int,
R: *mut c_uint,
G: *mut c_uint,
B: *mut c_uint,
A: *mut c_uint
) -> c_int;
fn FPDFText_GetCharAngle(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int
) -> c_float;
fn FPDFText_GetCharBox(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int,
left: *mut c_double,
right: *mut c_double,
bottom: *mut c_double,
top: *mut c_double
) -> c_int;
fn FPDFText_GetLooseCharBox(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int,
rect: *mut _FS_RECTF_
) -> c_int;
fn FPDFText_GetMatrix(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int,
matrix: *mut _FS_MATRIX_
) -> c_int;
fn FPDFText_GetCharOrigin(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int,
x: *mut c_double,
y: *mut c_double
) -> c_int;
fn FPDFText_GetCharIndexAtPos(
&self,
text_page: *mut fpdf_textpage_t__,
x: c_double,
y: c_double,
xTolerance: c_double,
yTolerance: c_double
) -> c_int;
fn FPDFText_GetText(
&self,
text_page: *mut fpdf_textpage_t__,
start_index: c_int,
count: c_int,
result: *mut c_ushort
) -> c_int;
fn FPDFText_CountRects(
&self,
text_page: *mut fpdf_textpage_t__,
start_index: c_int,
count: c_int
) -> c_int;
fn FPDFText_GetRect(
&self,
text_page: *mut fpdf_textpage_t__,
rect_index: c_int,
left: *mut c_double,
top: *mut c_double,
right: *mut c_double,
bottom: *mut c_double
) -> c_int;
fn FPDFText_GetBoundedText(
&self,
text_page: *mut fpdf_textpage_t__,
left: c_double,
top: c_double,
right: c_double,
bottom: c_double,
buffer: *mut c_ushort,
buflen: c_int
) -> c_int;
fn FPDFFormObj_CountObjects(
&self,
form_object: *mut fpdf_pageobject_t__
) -> c_int;
fn FPDFFormObj_GetObject(
&self,
form_object: *mut fpdf_pageobject_t__,
index: c_ulong
) -> *mut fpdf_pageobject_t__;
fn FPDFPageObj_CreateTextObj(
&self,
document: *mut fpdf_document_t__,
font: *mut fpdf_font_t__,
font_size: c_float
) -> *mut fpdf_pageobject_t__;
fn FPDFTextObj_GetTextRenderMode(
&self,
text: *mut fpdf_pageobject_t__
) -> c_int;
fn FPDFTextObj_SetTextRenderMode(
&self,
text: *mut fpdf_pageobject_t__,
render_mode: c_int
) -> c_int;
fn FPDFTextObj_GetText(
&self,
text_object: *mut fpdf_pageobject_t__,
text_page: *mut fpdf_textpage_t__,
buffer: *mut c_ushort,
length: c_ulong
) -> c_ulong;
fn FPDFTextObj_GetFont(
&self,
text: *mut fpdf_pageobject_t__
) -> *mut fpdf_font_t__;
fn FPDFTextObj_GetFontSize(
&self,
text: *mut fpdf_pageobject_t__,
size: *mut c_float
) -> c_int;
fn FPDFFont_Close(&self, font: *mut fpdf_font_t__);
fn FPDFPath_MoveTo(
&self,
path: *mut fpdf_pageobject_t__,
x: c_float,
y: c_float
) -> c_int;
fn FPDFPath_LineTo(
&self,
path: *mut fpdf_pageobject_t__,
x: c_float,
y: c_float
) -> c_int;
fn FPDFPath_BezierTo(
&self,
path: *mut fpdf_pageobject_t__,
x1: c_float,
y1: c_float,
x2: c_float,
y2: c_float,
x3: c_float,
y3: c_float
) -> c_int;
fn FPDFPath_Close(&self, path: *mut fpdf_pageobject_t__) -> c_int;
fn FPDFPath_SetDrawMode(
&self,
path: *mut fpdf_pageobject_t__,
fillmode: c_int,
stroke: c_int
) -> c_int;
fn FPDFPath_GetDrawMode(
&self,
path: *mut fpdf_pageobject_t__,
fillmode: *mut c_int,
stroke: *mut c_int
) -> c_int;
fn FPDFPageObj_NewTextObj(
&self,
document: *mut fpdf_document_t__,
font: &str,
font_size: c_float
) -> *mut fpdf_pageobject_t__;
fn FPDFText_SetText(
&self,
text_object: *mut fpdf_pageobject_t__,
text: *const c_ushort
) -> c_int;
fn FPDFText_SetCharcodes(
&self,
text_object: *mut fpdf_pageobject_t__,
charcodes: *const c_uint,
count: c_ulong
) -> c_int;
fn FPDFText_LoadFont(
&self,
document: *mut fpdf_document_t__,
data: *const c_uchar,
size: c_uint,
font_type: c_int,
cid: c_int
) -> *mut fpdf_font_t__;
fn FPDFText_LoadStandardFont(
&self,
document: *mut fpdf_document_t__,
font: &str
) -> *mut fpdf_font_t__;
fn FPDFPage_InsertObject(
&self,
page: *mut fpdf_page_t__,
page_obj: *mut fpdf_pageobject_t__
);
fn FPDFPage_RemoveObject(
&self,
page: *mut fpdf_page_t__,
page_obj: *mut fpdf_pageobject_t__
) -> c_int;
fn FPDFPage_CountObjects(&self, page: *mut fpdf_page_t__) -> c_int;
fn FPDFPage_GetObject(
&self,
page: *mut fpdf_page_t__,
index: c_int
) -> *mut fpdf_pageobject_t__;
fn FPDFPageObj_Destroy(&self, page_obj: *mut fpdf_pageobject_t__);
fn FPDFPageObj_HasTransparency(
&self,
page_object: *mut fpdf_pageobject_t__
) -> c_int;
fn FPDFPageObj_GetType(&self, page_object: *mut fpdf_pageobject_t__) -> c_int;
fn FPDFPageObj_Transform(
&self,
page_object: *mut fpdf_pageobject_t__,
a: c_double,
b: c_double,
c: c_double,
d: c_double,
e: c_double,
f: c_double
);
fn FPDFPageObj_GetMatrix(
&self,
page_object: *mut fpdf_pageobject_t__,
matrix: *mut _FS_MATRIX_
) -> c_int;
fn FPDFPageObj_SetMatrix(
&self,
path: *mut fpdf_pageobject_t__,
matrix: *const _FS_MATRIX_
) -> c_int;
fn FPDFPageObj_NewImageObj(
&self,
document: *mut fpdf_document_t__
) -> *mut fpdf_pageobject_t__;
fn FPDFPageObj_CountMarks(
&self,
page_object: *mut fpdf_pageobject_t__
) -> c_int;
fn FPDFPageObj_GetMark(
&self,
page_object: *mut fpdf_pageobject_t__,
index: c_ulong
) -> *mut fpdf_pageobjectmark_t__;
fn FPDFPageObj_AddMark(
&self,
page_object: *mut fpdf_pageobject_t__,
name: &str
) -> *mut fpdf_pageobjectmark_t__;
fn FPDFPageObj_RemoveMark(
&self,
page_object: *mut fpdf_pageobject_t__,
mark: *mut fpdf_pageobjectmark_t__
) -> c_int;
fn FPDFPageObjMark_GetName(
&self,
mark: *mut fpdf_pageobjectmark_t__,
buffer: *mut c_void,
buflen: c_ulong,
out_buflen: *mut c_ulong
) -> c_int;
fn FPDFPageObjMark_CountParams(
&self,
mark: *mut fpdf_pageobjectmark_t__
) -> c_int;
fn FPDFPageObjMark_GetParamKey(
&self,
mark: *mut fpdf_pageobjectmark_t__,
index: c_ulong,
buffer: *mut c_void,
buflen: c_ulong,
out_buflen: *mut c_ulong
) -> c_int;
fn FPDFPageObjMark_GetParamValueType(
&self,
mark: *mut fpdf_pageobjectmark_t__,
key: &str
) -> c_int;
fn FPDFPageObjMark_GetParamIntValue(
&self,
mark: *mut fpdf_pageobjectmark_t__,
key: &str,
out_value: *mut c_int
) -> c_int;
fn FPDFPageObjMark_GetParamStringValue(
&self,
mark: *mut fpdf_pageobjectmark_t__,
key: &str,
buffer: *mut c_void,
buflen: c_ulong,
out_buflen: *mut c_ulong
) -> c_int;
fn FPDFPageObjMark_GetParamBlobValue(
&self,
mark: *mut fpdf_pageobjectmark_t__,
key: &str,
buffer: *mut c_void,
buflen: c_ulong,
out_buflen: *mut c_ulong
) -> c_int;
fn FPDFPageObjMark_SetIntParam(
&self,
document: *mut fpdf_document_t__,
page_object: *mut fpdf_pageobject_t__,
mark: *mut fpdf_pageobjectmark_t__,
key: &str,
value: c_int
) -> c_int;
fn FPDFPageObjMark_SetStringParam(
&self,
document: *mut fpdf_document_t__,
page_object: *mut fpdf_pageobject_t__,
mark: *mut fpdf_pageobjectmark_t__,
key: &str,
value: &str
) -> c_int;
fn FPDFPageObjMark_SetBlobParam(
&self,
document: *mut fpdf_document_t__,
page_object: *mut fpdf_pageobject_t__,
mark: *mut fpdf_pageobjectmark_t__,
key: &str,
value: *mut c_void,
value_len: c_ulong
) -> c_int;
fn FPDFPageObjMark_RemoveParam(
&self,
page_object: *mut fpdf_pageobject_t__,
mark: *mut fpdf_pageobjectmark_t__,
key: &str
) -> c_int;
fn FPDFImageObj_LoadJpegFile(
&self,
pages: *mut *mut fpdf_page_t__,
count: c_int,
image_object: *mut fpdf_pageobject_t__,
file_access: *mut FPDF_FILEACCESS
) -> c_int;
fn FPDFImageObj_LoadJpegFileInline(
&self,
pages: *mut *mut fpdf_page_t__,
count: c_int,
image_object: *mut fpdf_pageobject_t__,
file_access: *mut FPDF_FILEACCESS
) -> c_int;
fn FPDFImageObj_SetMatrix(
&self,
image_object: *mut fpdf_pageobject_t__,
a: c_double,
b: c_double,
c: c_double,
d: c_double,
e: c_double,
f: c_double
) -> c_int;
fn FPDFImageObj_SetBitmap(
&self,
pages: *mut *mut fpdf_page_t__,
count: c_int,
image_object: *mut fpdf_pageobject_t__,
bitmap: *mut fpdf_bitmap_t__
) -> c_int;
fn FPDFImageObj_GetBitmap(
&self,
image_object: *mut fpdf_pageobject_t__
) -> *mut fpdf_bitmap_t__;
fn FPDFImageObj_GetRenderedBitmap(
&self,
document: *mut fpdf_document_t__,
page: *mut fpdf_page_t__,
image_object: *mut fpdf_pageobject_t__
) -> *mut fpdf_bitmap_t__;
fn FPDFImageObj_GetImageDataDecoded(
&self,
image_object: *mut fpdf_pageobject_t__,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong;
fn FPDFImageObj_GetImageDataRaw(
&self,
image_object: *mut fpdf_pageobject_t__,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong;
fn FPDFImageObj_GetImageFilterCount(
&self,
image_object: *mut fpdf_pageobject_t__
) -> c_int;
fn FPDFImageObj_GetImageFilter(
&self,
image_object: *mut fpdf_pageobject_t__,
index: c_int,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong;
fn FPDFImageObj_GetImageMetadata(
&self,
image_object: *mut fpdf_pageobject_t__,
page: *mut fpdf_page_t__,
metadata: *mut FPDF_IMAGEOBJ_METADATA
) -> c_int;
fn FPDFPageObj_CreateNewPath(
&self,
x: c_float,
y: c_float
) -> *mut fpdf_pageobject_t__;
fn FPDFPageObj_CreateNewRect(
&self,
x: c_float,
y: c_float,
w: c_float,
h: c_float
) -> *mut fpdf_pageobject_t__;
fn FPDFPageObj_GetBounds(
&self,
page_object: *mut fpdf_pageobject_t__,
left: *mut c_float,
bottom: *mut c_float,
right: *mut c_float,
top: *mut c_float
) -> c_int;
fn FPDFPageObj_SetBlendMode(
&self,
page_object: *mut fpdf_pageobject_t__,
blend_mode: &str
);
fn FPDFPageObj_SetStrokeColor(
&self,
page_object: *mut fpdf_pageobject_t__,
R: c_uint,
G: c_uint,
B: c_uint,
A: c_uint
) -> c_int;
fn FPDFPageObj_GetStrokeColor(
&self,
page_object: *mut fpdf_pageobject_t__,
R: *mut c_uint,
G: *mut c_uint,
B: *mut c_uint,
A: *mut c_uint
) -> c_int;
fn FPDFPageObj_SetStrokeWidth(
&self,
page_object: *mut fpdf_pageobject_t__,
width: c_float
) -> c_int;
fn FPDFPageObj_GetStrokeWidth(
&self,
page_object: *mut fpdf_pageobject_t__,
width: *mut c_float
) -> c_int;
fn FPDFPageObj_GetLineJoin(
&self,
page_object: *mut fpdf_pageobject_t__
) -> c_int;
fn FPDFPageObj_SetLineJoin(
&self,
page_object: *mut fpdf_pageobject_t__,
line_join: c_int
) -> c_int;
fn FPDFPageObj_GetLineCap(
&self,
page_object: *mut fpdf_pageobject_t__
) -> c_int;
fn FPDFPageObj_SetLineCap(
&self,
page_object: *mut fpdf_pageobject_t__,
line_cap: c_int
) -> c_int;
fn FPDFPageObj_SetFillColor(
&self,
page_object: *mut fpdf_pageobject_t__,
R: c_uint,
G: c_uint,
B: c_uint,
A: c_uint
) -> c_int;
fn FPDFPageObj_GetFillColor(
&self,
page_object: *mut fpdf_pageobject_t__,
R: *mut c_uint,
G: *mut c_uint,
B: *mut c_uint,
A: *mut c_uint
) -> c_int;
fn FPDFPageObj_GetDashPhase(
&self,
page_object: *mut fpdf_pageobject_t__,
phase: *mut c_float
) -> c_int;
fn FPDFPageObj_SetDashPhase(
&self,
page_object: *mut fpdf_pageobject_t__,
phase: c_float
) -> c_int;
fn FPDFPageObj_GetDashCount(
&self,
page_object: *mut fpdf_pageobject_t__
) -> c_int;
fn FPDFPageObj_GetDashArray(
&self,
page_object: *mut fpdf_pageobject_t__,
dash_array: *mut c_float,
dash_count: c_ulong
) -> c_int;
fn FPDFPageObj_SetDashArray(
&self,
page_object: *mut fpdf_pageobject_t__,
dash_array: *const c_float,
dash_count: c_ulong,
phase: c_float
) -> c_int;
fn FPDFFont_GetFontName(
&self,
font: *mut fpdf_font_t__,
buffer: *mut c_char,
length: c_ulong
) -> c_ulong;
fn FPDFFont_GetFlags(&self, font: *mut fpdf_font_t__) -> c_int;
fn FPDFFont_GetWeight(&self, font: *mut fpdf_font_t__) -> c_int;
fn FPDFFont_GetItalicAngle(
&self,
font: *mut fpdf_font_t__,
angle: *mut c_int
) -> c_int;
fn FPDFFont_GetAscent(
&self,
font: *mut fpdf_font_t__,
font_size: c_float,
ascent: *mut c_float
) -> c_int;
fn FPDFFont_GetDescent(
&self,
font: *mut fpdf_font_t__,
font_size: c_float,
descent: *mut c_float
) -> c_int;
fn FPDFFont_GetGlyphWidth(
&self,
font: *mut fpdf_font_t__,
glyph: c_uint,
font_size: c_float,
width: *mut c_float
) -> c_int;
fn FPDFFont_GetGlyphPath(
&self,
font: *mut fpdf_font_t__,
glyph: c_uint,
font_size: c_float
) -> *const fpdf_glyphpath_t__;
fn FPDFGlyphPath_CountGlyphSegments(
&self,
glyphpath: *const fpdf_glyphpath_t__
) -> c_int;
fn FPDFGlyphPath_GetGlyphPathSegment(
&self,
glyphpath: *const fpdf_glyphpath_t__,
index: c_int
) -> *const fpdf_pathsegment_t;
fn FPDF_VIEWERREF_GetPrintScaling(
&self,
document: *mut fpdf_document_t__
) -> c_int;
fn FPDF_VIEWERREF_GetNumCopies(
&self,
document: *mut fpdf_document_t__
) -> c_int;
fn FPDF_VIEWERREF_GetPrintPageRange(
&self,
document: *mut fpdf_document_t__
) -> *mut fpdf_pagerange_t__;
fn FPDF_VIEWERREF_GetPrintPageRangeCount(
&self,
pagerange: *mut fpdf_pagerange_t__
) -> c_ulong;
fn FPDF_VIEWERREF_GetPrintPageRangeElement(
&self,
pagerange: *mut fpdf_pagerange_t__,
index: c_ulong
) -> c_int;
fn FPDF_VIEWERREF_GetDuplex(
&self,
document: *mut fpdf_document_t__
) -> c_uint;
fn FPDF_VIEWERREF_GetName(
&self,
document: *mut fpdf_document_t__,
key: &str,
buffer: *mut c_char,
length: c_ulong
) -> c_ulong;
fn TRUE(&self) -> c_int { ... }
fn FALSE(&self) -> c_int { ... }
fn is_true(&self, bool: c_int) -> bool { ... }
fn bool_to_pdfium(&self, bool: bool) -> c_int { ... }
fn get_pdfium_utf16le_bytes_from_str(&self, str: &str) -> Vec<u8> { ... }
fn get_string_from_pdfium_utf16le_bytes(
&self,
buffer: Vec<u8>
) -> Option<String> { ... }
fn get_handle_from_document(
&self,
document: &PdfDocument<'_>
) -> *mut fpdf_document_t__ { ... }
fn get_handle_from_page(&self, page: &PdfPage<'_>) -> *mut fpdf_page_t__ { ... }
fn get_handle_from_object(
&self,
object: &PdfPageObject<'_>
) -> *mut fpdf_pageobject_t__ { ... }
fn FPDF_LoadMemDocument(
&self,
bytes: &[u8],
password: Option<&str>
) -> *mut fpdf_document_t__ { ... }
fn FPDF_ImportPagesByIndex_vec(
&self,
dest_doc: *mut fpdf_document_t__,
src_doc: *mut fpdf_document_t__,
page_indices: Vec<c_int>,
index: c_int
) -> c_int { ... }
fn FPDFBitmap_SetBuffer(
&self,
bitmap: *mut fpdf_bitmap_t__,
buffer: &[u8]
) -> bool { ... }
fn FPDFAnnot_SetStringValue_str(
&self,
annot: *mut fpdf_annotation_t__,
key: &str,
value: &str
) -> c_int { ... }
fn FPDFAnnot_SetAP_str(
&self,
annot: *mut fpdf_annotation_t__,
appearanceMode: c_int,
value: &str
) -> c_int { ... }
fn FPDFBookmark_Find_str(
&self,
document: *mut fpdf_document_t__,
title: &str
) -> *mut fpdf_bookmark_t__ { ... }
fn FPDFText_SetText_str(
&self,
text_object: *mut fpdf_pageobject_t__,
text: &str
) -> c_int { ... }
fn get_pdfium_last_error(&self) -> Option<PdfiumInternalError> { ... }
}Expand description
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’s API uses three different string types: classic C-style null-terminated char arrays,
UTF-8 byte arrays, and a UTF-16LE byte array type named FPDF_WIDESTRING. For functions that take a
C-style string or a UTF-8 byte array, pdfium-render’s binding will take the standard Rust &str type.
For functions that take an FPDF_WIDESTRING, pdfium-render exposes two functions: the vanilla
FPDF_*() function that takes an FPDF_WIDESTRING, and an additional FPDF_*_str() helper function
that takes a standard Rust &str and converts it internally to an FPDF_WIDESTRING before calling
Pdfium. Examples of functions with additional _str() helpers include FPDFBookmark_Find(),
FPDFAnnot_SetStringValue(), and FPDFText_SetText().
The PdfiumLibraryBindings::get_pdfium_utf16le_bytes_from_str() and PdfiumLibraryBindings::get_string_from_pdfium_utf16le_bytes() functions are provided for converting to and from UTF-16LE in your own code.
The following Pdfium functions have different signatures in this trait compared to their native function signatures in Pdfium:
- PdfiumLibraryBindings::FPDF_LoadDocument(): this function is not available when compiling to WASM.
- PdfiumLibraryBindings::FPDFBitmap_GetBuffer(): the return type of this function is modified
when compiling to WASM. Instead of returning
*mut c_void, it returns*const c_void. This is to encourage callers to avoid directly mutating the returned buffer, as this is not supported when compiling to WASM. Instead, callers should use the provided PdfiumLibraryBindings::FPDFBitmap_SetBuffer() convenience function to apply modified pixel data to a bitmap.
Required Methods
fn FPDF_InitLibrary(&self)
fn FPDF_DestroyLibrary(&self)
fn FPDF_GetLastError(&self) -> c_ulong
fn FPDF_CreateNewDocument(&self) -> *mut fpdf_document_t__
This function is not available when compiling to WASM. You must use one of the PdfiumLibraryBindings::FPDF_LoadMemDocument(), PdfiumLibraryBindings::FPDF_LoadMemDocument64(), or PdfiumLibraryBindings::FPDF_LoadCustomDocument() functions instead.
fn FPDF_LoadMemDocument64(
&self,
data_buf: &[u8],
password: Option<&str>
) -> *mut fpdf_document_t__
fn FPDF_LoadCustomDocument(
&self,
pFileAccess: *mut FPDF_FILEACCESS,
password: Option<&str>
) -> *mut fpdf_document_t__
fn FPDF_SaveAsCopy(
&self,
document: *mut fpdf_document_t__,
pFileWrite: *mut FPDF_FILEWRITE_,
flags: c_ulong
) -> c_int
fn FPDF_SaveWithVersion(
&self,
document: *mut fpdf_document_t__,
pFileWrite: *mut FPDF_FILEWRITE_,
flags: c_ulong,
fileVersion: c_int
) -> c_int
fn FPDF_CloseDocument(&self, document: *mut fpdf_document_t__)
fn FPDF_GetFormType(&self, document: *mut fpdf_document_t__) -> c_int
fn FPDF_GetMetaText(
&self,
document: *mut fpdf_document_t__,
tag: &str,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong
fn FPDF_GetDocPermissions(&self, document: *mut fpdf_document_t__) -> c_ulong
fn FPDF_GetSecurityHandlerRevision(
&self,
document: *mut fpdf_document_t__
) -> c_int
fn FPDF_GetPageCount(&self, document: *mut fpdf_document_t__) -> c_int
fn FPDF_LoadPage(
&self,
document: *mut fpdf_document_t__,
page_index: c_int
) -> *mut fpdf_page_t__
fn FPDF_ClosePage(&self, page: *mut fpdf_page_t__)
fn FPDF_ImportPagesByIndex(
&self,
dest_doc: *mut fpdf_document_t__,
src_doc: *mut fpdf_document_t__,
page_indices: *const c_int,
length: c_ulong,
index: c_int
) -> c_int
fn FPDF_ImportPages(
&self,
dest_doc: *mut fpdf_document_t__,
src_doc: *mut fpdf_document_t__,
pagerange: &str,
index: c_int
) -> c_int
fn FPDF_ImportNPagesToOne(
&self,
src_doc: *mut fpdf_document_t__,
output_width: c_float,
output_height: c_float,
num_pages_on_x_axis: c_ulong,
num_pages_on_y_axis: c_ulong
) -> *mut fpdf_document_t__
fn FPDF_GetPageWidthF(&self, page: *mut fpdf_page_t__) -> c_float
fn FPDF_GetPageHeightF(&self, page: *mut fpdf_page_t__) -> c_float
fn FPDF_GetPageLabel(
&self,
document: *mut fpdf_document_t__,
page_index: c_int,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong
fn FPDFText_GetCharIndexFromTextIndex(
&self,
text_page: *mut fpdf_textpage_t__,
nTextIndex: c_int
) -> c_int
fn FPDFText_GetTextIndexFromCharIndex(
&self,
text_page: *mut fpdf_textpage_t__,
nCharIndex: c_int
) -> c_int
fn FPDF_GetSignatureCount(&self, document: *mut fpdf_document_t__) -> c_int
fn FPDF_GetSignatureObject(
&self,
document: *mut fpdf_document_t__,
index: c_int
) -> *mut fpdf_signature_t__
fn FPDFSignatureObj_GetContents(
&self,
signature: *mut fpdf_signature_t__,
buffer: *mut c_void,
length: c_ulong
) -> c_ulong
fn FPDFSignatureObj_GetByteRange(
&self,
signature: *mut fpdf_signature_t__,
buffer: *mut c_int,
length: c_ulong
) -> c_ulong
fn FPDFSignatureObj_GetSubFilter(
&self,
signature: *mut fpdf_signature_t__,
buffer: *mut c_char,
length: c_ulong
) -> c_ulong
fn FPDFSignatureObj_GetReason(
&self,
signature: *mut fpdf_signature_t__,
buffer: *mut c_void,
length: c_ulong
) -> c_ulong
fn FPDFSignatureObj_GetTime(
&self,
signature: *mut fpdf_signature_t__,
buffer: *mut c_char,
length: c_ulong
) -> c_ulong
fn FPDFSignatureObj_GetDocMDPPermission(
&self,
signature: *mut fpdf_signature_t__
) -> c_uint
fn FPDF_StructTree_GetForPage(
&self,
page: *mut fpdf_page_t__
) -> *mut fpdf_structtree_t__
fn FPDF_StructTree_Close(&self, struct_tree: *mut fpdf_structtree_t__)
fn FPDF_StructTree_CountChildren(
&self,
struct_tree: *mut fpdf_structtree_t__
) -> c_int
fn FPDF_StructTree_GetChildAtIndex(
&self,
struct_tree: *mut fpdf_structtree_t__,
index: c_int
) -> *mut fpdf_structelement_t__
fn FPDF_StructElement_GetAltText(
&self,
struct_element: *mut fpdf_structelement_t__,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong
fn FPDF_StructElement_GetID(
&self,
struct_element: *mut fpdf_structelement_t__,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong
fn FPDF_StructElement_GetLang(
&self,
struct_element: *mut fpdf_structelement_t__,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong
fn FPDF_StructElement_GetStringAttribute(
&self,
struct_element: *mut fpdf_structelement_t__,
attr_name: *const c_char,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong
fn FPDF_StructElement_GetMarkedContentID(
&self,
struct_element: *mut fpdf_structelement_t__
) -> c_int
fn FPDF_StructElement_GetType(
&self,
struct_element: *mut fpdf_structelement_t__,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong
fn FPDF_StructElement_GetTitle(
&self,
struct_element: *mut fpdf_structelement_t__,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong
fn FPDF_StructElement_CountChildren(
&self,
struct_element: *mut fpdf_structelement_t__
) -> c_int
fn FPDF_StructElement_GetChildAtIndex(
&self,
struct_element: *mut fpdf_structelement_t__,
index: c_int
) -> *mut fpdf_structelement_t__
fn FPDFPage_New(
&self,
document: *mut fpdf_document_t__,
page_index: c_int,
width: c_double,
height: c_double
) -> *mut fpdf_page_t__
fn FPDFPage_Delete(&self, document: *mut fpdf_document_t__, page_index: c_int)
fn FPDFPage_GetRotation(&self, page: *mut fpdf_page_t__) -> c_int
fn FPDFPage_SetRotation(&self, page: *mut fpdf_page_t__, rotate: c_int)
fn FPDF_GetPageBoundingBox(
&self,
page: *mut fpdf_page_t__,
rect: *mut _FS_RECTF_
) -> c_int
fn FPDFPage_GetMediaBox(
&self,
page: *mut fpdf_page_t__,
left: *mut c_float,
bottom: *mut c_float,
right: *mut c_float,
top: *mut c_float
) -> c_int
fn FPDFPage_GetCropBox(
&self,
page: *mut fpdf_page_t__,
left: *mut c_float,
bottom: *mut c_float,
right: *mut c_float,
top: *mut c_float
) -> c_int
fn FPDFPage_GetBleedBox(
&self,
page: *mut fpdf_page_t__,
left: *mut c_float,
bottom: *mut c_float,
right: *mut c_float,
top: *mut c_float
) -> c_int
fn FPDFPage_GetTrimBox(
&self,
page: *mut fpdf_page_t__,
left: *mut c_float,
bottom: *mut c_float,
right: *mut c_float,
top: *mut c_float
) -> c_int
fn FPDFPage_GetArtBox(
&self,
page: *mut fpdf_page_t__,
left: *mut c_float,
bottom: *mut c_float,
right: *mut c_float,
top: *mut c_float
) -> c_int
fn FPDFPage_SetMediaBox(
&self,
page: *mut fpdf_page_t__,
left: c_float,
bottom: c_float,
right: c_float,
top: c_float
)
fn FPDFPage_SetCropBox(
&self,
page: *mut fpdf_page_t__,
left: c_float,
bottom: c_float,
right: c_float,
top: c_float
)
fn FPDFPage_SetBleedBox(
&self,
page: *mut fpdf_page_t__,
left: c_float,
bottom: c_float,
right: c_float,
top: c_float
)
fn FPDFPage_SetTrimBox(
&self,
page: *mut fpdf_page_t__,
left: c_float,
bottom: c_float,
right: c_float,
top: c_float
)
fn FPDFPage_SetArtBox(
&self,
page: *mut fpdf_page_t__,
left: c_float,
bottom: c_float,
right: c_float,
top: c_float
)
fn FPDFPage_HasTransparency(&self, page: *mut fpdf_page_t__) -> c_int
fn FPDFPage_GenerateContent(&self, page: *mut fpdf_page_t__) -> c_int
fn FPDFBitmap_CreateEx(
&self,
width: c_int,
height: c_int,
format: c_int,
first_scan: *mut c_void,
stride: c_int
) -> *mut fpdf_bitmap_t__
fn FPDFBitmap_Destroy(&self, bitmap: *mut fpdf_bitmap_t__)
fn FPDFBitmap_GetFormat(&self, bitmap: *mut fpdf_bitmap_t__) -> c_int
fn FPDFBitmap_FillRect(
&self,
bitmap: *mut fpdf_bitmap_t__,
left: c_int,
top: c_int,
width: c_int,
height: c_int,
color: c_ulong
)
fn FPDFBitmap_GetBuffer(&self, bitmap: *mut fpdf_bitmap_t__) -> *mut c_void
fn FPDFBitmap_GetBuffer(&self, bitmap: *mut fpdf_bitmap_t__) -> *mut c_void
Note that the return type of this function is modified when compiling to WASM. Instead
of returning *mut c_void, it returns *const c_void.
When compiling to WASM, Pdfium’s internal pixel data buffer for the given bitmap resides
in a separate WASM memory module, so any buffer returned by this function is necessarily
a copy; mutating that copy does not alter the buffer in Pdfium’s WASM module and, since
there is no way for pdfium-render to know when the caller has finished mutating the
copied buffer, there is no reliable way for pdfium-render to transfer any changes made
to the copy across to Pdfium’s WASM module.
To avoid having to maintain different code for different platform targets, it is recommended that all callers use the provided PdfiumLibraryBindings::FPDFBitmap_SetBuffer() convenience function to apply modified pixel data to a bitmap instead of mutating the buffer returned by this function.
fn FPDFBitmap_GetWidth(&self, bitmap: *mut fpdf_bitmap_t__) -> c_int
fn FPDFBitmap_GetHeight(&self, bitmap: *mut fpdf_bitmap_t__) -> c_int
fn FPDFBitmap_GetStride(&self, bitmap: *mut fpdf_bitmap_t__) -> c_int
fn FPDF_RenderPageBitmap(
&self,
bitmap: *mut fpdf_bitmap_t__,
page: *mut fpdf_page_t__,
start_x: c_int,
start_y: c_int,
size_x: c_int,
size_y: c_int,
rotate: c_int,
flags: c_int
)
fn FPDF_RenderPageBitmapWithMatrix(
&self,
bitmap: *mut fpdf_bitmap_t__,
page: *mut fpdf_page_t__,
matrix: *const _FS_MATRIX_,
clipping: *const _FS_RECTF_,
flags: c_int
)
fn FPDFAnnot_IsSupportedSubtype(&self, subtype: c_int) -> c_int
fn FPDFPage_CreateAnnot(
&self,
page: *mut fpdf_page_t__,
subtype: c_int
) -> *mut fpdf_annotation_t__
fn FPDFPage_GetAnnotCount(&self, page: *mut fpdf_page_t__) -> c_int
fn FPDFPage_GetAnnot(
&self,
page: *mut fpdf_page_t__,
index: c_int
) -> *mut fpdf_annotation_t__
fn FPDFPage_GetAnnotIndex(
&self,
page: *mut fpdf_page_t__,
annot: *mut fpdf_annotation_t__
) -> c_int
fn FPDFPage_CloseAnnot(&self, annot: *mut fpdf_annotation_t__)
fn FPDFPage_RemoveAnnot(&self, page: *mut fpdf_page_t__, index: c_int) -> c_int
fn FPDFAnnot_GetSubtype(&self, annot: *mut fpdf_annotation_t__) -> c_int
fn FPDFAnnot_IsObjectSupportedSubtype(&self, subtype: c_int) -> c_int
fn FPDFAnnot_UpdateObject(
&self,
annot: *mut fpdf_annotation_t__,
obj: *mut fpdf_pageobject_t__
) -> c_int
fn FPDFAnnot_AddInkStroke(
&self,
annot: *mut fpdf_annotation_t__,
points: *const FS_POINTF_,
point_count: c_ulong
) -> c_int
fn FPDFAnnot_RemoveInkList(&self, annot: *mut fpdf_annotation_t__) -> c_int
fn FPDFAnnot_AppendObject(
&self,
annot: *mut fpdf_annotation_t__,
obj: *mut fpdf_pageobject_t__
) -> c_int
fn FPDFAnnot_GetObjectCount(&self, annot: *mut fpdf_annotation_t__) -> c_int
fn FPDFAnnot_GetObject(
&self,
annot: *mut fpdf_annotation_t__,
index: c_int
) -> *mut fpdf_pageobject_t__
fn FPDFAnnot_RemoveObject(
&self,
annot: *mut fpdf_annotation_t__,
index: c_int
) -> c_int
fn FPDFAnnot_SetColor(
&self,
annot: *mut fpdf_annotation_t__,
color_type: c_uint,
R: c_uint,
G: c_uint,
B: c_uint,
A: c_uint
) -> c_int
fn FPDFAnnot_GetColor(
&self,
annot: *mut fpdf_annotation_t__,
color_type: c_uint,
R: *mut c_uint,
G: *mut c_uint,
B: *mut c_uint,
A: *mut c_uint
) -> c_int
fn FPDFAnnot_HasAttachmentPoints(&self, annot: *mut fpdf_annotation_t__) -> c_int
fn FPDFAnnot_SetAttachmentPoints(
&self,
annot: *mut fpdf_annotation_t__,
quad_index: c_ulong,
quad_points: *const _FS_QUADPOINTSF
) -> c_int
fn FPDFAnnot_AppendAttachmentPoints(
&self,
annot: *mut fpdf_annotation_t__,
quad_points: *const _FS_QUADPOINTSF
) -> c_int
fn FPDFAnnot_CountAttachmentPoints(
&self,
annot: *mut fpdf_annotation_t__
) -> c_ulong
fn FPDFAnnot_GetAttachmentPoints(
&self,
annot: *mut fpdf_annotation_t__,
quad_index: c_ulong,
quad_points: *mut _FS_QUADPOINTSF
) -> c_int
fn FPDFAnnot_SetRect(
&self,
annot: *mut fpdf_annotation_t__,
rect: *const _FS_RECTF_
) -> c_int
fn FPDFAnnot_GetRect(
&self,
annot: *mut fpdf_annotation_t__,
rect: *mut _FS_RECTF_
) -> c_int
fn FPDFAnnot_GetVertices(
&self,
annot: *mut fpdf_annotation_t__,
buffer: *mut FS_POINTF_,
length: c_ulong
) -> c_ulong
fn FPDFAnnot_GetInkListCount(&self, annot: *mut fpdf_annotation_t__) -> c_ulong
fn FPDFAnnot_GetInkListPath(
&self,
annot: *mut fpdf_annotation_t__,
path_index: c_ulong,
buffer: *mut FS_POINTF_,
length: c_ulong
) -> c_ulong
fn FPDFAnnot_GetLine(
&self,
annot: *mut fpdf_annotation_t__,
start: *mut FS_POINTF_,
end: *mut FS_POINTF_
) -> c_int
fn FPDFAnnot_SetBorder(
&self,
annot: *mut fpdf_annotation_t__,
horizontal_radius: c_float,
vertical_radius: c_float,
border_width: c_float
) -> c_int
fn FPDFAnnot_GetBorder(
&self,
annot: *mut fpdf_annotation_t__,
horizontal_radius: *mut c_float,
vertical_radius: *mut c_float,
border_width: *mut c_float
) -> c_int
fn FPDFAnnot_HasKey(&self, annot: *mut fpdf_annotation_t__, key: &str) -> c_int
fn FPDFAnnot_GetValueType(
&self,
annot: *mut fpdf_annotation_t__,
key: &str
) -> c_int
fn FPDFAnnot_SetStringValue(
&self,
annot: *mut fpdf_annotation_t__,
key: &str,
value: *const c_ushort
) -> c_int
fn FPDFAnnot_GetStringValue(
&self,
annot: *mut fpdf_annotation_t__,
key: &str,
buffer: *mut c_ushort,
buflen: c_ulong
) -> c_ulong
fn FPDFAnnot_GetNumberValue(
&self,
annot: *mut fpdf_annotation_t__,
key: &str,
value: *mut c_float
) -> c_int
fn FPDFAnnot_SetAP(
&self,
annot: *mut fpdf_annotation_t__,
appearanceMode: c_int,
value: *const c_ushort
) -> c_int
fn FPDFAnnot_GetAP(
&self,
annot: *mut fpdf_annotation_t__,
appearanceMode: c_int,
buffer: *mut c_ushort,
buflen: c_ulong
) -> c_ulong
fn FPDFAnnot_GetLinkedAnnot(
&self,
annot: *mut fpdf_annotation_t__,
key: &str
) -> *mut fpdf_annotation_t__
fn FPDFAnnot_GetFlags(&self, annot: *mut fpdf_annotation_t__) -> c_int
fn FPDFAnnot_SetFlags(
&self,
annot: *mut fpdf_annotation_t__,
flags: c_int
) -> c_int
fn FPDFAnnot_GetFormFieldFlags(
&self,
handle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__
) -> c_int
fn FPDFAnnot_GetFormFieldAtPoint(
&self,
hHandle: *mut fpdf_form_handle_t__,
page: *mut fpdf_page_t__,
point: *const FS_POINTF_
) -> *mut fpdf_annotation_t__
fn FPDFAnnot_GetFormFieldName(
&self,
hHandle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__,
buffer: *mut c_ushort,
buflen: c_ulong
) -> c_ulong
fn FPDFAnnot_GetFormFieldType(
&self,
hHandle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__
) -> c_int
fn FPDFAnnot_GetFormFieldValue(
&self,
hHandle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__,
buffer: *mut c_ushort,
buflen: c_ulong
) -> c_ulong
fn FPDFAnnot_GetOptionCount(
&self,
hHandle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__
) -> c_int
fn FPDFAnnot_GetOptionLabel(
&self,
hHandle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__,
index: c_int,
buffer: *mut c_ushort,
buflen: c_ulong
) -> c_ulong
fn FPDFAnnot_IsOptionSelected(
&self,
handle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__,
index: c_int
) -> c_int
fn FPDFAnnot_GetFontSize(
&self,
hHandle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__,
value: *mut c_float
) -> c_int
fn FPDFAnnot_IsChecked(
&self,
hHandle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__
) -> c_int
fn FPDFAnnot_SetFocusableSubtypes(
&self,
hHandle: *mut fpdf_form_handle_t__,
subtypes: *const c_int,
count: c_ulong
) -> c_int
fn FPDFAnnot_GetFocusableSubtypesCount(
&self,
hHandle: *mut fpdf_form_handle_t__
) -> c_int
fn FPDFAnnot_GetFocusableSubtypes(
&self,
hHandle: *mut fpdf_form_handle_t__,
subtypes: *mut c_int,
count: c_ulong
) -> c_int
fn FPDFAnnot_GetLink(
&self,
annot: *mut fpdf_annotation_t__
) -> *mut fpdf_link_t__
fn FPDFAnnot_GetFormControlCount(
&self,
hHandle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__
) -> c_int
fn FPDFAnnot_GetFormControlIndex(
&self,
hHandle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__
) -> c_int
fn FPDFAnnot_GetFormFieldExportValue(
&self,
hHandle: *mut fpdf_form_handle_t__,
annot: *mut fpdf_annotation_t__,
buffer: *mut c_ushort,
buflen: c_ulong
) -> c_ulong
fn FPDFAnnot_SetURI(&self, annot: *mut fpdf_annotation_t__, uri: &str) -> c_int
fn FPDFDOC_InitFormFillEnvironment(
&self,
document: *mut fpdf_document_t__,
form_info: *mut _FPDF_FORMFILLINFO
) -> *mut fpdf_form_handle_t__
fn FPDFDOC_ExitFormFillEnvironment(&self, handle: *mut fpdf_form_handle_t__)
fn FPDFDoc_GetPageMode(&self, document: *mut fpdf_document_t__) -> c_int
fn FPDFPage_Flatten(&self, page: *mut fpdf_page_t__, nFlag: c_int) -> c_int
fn FPDF_SetFormFieldHighlightColor(
&self,
handle: *mut fpdf_form_handle_t__,
field_type: c_int,
color: c_ulong
)
fn FPDF_SetFormFieldHighlightAlpha(
&self,
handle: *mut fpdf_form_handle_t__,
alpha: c_uchar
)
fn FPDF_FFLDraw(
&self,
handle: *mut fpdf_form_handle_t__,
bitmap: *mut fpdf_bitmap_t__,
page: *mut fpdf_page_t__,
start_x: c_int,
start_y: c_int,
size_x: c_int,
size_y: c_int,
rotate: c_int,
flags: c_int
)
fn FPDFBookmark_GetFirstChild(
&self,
document: *mut fpdf_document_t__,
bookmark: *mut fpdf_bookmark_t__
) -> *mut fpdf_bookmark_t__
fn FPDFBookmark_GetNextSibling(
&self,
document: *mut fpdf_document_t__,
bookmark: *mut fpdf_bookmark_t__
) -> *mut fpdf_bookmark_t__
fn FPDFBookmark_GetTitle(
&self,
bookmark: *mut fpdf_bookmark_t__,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong
fn FPDFBookmark_Find(
&self,
document: *mut fpdf_document_t__,
title: *const c_ushort
) -> *mut fpdf_bookmark_t__
fn FPDFBookmark_GetDest(
&self,
document: *mut fpdf_document_t__,
bookmark: *mut fpdf_bookmark_t__
) -> *mut fpdf_dest_t__
fn FPDFBookmark_GetAction(
&self,
bookmark: *mut fpdf_bookmark_t__
) -> *mut fpdf_action_t__
fn FPDFAction_GetType(&self, action: *mut fpdf_action_t__) -> c_ulong
fn FPDFAction_GetDest(
&self,
document: *mut fpdf_document_t__,
action: *mut fpdf_action_t__
) -> *mut fpdf_dest_t__
fn FPDFAction_GetFilePath(
&self,
action: *mut fpdf_action_t__,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong
fn FPDFAction_GetURIPath(
&self,
document: *mut fpdf_document_t__,
action: *mut fpdf_action_t__,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong
fn FPDFDest_GetDestPageIndex(
&self,
document: *mut fpdf_document_t__,
dest: *mut fpdf_dest_t__
) -> c_int
fn FPDFText_LoadPage(&self, page: *mut fpdf_page_t__) -> *mut fpdf_textpage_t__
fn FPDFText_ClosePage(&self, text_page: *mut fpdf_textpage_t__)
fn FPDFText_CountChars(&self, text_page: *mut fpdf_textpage_t__) -> c_int
fn FPDFText_GetUnicode(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int
) -> c_uint
fn FPDFText_GetFontSize(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int
) -> c_double
fn FPDFText_GetFontInfo(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int,
buffer: *mut c_void,
buflen: c_ulong,
flags: *mut c_int
) -> c_ulong
fn FPDFText_GetFontWeight(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int
) -> c_int
fn FPDFText_GetTextRenderMode(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int
) -> c_int
fn FPDFText_GetFillColor(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int,
R: *mut c_uint,
G: *mut c_uint,
B: *mut c_uint,
A: *mut c_uint
) -> c_int
fn FPDFText_GetStrokeColor(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int,
R: *mut c_uint,
G: *mut c_uint,
B: *mut c_uint,
A: *mut c_uint
) -> c_int
fn FPDFText_GetCharAngle(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int
) -> c_float
fn FPDFText_GetCharBox(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int,
left: *mut c_double,
right: *mut c_double,
bottom: *mut c_double,
top: *mut c_double
) -> c_int
fn FPDFText_GetLooseCharBox(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int,
rect: *mut _FS_RECTF_
) -> c_int
fn FPDFText_GetMatrix(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int,
matrix: *mut _FS_MATRIX_
) -> c_int
fn FPDFText_GetCharOrigin(
&self,
text_page: *mut fpdf_textpage_t__,
index: c_int,
x: *mut c_double,
y: *mut c_double
) -> c_int
fn FPDFText_GetCharIndexAtPos(
&self,
text_page: *mut fpdf_textpage_t__,
x: c_double,
y: c_double,
xTolerance: c_double,
yTolerance: c_double
) -> c_int
fn FPDFText_GetText(
&self,
text_page: *mut fpdf_textpage_t__,
start_index: c_int,
count: c_int,
result: *mut c_ushort
) -> c_int
fn FPDFText_CountRects(
&self,
text_page: *mut fpdf_textpage_t__,
start_index: c_int,
count: c_int
) -> c_int
fn FPDFText_GetRect(
&self,
text_page: *mut fpdf_textpage_t__,
rect_index: c_int,
left: *mut c_double,
top: *mut c_double,
right: *mut c_double,
bottom: *mut c_double
) -> c_int
fn FPDFText_GetBoundedText(
&self,
text_page: *mut fpdf_textpage_t__,
left: c_double,
top: c_double,
right: c_double,
bottom: c_double,
buffer: *mut c_ushort,
buflen: c_int
) -> c_int
fn FPDFFormObj_CountObjects(
&self,
form_object: *mut fpdf_pageobject_t__
) -> c_int
fn FPDFFormObj_GetObject(
&self,
form_object: *mut fpdf_pageobject_t__,
index: c_ulong
) -> *mut fpdf_pageobject_t__
fn FPDFPageObj_CreateTextObj(
&self,
document: *mut fpdf_document_t__,
font: *mut fpdf_font_t__,
font_size: c_float
) -> *mut fpdf_pageobject_t__
fn FPDFTextObj_GetTextRenderMode(&self, text: *mut fpdf_pageobject_t__) -> c_int
fn FPDFTextObj_SetTextRenderMode(
&self,
text: *mut fpdf_pageobject_t__,
render_mode: c_int
) -> c_int
fn FPDFTextObj_GetText(
&self,
text_object: *mut fpdf_pageobject_t__,
text_page: *mut fpdf_textpage_t__,
buffer: *mut c_ushort,
length: c_ulong
) -> c_ulong
fn FPDFTextObj_GetFont(
&self,
text: *mut fpdf_pageobject_t__
) -> *mut fpdf_font_t__
fn FPDFTextObj_GetFontSize(
&self,
text: *mut fpdf_pageobject_t__,
size: *mut c_float
) -> c_int
fn FPDFFont_Close(&self, font: *mut fpdf_font_t__)
fn FPDFPath_BezierTo(
&self,
path: *mut fpdf_pageobject_t__,
x1: c_float,
y1: c_float,
x2: c_float,
y2: c_float,
x3: c_float,
y3: c_float
) -> c_int
fn FPDFPath_Close(&self, path: *mut fpdf_pageobject_t__) -> c_int
fn FPDFPath_SetDrawMode(
&self,
path: *mut fpdf_pageobject_t__,
fillmode: c_int,
stroke: c_int
) -> c_int
fn FPDFPath_GetDrawMode(
&self,
path: *mut fpdf_pageobject_t__,
fillmode: *mut c_int,
stroke: *mut c_int
) -> c_int
fn FPDFPageObj_NewTextObj(
&self,
document: *mut fpdf_document_t__,
font: &str,
font_size: c_float
) -> *mut fpdf_pageobject_t__
fn FPDFText_SetText(
&self,
text_object: *mut fpdf_pageobject_t__,
text: *const c_ushort
) -> c_int
fn FPDFText_SetCharcodes(
&self,
text_object: *mut fpdf_pageobject_t__,
charcodes: *const c_uint,
count: c_ulong
) -> c_int
fn FPDFText_LoadFont(
&self,
document: *mut fpdf_document_t__,
data: *const c_uchar,
size: c_uint,
font_type: c_int,
cid: c_int
) -> *mut fpdf_font_t__
fn FPDFText_LoadStandardFont(
&self,
document: *mut fpdf_document_t__,
font: &str
) -> *mut fpdf_font_t__
fn FPDFPage_InsertObject(
&self,
page: *mut fpdf_page_t__,
page_obj: *mut fpdf_pageobject_t__
)
fn FPDFPage_RemoveObject(
&self,
page: *mut fpdf_page_t__,
page_obj: *mut fpdf_pageobject_t__
) -> c_int
fn FPDFPage_CountObjects(&self, page: *mut fpdf_page_t__) -> c_int
fn FPDFPage_GetObject(
&self,
page: *mut fpdf_page_t__,
index: c_int
) -> *mut fpdf_pageobject_t__
fn FPDFPageObj_Destroy(&self, page_obj: *mut fpdf_pageobject_t__)
fn FPDFPageObj_HasTransparency(
&self,
page_object: *mut fpdf_pageobject_t__
) -> c_int
fn FPDFPageObj_GetType(&self, page_object: *mut fpdf_pageobject_t__) -> c_int
fn FPDFPageObj_Transform(
&self,
page_object: *mut fpdf_pageobject_t__,
a: c_double,
b: c_double,
c: c_double,
d: c_double,
e: c_double,
f: c_double
)
fn FPDFPageObj_GetMatrix(
&self,
page_object: *mut fpdf_pageobject_t__,
matrix: *mut _FS_MATRIX_
) -> c_int
fn FPDFPageObj_SetMatrix(
&self,
path: *mut fpdf_pageobject_t__,
matrix: *const _FS_MATRIX_
) -> c_int
fn FPDFPageObj_NewImageObj(
&self,
document: *mut fpdf_document_t__
) -> *mut fpdf_pageobject_t__
fn FPDFPageObj_CountMarks(&self, page_object: *mut fpdf_pageobject_t__) -> c_int
fn FPDFPageObj_GetMark(
&self,
page_object: *mut fpdf_pageobject_t__,
index: c_ulong
) -> *mut fpdf_pageobjectmark_t__
fn FPDFPageObj_AddMark(
&self,
page_object: *mut fpdf_pageobject_t__,
name: &str
) -> *mut fpdf_pageobjectmark_t__
fn FPDFPageObj_RemoveMark(
&self,
page_object: *mut fpdf_pageobject_t__,
mark: *mut fpdf_pageobjectmark_t__
) -> c_int
fn FPDFPageObjMark_GetName(
&self,
mark: *mut fpdf_pageobjectmark_t__,
buffer: *mut c_void,
buflen: c_ulong,
out_buflen: *mut c_ulong
) -> c_int
fn FPDFPageObjMark_CountParams(
&self,
mark: *mut fpdf_pageobjectmark_t__
) -> c_int
fn FPDFPageObjMark_GetParamKey(
&self,
mark: *mut fpdf_pageobjectmark_t__,
index: c_ulong,
buffer: *mut c_void,
buflen: c_ulong,
out_buflen: *mut c_ulong
) -> c_int
fn FPDFPageObjMark_GetParamValueType(
&self,
mark: *mut fpdf_pageobjectmark_t__,
key: &str
) -> c_int
fn FPDFPageObjMark_GetParamIntValue(
&self,
mark: *mut fpdf_pageobjectmark_t__,
key: &str,
out_value: *mut c_int
) -> c_int
fn FPDFPageObjMark_GetParamStringValue(
&self,
mark: *mut fpdf_pageobjectmark_t__,
key: &str,
buffer: *mut c_void,
buflen: c_ulong,
out_buflen: *mut c_ulong
) -> c_int
fn FPDFPageObjMark_GetParamBlobValue(
&self,
mark: *mut fpdf_pageobjectmark_t__,
key: &str,
buffer: *mut c_void,
buflen: c_ulong,
out_buflen: *mut c_ulong
) -> c_int
fn FPDFPageObjMark_SetIntParam(
&self,
document: *mut fpdf_document_t__,
page_object: *mut fpdf_pageobject_t__,
mark: *mut fpdf_pageobjectmark_t__,
key: &str,
value: c_int
) -> c_int
fn FPDFPageObjMark_SetStringParam(
&self,
document: *mut fpdf_document_t__,
page_object: *mut fpdf_pageobject_t__,
mark: *mut fpdf_pageobjectmark_t__,
key: &str,
value: &str
) -> c_int
fn FPDFPageObjMark_SetBlobParam(
&self,
document: *mut fpdf_document_t__,
page_object: *mut fpdf_pageobject_t__,
mark: *mut fpdf_pageobjectmark_t__,
key: &str,
value: *mut c_void,
value_len: c_ulong
) -> c_int
fn FPDFPageObjMark_RemoveParam(
&self,
page_object: *mut fpdf_pageobject_t__,
mark: *mut fpdf_pageobjectmark_t__,
key: &str
) -> c_int
fn FPDFImageObj_LoadJpegFile(
&self,
pages: *mut *mut fpdf_page_t__,
count: c_int,
image_object: *mut fpdf_pageobject_t__,
file_access: *mut FPDF_FILEACCESS
) -> c_int
fn FPDFImageObj_LoadJpegFileInline(
&self,
pages: *mut *mut fpdf_page_t__,
count: c_int,
image_object: *mut fpdf_pageobject_t__,
file_access: *mut FPDF_FILEACCESS
) -> c_int
Prefer FPDFPageObj_SetMatrix() over FPDFImageObj_SetMatrix(). FPDFImageObj_SetMatrix() is deprecated and will likely be removed in a future version of Pdfium.
fn FPDFImageObj_SetBitmap(
&self,
pages: *mut *mut fpdf_page_t__,
count: c_int,
image_object: *mut fpdf_pageobject_t__,
bitmap: *mut fpdf_bitmap_t__
) -> c_int
fn FPDFImageObj_GetBitmap(
&self,
image_object: *mut fpdf_pageobject_t__
) -> *mut fpdf_bitmap_t__
fn FPDFImageObj_GetRenderedBitmap(
&self,
document: *mut fpdf_document_t__,
page: *mut fpdf_page_t__,
image_object: *mut fpdf_pageobject_t__
) -> *mut fpdf_bitmap_t__
fn FPDFImageObj_GetImageDataDecoded(
&self,
image_object: *mut fpdf_pageobject_t__,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong
fn FPDFImageObj_GetImageDataRaw(
&self,
image_object: *mut fpdf_pageobject_t__,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong
fn FPDFImageObj_GetImageFilterCount(
&self,
image_object: *mut fpdf_pageobject_t__
) -> c_int
fn FPDFImageObj_GetImageFilter(
&self,
image_object: *mut fpdf_pageobject_t__,
index: c_int,
buffer: *mut c_void,
buflen: c_ulong
) -> c_ulong
fn FPDFImageObj_GetImageMetadata(
&self,
image_object: *mut fpdf_pageobject_t__,
page: *mut fpdf_page_t__,
metadata: *mut FPDF_IMAGEOBJ_METADATA
) -> c_int
fn FPDFPageObj_CreateNewPath(
&self,
x: c_float,
y: c_float
) -> *mut fpdf_pageobject_t__
fn FPDFPageObj_CreateNewRect(
&self,
x: c_float,
y: c_float,
w: c_float,
h: c_float
) -> *mut fpdf_pageobject_t__
fn FPDFPageObj_GetBounds(
&self,
page_object: *mut fpdf_pageobject_t__,
left: *mut c_float,
bottom: *mut c_float,
right: *mut c_float,
top: *mut c_float
) -> c_int
fn FPDFPageObj_SetBlendMode(
&self,
page_object: *mut fpdf_pageobject_t__,
blend_mode: &str
)
fn FPDFPageObj_SetStrokeColor(
&self,
page_object: *mut fpdf_pageobject_t__,
R: c_uint,
G: c_uint,
B: c_uint,
A: c_uint
) -> c_int
fn FPDFPageObj_GetStrokeColor(
&self,
page_object: *mut fpdf_pageobject_t__,
R: *mut c_uint,
G: *mut c_uint,
B: *mut c_uint,
A: *mut c_uint
) -> c_int
fn FPDFPageObj_SetStrokeWidth(
&self,
page_object: *mut fpdf_pageobject_t__,
width: c_float
) -> c_int
fn FPDFPageObj_GetStrokeWidth(
&self,
page_object: *mut fpdf_pageobject_t__,
width: *mut c_float
) -> c_int
fn FPDFPageObj_GetLineJoin(&self, page_object: *mut fpdf_pageobject_t__) -> c_int
fn FPDFPageObj_SetLineJoin(
&self,
page_object: *mut fpdf_pageobject_t__,
line_join: c_int
) -> c_int
fn FPDFPageObj_GetLineCap(&self, page_object: *mut fpdf_pageobject_t__) -> c_int
fn FPDFPageObj_SetLineCap(
&self,
page_object: *mut fpdf_pageobject_t__,
line_cap: c_int
) -> c_int
fn FPDFPageObj_SetFillColor(
&self,
page_object: *mut fpdf_pageobject_t__,
R: c_uint,
G: c_uint,
B: c_uint,
A: c_uint
) -> c_int
fn FPDFPageObj_GetFillColor(
&self,
page_object: *mut fpdf_pageobject_t__,
R: *mut c_uint,
G: *mut c_uint,
B: *mut c_uint,
A: *mut c_uint
) -> c_int
fn FPDFPageObj_GetDashPhase(
&self,
page_object: *mut fpdf_pageobject_t__,
phase: *mut c_float
) -> c_int
fn FPDFPageObj_SetDashPhase(
&self,
page_object: *mut fpdf_pageobject_t__,
phase: c_float
) -> c_int
fn FPDFPageObj_GetDashCount(
&self,
page_object: *mut fpdf_pageobject_t__
) -> c_int
fn FPDFPageObj_GetDashArray(
&self,
page_object: *mut fpdf_pageobject_t__,
dash_array: *mut c_float,
dash_count: c_ulong
) -> c_int
fn FPDFPageObj_SetDashArray(
&self,
page_object: *mut fpdf_pageobject_t__,
dash_array: *const c_float,
dash_count: c_ulong,
phase: c_float
) -> c_int
fn FPDFFont_GetFontName(
&self,
font: *mut fpdf_font_t__,
buffer: *mut c_char,
length: c_ulong
) -> c_ulong
fn FPDFFont_GetFlags(&self, font: *mut fpdf_font_t__) -> c_int
fn FPDFFont_GetWeight(&self, font: *mut fpdf_font_t__) -> c_int
fn FPDFFont_GetAscent(
&self,
font: *mut fpdf_font_t__,
font_size: c_float,
ascent: *mut c_float
) -> c_int
fn FPDFFont_GetDescent(
&self,
font: *mut fpdf_font_t__,
font_size: c_float,
descent: *mut c_float
) -> c_int
fn FPDFFont_GetGlyphWidth(
&self,
font: *mut fpdf_font_t__,
glyph: c_uint,
font_size: c_float,
width: *mut c_float
) -> c_int
fn FPDFFont_GetGlyphPath(
&self,
font: *mut fpdf_font_t__,
glyph: c_uint,
font_size: c_float
) -> *const fpdf_glyphpath_t__
fn FPDFGlyphPath_CountGlyphSegments(
&self,
glyphpath: *const fpdf_glyphpath_t__
) -> c_int
fn FPDFGlyphPath_GetGlyphPathSegment(
&self,
glyphpath: *const fpdf_glyphpath_t__,
index: c_int
) -> *const fpdf_pathsegment_t
fn FPDF_VIEWERREF_GetPrintScaling(
&self,
document: *mut fpdf_document_t__
) -> c_int
fn FPDF_VIEWERREF_GetNumCopies(&self, document: *mut fpdf_document_t__) -> c_int
fn FPDF_VIEWERREF_GetPrintPageRange(
&self,
document: *mut fpdf_document_t__
) -> *mut fpdf_pagerange_t__
fn FPDF_VIEWERREF_GetPrintPageRangeCount(
&self,
pagerange: *mut fpdf_pagerange_t__
) -> c_ulong
fn FPDF_VIEWERREF_GetPrintPageRangeElement(
&self,
pagerange: *mut fpdf_pagerange_t__,
index: c_ulong
) -> c_int
fn FPDF_VIEWERREF_GetDuplex(&self, document: *mut fpdf_document_t__) -> c_uint
Provided Methods
Returns the canonical C-style boolean integer value 1, indicating true.
Returns the canonical C-style boolean integer value 0, indicating false.
Converts from a C-style boolean integer to a Rust bool.
Assumes PdfiumLibraryBindings::TRUE() indicates true and any other value indicates false.
fn bool_to_pdfium(&self, bool: bool) -> c_int
fn bool_to_pdfium(&self, bool: bool) -> c_int
Converts the given Rust bool into a Pdfium FPDF_BOOL.
fn get_pdfium_utf16le_bytes_from_str(&self, str: &str) -> Vec<u8>
fn get_pdfium_utf16le_bytes_from_str(&self, str: &str) -> Vec<u8>
Converts the given Rust &str into an UTF16-LE encoded byte buffer.
Converts the bytes in the given buffer from UTF16-LE to a standard Rust String.
fn get_handle_from_document(
&self,
document: &PdfDocument<'_>
) -> *mut fpdf_document_t__
fn get_handle_from_document(
&self,
document: &PdfDocument<'_>
) -> *mut fpdf_document_t__
Returns Pdfium’s internal FPDF_DOCUMENT handle for the given PdfDocument.
fn get_handle_from_page(&self, page: &PdfPage<'_>) -> *mut fpdf_page_t__
fn get_handle_from_page(&self, page: &PdfPage<'_>) -> *mut fpdf_page_t__
Returns Pdfium’s internal FPDF_PAGE handle for the given PdfPage.
fn get_handle_from_object(
&self,
object: &PdfPageObject<'_>
) -> *mut fpdf_pageobject_t__
fn get_handle_from_object(
&self,
object: &PdfPageObject<'_>
) -> *mut fpdf_pageobject_t__
Returns Pdfium’s internal FPDF_PAGEOBJECT handle for the given PdfPageObject.
Note that all calls to PdfiumLibraryBindings::FPDF_LoadMemDocument() are internally upgraded to PdfiumLibraryBindings::FPDF_LoadMemDocument64().
fn FPDF_ImportPagesByIndex_vec(
&self,
dest_doc: *mut fpdf_document_t__,
src_doc: *mut fpdf_document_t__,
page_indices: Vec<c_int>,
index: c_int
) -> c_int
fn FPDFBitmap_SetBuffer(
&self,
bitmap: *mut fpdf_bitmap_t__,
buffer: &[u8]
) -> bool
fn FPDFBitmap_SetBuffer(
&self,
bitmap: *mut fpdf_bitmap_t__,
buffer: &[u8]
) -> bool
This function is not part of the Pdfium API. It is provided by pdfium-render as an
alternative to directly mutating the data returned by
PdfiumLibraryBindings::FPDFBitmap_GetBuffer().
Replaces all pixel data for the given bitmap with the pixel data in the given buffer,
returning true once the new pixel data has been applied. If the given buffer
does not have the same length as the bitmap’s current buffer then the current buffer
will be unchanged and a value of false will be returned.
fn FPDFAnnot_SetStringValue_str(
&self,
annot: *mut fpdf_annotation_t__,
key: &str,
value: &str
) -> c_int
fn FPDFAnnot_SetAP_str(
&self,
annot: *mut fpdf_annotation_t__,
appearanceMode: c_int,
value: &str
) -> c_int
fn FPDFBookmark_Find_str(
&self,
document: *mut fpdf_document_t__,
title: &str
) -> *mut fpdf_bookmark_t__
fn FPDFText_SetText_str(
&self,
text_object: *mut fpdf_pageobject_t__,
text: &str
) -> c_int
fn get_pdfium_last_error(&self) -> Option<PdfiumInternalError>
fn get_pdfium_last_error(&self) -> Option<PdfiumInternalError>
Retrieves the error code of the last error, if any, recorded by the external Pdfium library and maps it to a PdfiumInternalError enum value.