From f679ff869c11c66c2b861350c2e2b80d02f7802d Mon Sep 17 00:00:00 2001 From: Mykola Pogodin Date: Fri, 3 Apr 2026 13:47:12 +0300 Subject: [PATCH 1/2] feat: expose PDF page indirect object number via EPDF_GetPageObjNum --- packages/engines/src/lib/pdfium/engine.ts | 12 +++++++++++- packages/models/src/pdf.ts | 15 +++++++++++++++ packages/pdfium/build/code/cpp/ext_api.h | 2 ++ packages/pdfium/build/code/cpp/main.cpp | 16 ++++++++++++++++ packages/pdfium/build/compile.esm.sh | 1 + packages/pdfium/build/compile.sh | 1 + packages/pdfium/src/vendor/functions.ts | 1 + packages/pdfium/src/vendor/pdfium.cjs | 3 ++- packages/pdfium/src/vendor/pdfium.js | 3 +++ 9 files changed, 52 insertions(+), 2 deletions(-) diff --git a/packages/engines/src/lib/pdfium/engine.ts b/packages/engines/src/lib/pdfium/engine.ts index 93de2a2cb..3f4436abb 100644 --- a/packages/engines/src/lib/pdfium/engine.ts +++ b/packages/engines/src/lib/pdfium/engine.ts @@ -385,13 +385,23 @@ export class PdfiumNative implements IPdfiumExecutor { const rotation = this.pdfiumModule.EPDF_GetPageRotationByIndex(docPtr, index) as Rotation; - const page = { + let objectNumber: number | undefined; + const epdfGetPageObjNum = this.pdfiumModule.EPDF_GetPageObjNum; + if (typeof epdfGetPageObjNum === 'function') { + const objNum = epdfGetPageObjNum(docPtr, index); + if (objNum > 0) { + objectNumber = objNum; + } + } + + const page: PdfPageObject = { index, size: { width: this.pdfiumModule.pdfium.getValue(sizePtr, 'float'), height: this.pdfiumModule.pdfium.getValue(sizePtr + 4, 'float'), }, rotation, + ...(objectNumber !== undefined ? { objectNumber } : {}), }; pages.push(page); diff --git a/packages/models/src/pdf.ts b/packages/models/src/pdf.ts index edbc01e1e..97b38a0bc 100644 --- a/packages/models/src/pdf.ts +++ b/packages/models/src/pdf.ts @@ -12,6 +12,21 @@ export interface PdfPageObject { */ index: number; + /** + * PDF page dictionary indirect object number. + * + * Populated by the engine at document open time when the underlying WASM + * build exports `EPDF_GetPageObjNum`. Undefined when that export is absent + * (e.g. older builds) or when the page dictionary has no valid object number. + * + * This value is stable across page reorder / insert / delete operations on + * the same file, making it suitable as a permanent page reference for + * annotations, citations, and similar features. + * + * @public + */ + objectNumber?: number; + /** * Orignal size of this page */ diff --git a/packages/pdfium/build/code/cpp/ext_api.h b/packages/pdfium/build/code/cpp/ext_api.h index e20f9a011..376aab502 100644 --- a/packages/pdfium/build/code/cpp/ext_api.h +++ b/packages/pdfium/build/code/cpp/ext_api.h @@ -21,6 +21,8 @@ void PDFiumExt_ExitFormFillEnvironment(void* formHandle); int PDFiumExt_SaveAsCopy(void* document, void* writer); +int EPDF_GetPageObjNum(void* document, int page_index); + #ifdef __cplusplus } #endif diff --git a/packages/pdfium/build/code/cpp/main.cpp b/packages/pdfium/build/code/cpp/main.cpp index 1686f0e1c..9cb68c216 100644 --- a/packages/pdfium/build/code/cpp/main.cpp +++ b/packages/pdfium/build/code/cpp/main.cpp @@ -3,6 +3,9 @@ #include #include "filewriter.h" #include "string.h" +#include "fpdfsdk/cpdfsdk_helpers.h" +#include "core/fpdfapi/parser/cpdf_document.h" +#include "core/fpdfapi/parser/cpdf_dictionary.h" #ifdef __cplusplus extern "C" @@ -23,6 +26,8 @@ extern "C" EMSCRIPTEN_KEEPALIVE int PDFiumExt_SaveAsCopy(void *document, void *writer); + EMSCRIPTEN_KEEPALIVE int EPDF_GetPageObjNum(FPDF_DOCUMENT document, int page_index); + #ifdef __cplusplus } #endif @@ -91,3 +96,14 @@ void PDFiumExt_ExitFormFillEnvironment(void *form_handle) { FPDFDOC_ExitFormFillEnvironment(static_cast(form_handle)); } + +int EPDF_GetPageObjNum(FPDF_DOCUMENT document, int page_index) +{ + CPDF_Document *pDoc = CPDFDocumentFromFPDFDocument(document); + if (!pDoc) + return -1; + RetainPtr pDict = pDoc->GetPageDictionary(page_index); + if (!pDict) + return -1; + return static_cast(pDict->GetObjNum()); +} diff --git a/packages/pdfium/build/compile.esm.sh b/packages/pdfium/build/compile.esm.sh index 97a09eebb..8f666aa69 100644 --- a/packages/pdfium/build/compile.esm.sh +++ b/packages/pdfium/build/compile.esm.sh @@ -14,6 +14,7 @@ em++ $(ls ./code/cpp/*.cpp) \ -sEXPORTED_FUNCTIONS=$(cat ./wasm/exported-functions.txt) \ -lpdfium \ -L/workspace/packages/pdfium/pdfium-src/out/wasm/obj \ + -I/workspace/packages/pdfium/pdfium-src \ -I/workspace/packages/pdfium/pdfium-src/public \ -std=c++11 \ -Wall \ diff --git a/packages/pdfium/build/compile.sh b/packages/pdfium/build/compile.sh index 7c87ce6d7..140338445 100644 --- a/packages/pdfium/build/compile.sh +++ b/packages/pdfium/build/compile.sh @@ -13,6 +13,7 @@ em++ $(ls ./code/cpp/*.cpp) \ -sEXPORTED_FUNCTIONS=$(cat ./wasm/exported-functions.txt) \ -lpdfium \ -L/workspace/packages/pdfium/pdfium-src/out/wasm/obj \ + -I/workspace/packages/pdfium/pdfium-src \ -I/workspace/packages/pdfium/pdfium-src/public \ -std=c++11 \ -Wall \ diff --git a/packages/pdfium/src/vendor/functions.ts b/packages/pdfium/src/vendor/functions.ts index ec0001605..18ae2f00e 100644 --- a/packages/pdfium/src/vendor/functions.ts +++ b/packages/pdfium/src/vendor/functions.ts @@ -7,6 +7,7 @@ export const functions = { ] as const, EPDF_GetMetaTrapped: [['number'] as const, 'number'] as const, EPDF_GetPageRotationByIndex: [['number', 'number'] as const, 'number'] as const, + EPDF_GetPageObjNum: [['number', 'number'] as const, 'number'] as const, EPDF_GetPageSizeByIndexNormalized: [['number', 'number', 'number'] as const, 'boolean'] as const, EPDF_HasMetaText: [['number', 'string'] as const, 'boolean'] as const, EPDF_IsEncrypted: [['number'] as const, 'boolean'] as const, diff --git a/packages/pdfium/src/vendor/pdfium.cjs b/packages/pdfium/src/vendor/pdfium.cjs index 67c040674..3cdca2973 100644 --- a/packages/pdfium/src/vendor/pdfium.cjs +++ b/packages/pdfium/src/vendor/pdfium.cjs @@ -28,7 +28,7 @@ var readyPromise = new Promise((resolve, reject) => { readyPromiseResolve = resolve; readyPromiseReject = reject; }); -["_EPDF_GetMetaKeyCount","_EPDF_GetMetaKeyName","_EPDF_GetMetaTrapped","_EPDF_GetPageRotationByIndex","_EPDF_GetPageSizeByIndexNormalized","_EPDF_HasMetaText","_EPDF_IsEncrypted","_EPDF_IsOwnerUnlocked","_EPDF_LoadPageNormalized","_EPDF_PNG_EncodeRGBA","_EPDF_RemoveEncryption","_EPDF_RenderAnnotBitmap","_EPDF_RenderAnnotBitmapUnrotated","_EPDF_SetEncryption","_EPDF_SetMetaText","_EPDF_SetMetaTrapped","_EPDF_UnlockOwnerPermissions","_EPDFAction_CreateGoTo","_EPDFAction_CreateGoToNamed","_EPDFAction_CreateLaunch","_EPDFAction_CreateRemoteGoToByName","_EPDFAction_CreateRemoteGoToDest","_EPDFAction_CreateURI","_EPDFAnnot_ApplyRedaction","_EPDFAnnot_ClearBorderEffect","_EPDFAnnot_ClearColor","_EPDFAnnot_ClearMKColor","_EPDFAnnot_ClearRectangleDifferences","_EPDFAnnot_ExportAppearanceAsDocument","_EPDFAnnot_ExportMultipleAppearancesAsDocument","_EPDFAnnot_Flatten","_EPDFAnnot_GenerateAppearance","_EPDFAnnot_GenerateAppearanceWithBlend","_EPDFAnnot_GenerateFormFieldAP","_EPDFAnnot_GetAPMatrix","_EPDFAnnot_GetAvailableAppearanceModes","_EPDFAnnot_GetBlendMode","_EPDFAnnot_GetBorderDashPattern","_EPDFAnnot_GetBorderDashPatternCount","_EPDFAnnot_GetBorderEffect","_EPDFAnnot_GetBorderStyle","_EPDFAnnot_GetButtonExportValue","_EPDFAnnot_GetColor","_EPDFAnnot_GetDefaultAppearance","_EPDFAnnot_GetExtendedRotation","_EPDFAnnot_GetFormFieldObjectNumber","_EPDFAnnot_GetFormFieldRawValue","_EPDFAnnot_GetIntent","_EPDFAnnot_GetLineEndings","_EPDFAnnot_GetMKColor","_EPDFAnnot_GetName","_EPDFAnnot_GetOpacity","_EPDFAnnot_GetOverlayText","_EPDFAnnot_GetOverlayTextRepeat","_EPDFAnnot_GetRect","_EPDFAnnot_GetRectangleDifferences","_EPDFAnnot_GetReplyType","_EPDFAnnot_GetRichContent","_EPDFAnnot_GetRotate","_EPDFAnnot_GetTextAlignment","_EPDFAnnot_GetUnrotatedRect","_EPDFAnnot_GetVerticalAlignment","_EPDFAnnot_HasAppearanceStream","_EPDFAnnot_SetAction","_EPDFAnnot_SetAPMatrix","_EPDFAnnot_SetAppearanceFromPage","_EPDFAnnot_SetBorderDashPattern","_EPDFAnnot_SetBorderEffect","_EPDFAnnot_SetBorderStyle","_EPDFAnnot_SetColor","_EPDFAnnot_SetDefaultAppearance","_EPDFAnnot_SetExtendedRotation","_EPDFAnnot_SetFormFieldName","_EPDFAnnot_SetFormFieldOptions","_EPDFAnnot_SetFormFieldValue","_EPDFAnnot_SetIntent","_EPDFAnnot_SetLine","_EPDFAnnot_SetLineEndings","_EPDFAnnot_SetLinkedAnnot","_EPDFAnnot_SetMKColor","_EPDFAnnot_SetName","_EPDFAnnot_SetNumberValue","_EPDFAnnot_SetOpacity","_EPDFAnnot_SetOverlayText","_EPDFAnnot_SetOverlayTextRepeat","_EPDFAnnot_SetRectangleDifferences","_EPDFAnnot_SetReplyType","_EPDFAnnot_SetRotate","_EPDFAnnot_SetTextAlignment","_EPDFAnnot_SetUnrotatedRect","_EPDFAnnot_SetVerticalAlignment","_EPDFAnnot_SetVertices","_EPDFAnnot_ShareFormField","_EPDFAnnot_UpdateAppearanceToRect","_EPDFAttachment_GetDescription","_EPDFAttachment_GetIntegerValue","_EPDFAttachment_SetDescription","_EPDFAttachment_SetSubtype","_EPDFBookmark_AppendChild","_EPDFBookmark_Clear","_EPDFBookmark_ClearTarget","_EPDFBookmark_Create","_EPDFBookmark_Delete","_EPDFBookmark_InsertAfter","_EPDFBookmark_SetAction","_EPDFBookmark_SetDest","_EPDFBookmark_SetTitle","_EPDFCatalog_GetLanguage","_EPDFDest_CreateRemoteView","_EPDFDest_CreateRemoteXYZ","_EPDFDest_CreateView","_EPDFDest_CreateXYZ","_EPDFImageObj_SetJpeg","_EPDFImageObj_SetPng","_EPDFNamedDest_Remove","_EPDFNamedDest_SetDest","_EPDFPage_ApplyRedactions","_EPDFPage_CreateAnnot","_EPDFPage_CreateFormField","_EPDFPage_GetAnnotByName","_EPDFPage_GetAnnotCountRaw","_EPDFPage_GetAnnotRaw","_EPDFPage_RemoveAnnotByName","_EPDFPage_RemoveAnnotRaw","_EPDFText_RedactInQuads","_EPDFText_RedactInRect","_FORM_CanRedo","_FORM_CanUndo","_FORM_DoDocumentAAction","_FORM_DoDocumentJSAction","_FORM_DoDocumentOpenAction","_FORM_DoPageAAction","_FORM_ForceToKillFocus","_FORM_GetFocusedAnnot","_FORM_GetFocusedText","_FORM_GetSelectedText","_FORM_IsIndexSelected","_FORM_OnAfterLoadPage","_FORM_OnBeforeClosePage","_FORM_OnChar","_FORM_OnFocus","_FORM_OnKeyDown","_FORM_OnKeyUp","_FORM_OnLButtonDoubleClick","_FORM_OnLButtonDown","_FORM_OnLButtonUp","_FORM_OnMouseMove","_FORM_OnMouseWheel","_FORM_OnRButtonDown","_FORM_OnRButtonUp","_FORM_Redo","_FORM_ReplaceAndKeepSelection","_FORM_ReplaceSelection","_FORM_SelectAllText","_FORM_SetFocusedAnnot","_FORM_SetIndexSelected","_FORM_Undo","_FPDF_AddInstalledFont","_FPDF_CloseDocument","_FPDF_ClosePage","_FPDF_CloseXObject","_FPDF_CopyViewerPreferences","_FPDF_CountNamedDests","_FPDF_CreateClipPath","_FPDF_CreateNewDocument","_FPDF_DestroyClipPath","_FPDF_DestroyLibrary","_FPDF_DeviceToPage","_FPDF_DocumentHasValidCrossReferenceTable","_FPDF_FFLDraw","_FPDF_FreeDefaultSystemFontInfo","_FPDF_GetDefaultSystemFontInfo","_FPDF_GetDefaultTTFMap","_FPDF_GetDefaultTTFMapCount","_FPDF_GetDefaultTTFMapEntry","_FPDF_GetDocPermissions","_FPDF_GetDocUserPermissions","_FPDF_GetFileIdentifier","_FPDF_GetFileVersion","_FPDF_GetFormType","_FPDF_GetLastError","_FPDF_GetMetaText","_FPDF_GetNamedDest","_FPDF_GetNamedDestByName","_FPDF_GetPageAAction","_FPDF_GetPageBoundingBox","_FPDF_GetPageCount","_FPDF_GetPageHeight","_FPDF_GetPageHeightF","_FPDF_GetPageLabel","_FPDF_GetPageSizeByIndex","_FPDF_GetPageSizeByIndexF","_FPDF_GetPageWidth","_FPDF_GetPageWidthF","_FPDF_GetSecurityHandlerRevision","_FPDF_GetSignatureCount","_FPDF_GetSignatureObject","_FPDF_GetTrailerEnds","_FPDF_GetXFAPacketContent","_FPDF_GetXFAPacketCount","_FPDF_GetXFAPacketName","_FPDF_ImportNPagesToOne","_FPDF_ImportPages","_FPDF_ImportPagesByIndex","_FPDF_InitLibrary","_FPDF_InitLibraryWithConfig","_FPDF_LoadCustomDocument","_FPDF_LoadDocument","_FPDF_LoadMemDocument","_FPDF_LoadMemDocument64","_FPDF_LoadPage","_FPDF_LoadXFA","_FPDF_MovePages","_FPDF_NewFormObjectFromXObject","_FPDF_NewXObjectFromPage","_FPDF_PageToDevice","_FPDF_RemoveFormFieldHighlight","_FPDF_RenderPage_Close","_FPDF_RenderPage_Continue","_FPDF_RenderPageBitmap","_FPDF_RenderPageBitmap_Start","_FPDF_RenderPageBitmapWithColorScheme_Start","_FPDF_RenderPageBitmapWithMatrix","_FPDF_SaveAsCopy","_FPDF_SaveWithVersion","_FPDF_SetFormFieldHighlightAlpha","_FPDF_SetFormFieldHighlightColor","_FPDF_SetSandBoxPolicy","_FPDF_SetSystemFontInfo","_FPDF_StructElement_Attr_CountChildren","_FPDF_StructElement_Attr_GetBlobValue","_FPDF_StructElement_Attr_GetBooleanValue","_FPDF_StructElement_Attr_GetChildAtIndex","_FPDF_StructElement_Attr_GetCount","_FPDF_StructElement_Attr_GetName","_FPDF_StructElement_Attr_GetNumberValue","_FPDF_StructElement_Attr_GetStringValue","_FPDF_StructElement_Attr_GetType","_FPDF_StructElement_Attr_GetValue","_FPDF_StructElement_CountChildren","_FPDF_StructElement_GetActualText","_FPDF_StructElement_GetAltText","_FPDF_StructElement_GetAttributeAtIndex","_FPDF_StructElement_GetAttributeCount","_FPDF_StructElement_GetChildAtIndex","_FPDF_StructElement_GetChildMarkedContentID","_FPDF_StructElement_GetID","_FPDF_StructElement_GetLang","_FPDF_StructElement_GetMarkedContentID","_FPDF_StructElement_GetMarkedContentIdAtIndex","_FPDF_StructElement_GetMarkedContentIdCount","_FPDF_StructElement_GetObjType","_FPDF_StructElement_GetParent","_FPDF_StructElement_GetStringAttribute","_FPDF_StructElement_GetTitle","_FPDF_StructElement_GetType","_FPDF_StructTree_Close","_FPDF_StructTree_CountChildren","_FPDF_StructTree_GetChildAtIndex","_FPDF_StructTree_GetForPage","_FPDF_VIEWERREF_GetDuplex","_FPDF_VIEWERREF_GetName","_FPDF_VIEWERREF_GetNumCopies","_FPDF_VIEWERREF_GetPrintPageRange","_FPDF_VIEWERREF_GetPrintPageRangeCount","_FPDF_VIEWERREF_GetPrintPageRangeElement","_FPDF_VIEWERREF_GetPrintScaling","_FPDFAction_GetDest","_FPDFAction_GetFilePath","_FPDFAction_GetType","_FPDFAction_GetURIPath","_FPDFAnnot_AddFileAttachment","_FPDFAnnot_AddInkStroke","_FPDFAnnot_AppendAttachmentPoints","_FPDFAnnot_AppendObject","_FPDFAnnot_CountAttachmentPoints","_FPDFAnnot_GetAP","_FPDFAnnot_GetAttachmentPoints","_FPDFAnnot_GetBorder","_FPDFAnnot_GetColor","_FPDFAnnot_GetFileAttachment","_FPDFAnnot_GetFlags","_FPDFAnnot_GetFocusableSubtypes","_FPDFAnnot_GetFocusableSubtypesCount","_FPDFAnnot_GetFontColor","_FPDFAnnot_GetFontSize","_FPDFAnnot_GetFormAdditionalActionJavaScript","_FPDFAnnot_GetFormControlCount","_FPDFAnnot_GetFormControlIndex","_FPDFAnnot_GetFormFieldAlternateName","_FPDFAnnot_GetFormFieldAtPoint","_FPDFAnnot_GetFormFieldExportValue","_FPDFAnnot_GetFormFieldFlags","_FPDFAnnot_GetFormFieldName","_FPDFAnnot_GetFormFieldType","_FPDFAnnot_GetFormFieldValue","_FPDFAnnot_GetInkListCount","_FPDFAnnot_GetInkListPath","_FPDFAnnot_GetLine","_FPDFAnnot_GetLink","_FPDFAnnot_GetLinkedAnnot","_FPDFAnnot_GetNumberValue","_FPDFAnnot_GetObject","_FPDFAnnot_GetObjectCount","_FPDFAnnot_GetOptionCount","_FPDFAnnot_GetOptionLabel","_FPDFAnnot_GetRect","_FPDFAnnot_GetStringValue","_FPDFAnnot_GetSubtype","_FPDFAnnot_GetValueType","_FPDFAnnot_GetVertices","_FPDFAnnot_HasAttachmentPoints","_FPDFAnnot_HasKey","_FPDFAnnot_IsChecked","_FPDFAnnot_IsObjectSupportedSubtype","_FPDFAnnot_IsOptionSelected","_FPDFAnnot_IsSupportedSubtype","_FPDFAnnot_RemoveInkList","_FPDFAnnot_RemoveObject","_FPDFAnnot_SetAP","_FPDFAnnot_SetAttachmentPoints","_FPDFAnnot_SetBorder","_FPDFAnnot_SetColor","_FPDFAnnot_SetFlags","_FPDFAnnot_SetFocusableSubtypes","_FPDFAnnot_SetFontColor","_FPDFAnnot_SetFormFieldFlags","_FPDFAnnot_SetRect","_FPDFAnnot_SetStringValue","_FPDFAnnot_SetURI","_FPDFAnnot_UpdateObject","_FPDFAttachment_GetFile","_FPDFAttachment_GetName","_FPDFAttachment_GetStringValue","_FPDFAttachment_GetSubtype","_FPDFAttachment_GetValueType","_FPDFAttachment_HasKey","_FPDFAttachment_SetFile","_FPDFAttachment_SetStringValue","_FPDFAvail_Create","_FPDFAvail_Destroy","_FPDFAvail_GetDocument","_FPDFAvail_GetFirstPageNum","_FPDFAvail_IsDocAvail","_FPDFAvail_IsFormAvail","_FPDFAvail_IsLinearized","_FPDFAvail_IsPageAvail","_FPDFBitmap_Create","_FPDFBitmap_CreateEx","_FPDFBitmap_Destroy","_FPDFBitmap_FillRect","_FPDFBitmap_GetBuffer","_FPDFBitmap_GetFormat","_FPDFBitmap_GetHeight","_FPDFBitmap_GetStride","_FPDFBitmap_GetWidth","_FPDFBookmark_Find","_FPDFBookmark_GetAction","_FPDFBookmark_GetCount","_FPDFBookmark_GetDest","_FPDFBookmark_GetFirstChild","_FPDFBookmark_GetNextSibling","_FPDFBookmark_GetTitle","_FPDFCatalog_GetLanguage","_FPDFCatalog_IsTagged","_FPDFCatalog_SetLanguage","_FPDFClipPath_CountPaths","_FPDFClipPath_CountPathSegments","_FPDFClipPath_GetPathSegment","_FPDFDest_GetDestPageIndex","_FPDFDest_GetLocationInPage","_FPDFDest_GetView","_FPDFDoc_AddAttachment","_FPDFDoc_CloseJavaScriptAction","_FPDFDoc_DeleteAttachment","_FPDFDOC_ExitFormFillEnvironment","_FPDFDoc_GetAttachment","_FPDFDoc_GetAttachmentCount","_FPDFDoc_GetJavaScriptAction","_FPDFDoc_GetJavaScriptActionCount","_FPDFDoc_GetPageMode","_FPDFDOC_InitFormFillEnvironment","_FPDFFont_Close","_FPDFFont_GetAscent","_FPDFFont_GetBaseFontName","_FPDFFont_GetDescent","_FPDFFont_GetFamilyName","_FPDFFont_GetFlags","_FPDFFont_GetFontData","_FPDFFont_GetGlyphPath","_FPDFFont_GetGlyphWidth","_FPDFFont_GetIsEmbedded","_FPDFFont_GetItalicAngle","_FPDFFont_GetWeight","_FPDFFormObj_CountObjects","_FPDFFormObj_GetObject","_FPDFFormObj_RemoveObject","_FPDFGlyphPath_CountGlyphSegments","_FPDFGlyphPath_GetGlyphPathSegment","_FPDFImageObj_GetBitmap","_FPDFImageObj_GetIccProfileDataDecoded","_FPDFImageObj_GetImageDataDecoded","_FPDFImageObj_GetImageDataRaw","_FPDFImageObj_GetImageFilter","_FPDFImageObj_GetImageFilterCount","_FPDFImageObj_GetImageMetadata","_FPDFImageObj_GetImagePixelSize","_FPDFImageObj_GetRenderedBitmap","_FPDFImageObj_LoadJpegFile","_FPDFImageObj_LoadJpegFileInline","_FPDFImageObj_SetBitmap","_FPDFImageObj_SetMatrix","_FPDFJavaScriptAction_GetName","_FPDFJavaScriptAction_GetScript","_FPDFLink_CloseWebLinks","_FPDFLink_CountQuadPoints","_FPDFLink_CountRects","_FPDFLink_CountWebLinks","_FPDFLink_Enumerate","_FPDFLink_GetAction","_FPDFLink_GetAnnot","_FPDFLink_GetAnnotRect","_FPDFLink_GetDest","_FPDFLink_GetLinkAtPoint","_FPDFLink_GetLinkZOrderAtPoint","_FPDFLink_GetQuadPoints","_FPDFLink_GetRect","_FPDFLink_GetTextRange","_FPDFLink_GetURL","_FPDFLink_LoadWebLinks","_FPDFPage_CloseAnnot","_FPDFPage_CountObjects","_FPDFPage_CreateAnnot","_FPDFPage_Delete","_FPDFPage_Flatten","_FPDFPage_FormFieldZOrderAtPoint","_FPDFPage_GenerateContent","_FPDFPage_GetAnnot","_FPDFPage_GetAnnotCount","_FPDFPage_GetAnnotIndex","_FPDFPage_GetArtBox","_FPDFPage_GetBleedBox","_FPDFPage_GetCropBox","_FPDFPage_GetDecodedThumbnailData","_FPDFPage_GetMediaBox","_FPDFPage_GetObject","_FPDFPage_GetRawThumbnailData","_FPDFPage_GetRotation","_FPDFPage_GetThumbnailAsBitmap","_FPDFPage_GetTrimBox","_FPDFPage_HasFormFieldAtPoint","_FPDFPage_HasTransparency","_FPDFPage_InsertClipPath","_FPDFPage_InsertObject","_FPDFPage_InsertObjectAtIndex","_FPDFPage_New","_FPDFPage_RemoveAnnot","_FPDFPage_RemoveObject","_FPDFPage_SetArtBox","_FPDFPage_SetBleedBox","_FPDFPage_SetCropBox","_FPDFPage_SetMediaBox","_FPDFPage_SetRotation","_FPDFPage_SetTrimBox","_FPDFPage_TransformAnnots","_FPDFPage_TransFormWithClip","_FPDFPageObj_AddMark","_FPDFPageObj_CountMarks","_FPDFPageObj_CreateNewPath","_FPDFPageObj_CreateNewRect","_FPDFPageObj_CreateTextObj","_FPDFPageObj_Destroy","_FPDFPageObj_GetBounds","_FPDFPageObj_GetClipPath","_FPDFPageObj_GetDashArray","_FPDFPageObj_GetDashCount","_FPDFPageObj_GetDashPhase","_FPDFPageObj_GetFillColor","_FPDFPageObj_GetIsActive","_FPDFPageObj_GetLineCap","_FPDFPageObj_GetLineJoin","_FPDFPageObj_GetMark","_FPDFPageObj_GetMarkedContentID","_FPDFPageObj_GetMatrix","_FPDFPageObj_GetRotatedBounds","_FPDFPageObj_GetStrokeColor","_FPDFPageObj_GetStrokeWidth","_FPDFPageObj_GetType","_FPDFPageObj_HasTransparency","_FPDFPageObj_NewImageObj","_FPDFPageObj_NewTextObj","_FPDFPageObj_RemoveMark","_FPDFPageObj_SetBlendMode","_FPDFPageObj_SetDashArray","_FPDFPageObj_SetDashPhase","_FPDFPageObj_SetFillColor","_FPDFPageObj_SetIsActive","_FPDFPageObj_SetLineCap","_FPDFPageObj_SetLineJoin","_FPDFPageObj_SetMatrix","_FPDFPageObj_SetStrokeColor","_FPDFPageObj_SetStrokeWidth","_FPDFPageObj_Transform","_FPDFPageObj_TransformClipPath","_FPDFPageObj_TransformF","_FPDFPageObjMark_CountParams","_FPDFPageObjMark_GetName","_FPDFPageObjMark_GetParamBlobValue","_FPDFPageObjMark_GetParamFloatValue","_FPDFPageObjMark_GetParamIntValue","_FPDFPageObjMark_GetParamKey","_FPDFPageObjMark_GetParamStringValue","_FPDFPageObjMark_GetParamValueType","_FPDFPageObjMark_RemoveParam","_FPDFPageObjMark_SetBlobParam","_FPDFPageObjMark_SetFloatParam","_FPDFPageObjMark_SetIntParam","_FPDFPageObjMark_SetStringParam","_FPDFPath_BezierTo","_FPDFPath_Close","_FPDFPath_CountSegments","_FPDFPath_GetDrawMode","_FPDFPath_GetPathSegment","_FPDFPath_LineTo","_FPDFPath_MoveTo","_FPDFPath_SetDrawMode","_FPDFPathSegment_GetClose","_FPDFPathSegment_GetPoint","_FPDFPathSegment_GetType","_FPDFSignatureObj_GetByteRange","_FPDFSignatureObj_GetContents","_FPDFSignatureObj_GetDocMDPPermission","_FPDFSignatureObj_GetReason","_FPDFSignatureObj_GetSubFilter","_FPDFSignatureObj_GetTime","_FPDFText_ClosePage","_FPDFText_CountChars","_FPDFText_CountRects","_FPDFText_FindClose","_FPDFText_FindNext","_FPDFText_FindPrev","_FPDFText_FindStart","_FPDFText_GetBoundedText","_FPDFText_GetCharAngle","_FPDFText_GetCharBox","_FPDFText_GetCharIndexAtPos","_FPDFText_GetCharIndexFromTextIndex","_FPDFText_GetCharOrigin","_FPDFText_GetFillColor","_FPDFText_GetFontInfo","_FPDFText_GetFontSize","_FPDFText_GetFontWeight","_FPDFText_GetLooseCharBox","_FPDFText_GetMatrix","_FPDFText_GetRect","_FPDFText_GetSchCount","_FPDFText_GetSchResultIndex","_FPDFText_GetStrokeColor","_FPDFText_GetText","_FPDFText_GetTextIndexFromCharIndex","_FPDFText_GetTextObject","_FPDFText_GetUnicode","_FPDFText_HasUnicodeMapError","_FPDFText_IsGenerated","_FPDFText_IsHyphen","_FPDFText_LoadCidType2Font","_FPDFText_LoadFont","_FPDFText_LoadPage","_FPDFText_LoadStandardFont","_FPDFText_SetCharcodes","_FPDFText_SetText","_FPDFTextObj_GetFont","_FPDFTextObj_GetFontSize","_FPDFTextObj_GetRenderedBitmap","_FPDFTextObj_GetText","_FPDFTextObj_GetTextRenderMode","_FPDFTextObj_SetTextRenderMode","_PDFiumExt_CloseFileWriter","_PDFiumExt_CloseFormFillInfo","_PDFiumExt_ExitFormFillEnvironment","_PDFiumExt_GetFileWriterData","_PDFiumExt_GetFileWriterSize","_PDFiumExt_Init","_PDFiumExt_InitFormFillEnvironment","_PDFiumExt_OpenFileWriter","_PDFiumExt_OpenFormFillInfo","_PDFiumExt_SaveAsCopy","_malloc","_free","_memory","___indirect_function_table","onRuntimeInitialized"].forEach((prop) => { +["_EPDF_GetMetaKeyCount","_EPDF_GetMetaKeyName","_EPDF_GetMetaTrapped","_EPDF_GetPageObjNum","_EPDF_GetPageRotationByIndex","_EPDF_GetPageSizeByIndexNormalized","_EPDF_HasMetaText","_EPDF_IsEncrypted","_EPDF_IsOwnerUnlocked","_EPDF_LoadPageNormalized","_EPDF_PNG_EncodeRGBA","_EPDF_RemoveEncryption","_EPDF_RenderAnnotBitmap","_EPDF_RenderAnnotBitmapUnrotated","_EPDF_SetEncryption","_EPDF_SetMetaText","_EPDF_SetMetaTrapped","_EPDF_UnlockOwnerPermissions","_EPDFAction_CreateGoTo","_EPDFAction_CreateGoToNamed","_EPDFAction_CreateLaunch","_EPDFAction_CreateRemoteGoToByName","_EPDFAction_CreateRemoteGoToDest","_EPDFAction_CreateURI","_EPDFAnnot_ApplyRedaction","_EPDFAnnot_ClearBorderEffect","_EPDFAnnot_ClearColor","_EPDFAnnot_ClearMKColor","_EPDFAnnot_ClearRectangleDifferences","_EPDFAnnot_ExportAppearanceAsDocument","_EPDFAnnot_ExportMultipleAppearancesAsDocument","_EPDFAnnot_Flatten","_EPDFAnnot_GenerateAppearance","_EPDFAnnot_GenerateAppearanceWithBlend","_EPDFAnnot_GenerateFormFieldAP","_EPDFAnnot_GetAPMatrix","_EPDFAnnot_GetAvailableAppearanceModes","_EPDFAnnot_GetBlendMode","_EPDFAnnot_GetBorderDashPattern","_EPDFAnnot_GetBorderDashPatternCount","_EPDFAnnot_GetBorderEffect","_EPDFAnnot_GetBorderStyle","_EPDFAnnot_GetButtonExportValue","_EPDFAnnot_GetColor","_EPDFAnnot_GetDefaultAppearance","_EPDFAnnot_GetExtendedRotation","_EPDFAnnot_GetFormFieldObjectNumber","_EPDFAnnot_GetFormFieldRawValue","_EPDFAnnot_GetIntent","_EPDFAnnot_GetLineEndings","_EPDFAnnot_GetMKColor","_EPDFAnnot_GetName","_EPDFAnnot_GetOpacity","_EPDFAnnot_GetOverlayText","_EPDFAnnot_GetOverlayTextRepeat","_EPDFAnnot_GetRect","_EPDFAnnot_GetRectangleDifferences","_EPDFAnnot_GetReplyType","_EPDFAnnot_GetRichContent","_EPDFAnnot_GetRotate","_EPDFAnnot_GetTextAlignment","_EPDFAnnot_GetUnrotatedRect","_EPDFAnnot_GetVerticalAlignment","_EPDFAnnot_HasAppearanceStream","_EPDFAnnot_SetAction","_EPDFAnnot_SetAPMatrix","_EPDFAnnot_SetAppearanceFromPage","_EPDFAnnot_SetBorderDashPattern","_EPDFAnnot_SetBorderEffect","_EPDFAnnot_SetBorderStyle","_EPDFAnnot_SetColor","_EPDFAnnot_SetDefaultAppearance","_EPDFAnnot_SetExtendedRotation","_EPDFAnnot_SetFormFieldName","_EPDFAnnot_SetFormFieldOptions","_EPDFAnnot_SetFormFieldValue","_EPDFAnnot_SetIntent","_EPDFAnnot_SetLine","_EPDFAnnot_SetLineEndings","_EPDFAnnot_SetLinkedAnnot","_EPDFAnnot_SetMKColor","_EPDFAnnot_SetName","_EPDFAnnot_SetNumberValue","_EPDFAnnot_SetOpacity","_EPDFAnnot_SetOverlayText","_EPDFAnnot_SetOverlayTextRepeat","_EPDFAnnot_SetRectangleDifferences","_EPDFAnnot_SetReplyType","_EPDFAnnot_SetRotate","_EPDFAnnot_SetTextAlignment","_EPDFAnnot_SetUnrotatedRect","_EPDFAnnot_SetVerticalAlignment","_EPDFAnnot_SetVertices","_EPDFAnnot_ShareFormField","_EPDFAnnot_UpdateAppearanceToRect","_EPDFAttachment_GetDescription","_EPDFAttachment_GetIntegerValue","_EPDFAttachment_SetDescription","_EPDFAttachment_SetSubtype","_EPDFBookmark_AppendChild","_EPDFBookmark_Clear","_EPDFBookmark_ClearTarget","_EPDFBookmark_Create","_EPDFBookmark_Delete","_EPDFBookmark_InsertAfter","_EPDFBookmark_SetAction","_EPDFBookmark_SetDest","_EPDFBookmark_SetTitle","_EPDFCatalog_GetLanguage","_EPDFDest_CreateRemoteView","_EPDFDest_CreateRemoteXYZ","_EPDFDest_CreateView","_EPDFDest_CreateXYZ","_EPDFImageObj_SetJpeg","_EPDFImageObj_SetPng","_EPDFNamedDest_Remove","_EPDFNamedDest_SetDest","_EPDFPage_ApplyRedactions","_EPDFPage_CreateAnnot","_EPDFPage_CreateFormField","_EPDFPage_GetAnnotByName","_EPDFPage_GetAnnotCountRaw","_EPDFPage_GetAnnotRaw","_EPDFPage_RemoveAnnotByName","_EPDFPage_RemoveAnnotRaw","_EPDFText_RedactInQuads","_EPDFText_RedactInRect","_FORM_CanRedo","_FORM_CanUndo","_FORM_DoDocumentAAction","_FORM_DoDocumentJSAction","_FORM_DoDocumentOpenAction","_FORM_DoPageAAction","_FORM_ForceToKillFocus","_FORM_GetFocusedAnnot","_FORM_GetFocusedText","_FORM_GetSelectedText","_FORM_IsIndexSelected","_FORM_OnAfterLoadPage","_FORM_OnBeforeClosePage","_FORM_OnChar","_FORM_OnFocus","_FORM_OnKeyDown","_FORM_OnKeyUp","_FORM_OnLButtonDoubleClick","_FORM_OnLButtonDown","_FORM_OnLButtonUp","_FORM_OnMouseMove","_FORM_OnMouseWheel","_FORM_OnRButtonDown","_FORM_OnRButtonUp","_FORM_Redo","_FORM_ReplaceAndKeepSelection","_FORM_ReplaceSelection","_FORM_SelectAllText","_FORM_SetFocusedAnnot","_FORM_SetIndexSelected","_FORM_Undo","_FPDF_AddInstalledFont","_FPDF_CloseDocument","_FPDF_ClosePage","_FPDF_CloseXObject","_FPDF_CopyViewerPreferences","_FPDF_CountNamedDests","_FPDF_CreateClipPath","_FPDF_CreateNewDocument","_FPDF_DestroyClipPath","_FPDF_DestroyLibrary","_FPDF_DeviceToPage","_FPDF_DocumentHasValidCrossReferenceTable","_FPDF_FFLDraw","_FPDF_FreeDefaultSystemFontInfo","_FPDF_GetDefaultSystemFontInfo","_FPDF_GetDefaultTTFMap","_FPDF_GetDefaultTTFMapCount","_FPDF_GetDefaultTTFMapEntry","_FPDF_GetDocPermissions","_FPDF_GetDocUserPermissions","_FPDF_GetFileIdentifier","_FPDF_GetFileVersion","_FPDF_GetFormType","_FPDF_GetLastError","_FPDF_GetMetaText","_FPDF_GetNamedDest","_FPDF_GetNamedDestByName","_FPDF_GetPageAAction","_FPDF_GetPageBoundingBox","_FPDF_GetPageCount","_FPDF_GetPageHeight","_FPDF_GetPageHeightF","_FPDF_GetPageLabel","_FPDF_GetPageSizeByIndex","_FPDF_GetPageSizeByIndexF","_FPDF_GetPageWidth","_FPDF_GetPageWidthF","_FPDF_GetSecurityHandlerRevision","_FPDF_GetSignatureCount","_FPDF_GetSignatureObject","_FPDF_GetTrailerEnds","_FPDF_GetXFAPacketContent","_FPDF_GetXFAPacketCount","_FPDF_GetXFAPacketName","_FPDF_ImportNPagesToOne","_FPDF_ImportPages","_FPDF_ImportPagesByIndex","_FPDF_InitLibrary","_FPDF_InitLibraryWithConfig","_FPDF_LoadCustomDocument","_FPDF_LoadDocument","_FPDF_LoadMemDocument","_FPDF_LoadMemDocument64","_FPDF_LoadPage","_FPDF_LoadXFA","_FPDF_MovePages","_FPDF_NewFormObjectFromXObject","_FPDF_NewXObjectFromPage","_FPDF_PageToDevice","_FPDF_RemoveFormFieldHighlight","_FPDF_RenderPage_Close","_FPDF_RenderPage_Continue","_FPDF_RenderPageBitmap","_FPDF_RenderPageBitmap_Start","_FPDF_RenderPageBitmapWithColorScheme_Start","_FPDF_RenderPageBitmapWithMatrix","_FPDF_SaveAsCopy","_FPDF_SaveWithVersion","_FPDF_SetFormFieldHighlightAlpha","_FPDF_SetFormFieldHighlightColor","_FPDF_SetSandBoxPolicy","_FPDF_SetSystemFontInfo","_FPDF_StructElement_Attr_CountChildren","_FPDF_StructElement_Attr_GetBlobValue","_FPDF_StructElement_Attr_GetBooleanValue","_FPDF_StructElement_Attr_GetChildAtIndex","_FPDF_StructElement_Attr_GetCount","_FPDF_StructElement_Attr_GetName","_FPDF_StructElement_Attr_GetNumberValue","_FPDF_StructElement_Attr_GetStringValue","_FPDF_StructElement_Attr_GetType","_FPDF_StructElement_Attr_GetValue","_FPDF_StructElement_CountChildren","_FPDF_StructElement_GetActualText","_FPDF_StructElement_GetAltText","_FPDF_StructElement_GetAttributeAtIndex","_FPDF_StructElement_GetAttributeCount","_FPDF_StructElement_GetChildAtIndex","_FPDF_StructElement_GetChildMarkedContentID","_FPDF_StructElement_GetID","_FPDF_StructElement_GetLang","_FPDF_StructElement_GetMarkedContentID","_FPDF_StructElement_GetMarkedContentIdAtIndex","_FPDF_StructElement_GetMarkedContentIdCount","_FPDF_StructElement_GetObjType","_FPDF_StructElement_GetParent","_FPDF_StructElement_GetStringAttribute","_FPDF_StructElement_GetTitle","_FPDF_StructElement_GetType","_FPDF_StructTree_Close","_FPDF_StructTree_CountChildren","_FPDF_StructTree_GetChildAtIndex","_FPDF_StructTree_GetForPage","_FPDF_VIEWERREF_GetDuplex","_FPDF_VIEWERREF_GetName","_FPDF_VIEWERREF_GetNumCopies","_FPDF_VIEWERREF_GetPrintPageRange","_FPDF_VIEWERREF_GetPrintPageRangeCount","_FPDF_VIEWERREF_GetPrintPageRangeElement","_FPDF_VIEWERREF_GetPrintScaling","_FPDFAction_GetDest","_FPDFAction_GetFilePath","_FPDFAction_GetType","_FPDFAction_GetURIPath","_FPDFAnnot_AddFileAttachment","_FPDFAnnot_AddInkStroke","_FPDFAnnot_AppendAttachmentPoints","_FPDFAnnot_AppendObject","_FPDFAnnot_CountAttachmentPoints","_FPDFAnnot_GetAP","_FPDFAnnot_GetAttachmentPoints","_FPDFAnnot_GetBorder","_FPDFAnnot_GetColor","_FPDFAnnot_GetFileAttachment","_FPDFAnnot_GetFlags","_FPDFAnnot_GetFocusableSubtypes","_FPDFAnnot_GetFocusableSubtypesCount","_FPDFAnnot_GetFontColor","_FPDFAnnot_GetFontSize","_FPDFAnnot_GetFormAdditionalActionJavaScript","_FPDFAnnot_GetFormControlCount","_FPDFAnnot_GetFormControlIndex","_FPDFAnnot_GetFormFieldAlternateName","_FPDFAnnot_GetFormFieldAtPoint","_FPDFAnnot_GetFormFieldExportValue","_FPDFAnnot_GetFormFieldFlags","_FPDFAnnot_GetFormFieldName","_FPDFAnnot_GetFormFieldType","_FPDFAnnot_GetFormFieldValue","_FPDFAnnot_GetInkListCount","_FPDFAnnot_GetInkListPath","_FPDFAnnot_GetLine","_FPDFAnnot_GetLink","_FPDFAnnot_GetLinkedAnnot","_FPDFAnnot_GetNumberValue","_FPDFAnnot_GetObject","_FPDFAnnot_GetObjectCount","_FPDFAnnot_GetOptionCount","_FPDFAnnot_GetOptionLabel","_FPDFAnnot_GetRect","_FPDFAnnot_GetStringValue","_FPDFAnnot_GetSubtype","_FPDFAnnot_GetValueType","_FPDFAnnot_GetVertices","_FPDFAnnot_HasAttachmentPoints","_FPDFAnnot_HasKey","_FPDFAnnot_IsChecked","_FPDFAnnot_IsObjectSupportedSubtype","_FPDFAnnot_IsOptionSelected","_FPDFAnnot_IsSupportedSubtype","_FPDFAnnot_RemoveInkList","_FPDFAnnot_RemoveObject","_FPDFAnnot_SetAP","_FPDFAnnot_SetAttachmentPoints","_FPDFAnnot_SetBorder","_FPDFAnnot_SetColor","_FPDFAnnot_SetFlags","_FPDFAnnot_SetFocusableSubtypes","_FPDFAnnot_SetFontColor","_FPDFAnnot_SetFormFieldFlags","_FPDFAnnot_SetRect","_FPDFAnnot_SetStringValue","_FPDFAnnot_SetURI","_FPDFAnnot_UpdateObject","_FPDFAttachment_GetFile","_FPDFAttachment_GetName","_FPDFAttachment_GetStringValue","_FPDFAttachment_GetSubtype","_FPDFAttachment_GetValueType","_FPDFAttachment_HasKey","_FPDFAttachment_SetFile","_FPDFAttachment_SetStringValue","_FPDFAvail_Create","_FPDFAvail_Destroy","_FPDFAvail_GetDocument","_FPDFAvail_GetFirstPageNum","_FPDFAvail_IsDocAvail","_FPDFAvail_IsFormAvail","_FPDFAvail_IsLinearized","_FPDFAvail_IsPageAvail","_FPDFBitmap_Create","_FPDFBitmap_CreateEx","_FPDFBitmap_Destroy","_FPDFBitmap_FillRect","_FPDFBitmap_GetBuffer","_FPDFBitmap_GetFormat","_FPDFBitmap_GetHeight","_FPDFBitmap_GetStride","_FPDFBitmap_GetWidth","_FPDFBookmark_Find","_FPDFBookmark_GetAction","_FPDFBookmark_GetCount","_FPDFBookmark_GetDest","_FPDFBookmark_GetFirstChild","_FPDFBookmark_GetNextSibling","_FPDFBookmark_GetTitle","_FPDFCatalog_GetLanguage","_FPDFCatalog_IsTagged","_FPDFCatalog_SetLanguage","_FPDFClipPath_CountPaths","_FPDFClipPath_CountPathSegments","_FPDFClipPath_GetPathSegment","_FPDFDest_GetDestPageIndex","_FPDFDest_GetLocationInPage","_FPDFDest_GetView","_FPDFDoc_AddAttachment","_FPDFDoc_CloseJavaScriptAction","_FPDFDoc_DeleteAttachment","_FPDFDOC_ExitFormFillEnvironment","_FPDFDoc_GetAttachment","_FPDFDoc_GetAttachmentCount","_FPDFDoc_GetJavaScriptAction","_FPDFDoc_GetJavaScriptActionCount","_FPDFDoc_GetPageMode","_FPDFDOC_InitFormFillEnvironment","_FPDFFont_Close","_FPDFFont_GetAscent","_FPDFFont_GetBaseFontName","_FPDFFont_GetDescent","_FPDFFont_GetFamilyName","_FPDFFont_GetFlags","_FPDFFont_GetFontData","_FPDFFont_GetGlyphPath","_FPDFFont_GetGlyphWidth","_FPDFFont_GetIsEmbedded","_FPDFFont_GetItalicAngle","_FPDFFont_GetWeight","_FPDFFormObj_CountObjects","_FPDFFormObj_GetObject","_FPDFFormObj_RemoveObject","_FPDFGlyphPath_CountGlyphSegments","_FPDFGlyphPath_GetGlyphPathSegment","_FPDFImageObj_GetBitmap","_FPDFImageObj_GetIccProfileDataDecoded","_FPDFImageObj_GetImageDataDecoded","_FPDFImageObj_GetImageDataRaw","_FPDFImageObj_GetImageFilter","_FPDFImageObj_GetImageFilterCount","_FPDFImageObj_GetImageMetadata","_FPDFImageObj_GetImagePixelSize","_FPDFImageObj_GetRenderedBitmap","_FPDFImageObj_LoadJpegFile","_FPDFImageObj_LoadJpegFileInline","_FPDFImageObj_SetBitmap","_FPDFImageObj_SetMatrix","_FPDFJavaScriptAction_GetName","_FPDFJavaScriptAction_GetScript","_FPDFLink_CloseWebLinks","_FPDFLink_CountQuadPoints","_FPDFLink_CountRects","_FPDFLink_CountWebLinks","_FPDFLink_Enumerate","_FPDFLink_GetAction","_FPDFLink_GetAnnot","_FPDFLink_GetAnnotRect","_FPDFLink_GetDest","_FPDFLink_GetLinkAtPoint","_FPDFLink_GetLinkZOrderAtPoint","_FPDFLink_GetQuadPoints","_FPDFLink_GetRect","_FPDFLink_GetTextRange","_FPDFLink_GetURL","_FPDFLink_LoadWebLinks","_FPDFPage_CloseAnnot","_FPDFPage_CountObjects","_FPDFPage_CreateAnnot","_FPDFPage_Delete","_FPDFPage_Flatten","_FPDFPage_FormFieldZOrderAtPoint","_FPDFPage_GenerateContent","_FPDFPage_GetAnnot","_FPDFPage_GetAnnotCount","_FPDFPage_GetAnnotIndex","_FPDFPage_GetArtBox","_FPDFPage_GetBleedBox","_FPDFPage_GetCropBox","_FPDFPage_GetDecodedThumbnailData","_FPDFPage_GetMediaBox","_FPDFPage_GetObject","_FPDFPage_GetRawThumbnailData","_FPDFPage_GetRotation","_FPDFPage_GetThumbnailAsBitmap","_FPDFPage_GetTrimBox","_FPDFPage_HasFormFieldAtPoint","_FPDFPage_HasTransparency","_FPDFPage_InsertClipPath","_FPDFPage_InsertObject","_FPDFPage_InsertObjectAtIndex","_FPDFPage_New","_FPDFPage_RemoveAnnot","_FPDFPage_RemoveObject","_FPDFPage_SetArtBox","_FPDFPage_SetBleedBox","_FPDFPage_SetCropBox","_FPDFPage_SetMediaBox","_FPDFPage_SetRotation","_FPDFPage_SetTrimBox","_FPDFPage_TransformAnnots","_FPDFPage_TransFormWithClip","_FPDFPageObj_AddMark","_FPDFPageObj_CountMarks","_FPDFPageObj_CreateNewPath","_FPDFPageObj_CreateNewRect","_FPDFPageObj_CreateTextObj","_FPDFPageObj_Destroy","_FPDFPageObj_GetBounds","_FPDFPageObj_GetClipPath","_FPDFPageObj_GetDashArray","_FPDFPageObj_GetDashCount","_FPDFPageObj_GetDashPhase","_FPDFPageObj_GetFillColor","_FPDFPageObj_GetIsActive","_FPDFPageObj_GetLineCap","_FPDFPageObj_GetLineJoin","_FPDFPageObj_GetMark","_FPDFPageObj_GetMarkedContentID","_FPDFPageObj_GetMatrix","_FPDFPageObj_GetRotatedBounds","_FPDFPageObj_GetStrokeColor","_FPDFPageObj_GetStrokeWidth","_FPDFPageObj_GetType","_FPDFPageObj_HasTransparency","_FPDFPageObj_NewImageObj","_FPDFPageObj_NewTextObj","_FPDFPageObj_RemoveMark","_FPDFPageObj_SetBlendMode","_FPDFPageObj_SetDashArray","_FPDFPageObj_SetDashPhase","_FPDFPageObj_SetFillColor","_FPDFPageObj_SetIsActive","_FPDFPageObj_SetLineCap","_FPDFPageObj_SetLineJoin","_FPDFPageObj_SetMatrix","_FPDFPageObj_SetStrokeColor","_FPDFPageObj_SetStrokeWidth","_FPDFPageObj_Transform","_FPDFPageObj_TransformClipPath","_FPDFPageObj_TransformF","_FPDFPageObjMark_CountParams","_FPDFPageObjMark_GetName","_FPDFPageObjMark_GetParamBlobValue","_FPDFPageObjMark_GetParamFloatValue","_FPDFPageObjMark_GetParamIntValue","_FPDFPageObjMark_GetParamKey","_FPDFPageObjMark_GetParamStringValue","_FPDFPageObjMark_GetParamValueType","_FPDFPageObjMark_RemoveParam","_FPDFPageObjMark_SetBlobParam","_FPDFPageObjMark_SetFloatParam","_FPDFPageObjMark_SetIntParam","_FPDFPageObjMark_SetStringParam","_FPDFPath_BezierTo","_FPDFPath_Close","_FPDFPath_CountSegments","_FPDFPath_GetDrawMode","_FPDFPath_GetPathSegment","_FPDFPath_LineTo","_FPDFPath_MoveTo","_FPDFPath_SetDrawMode","_FPDFPathSegment_GetClose","_FPDFPathSegment_GetPoint","_FPDFPathSegment_GetType","_FPDFSignatureObj_GetByteRange","_FPDFSignatureObj_GetContents","_FPDFSignatureObj_GetDocMDPPermission","_FPDFSignatureObj_GetReason","_FPDFSignatureObj_GetSubFilter","_FPDFSignatureObj_GetTime","_FPDFText_ClosePage","_FPDFText_CountChars","_FPDFText_CountRects","_FPDFText_FindClose","_FPDFText_FindNext","_FPDFText_FindPrev","_FPDFText_FindStart","_FPDFText_GetBoundedText","_FPDFText_GetCharAngle","_FPDFText_GetCharBox","_FPDFText_GetCharIndexAtPos","_FPDFText_GetCharIndexFromTextIndex","_FPDFText_GetCharOrigin","_FPDFText_GetFillColor","_FPDFText_GetFontInfo","_FPDFText_GetFontSize","_FPDFText_GetFontWeight","_FPDFText_GetLooseCharBox","_FPDFText_GetMatrix","_FPDFText_GetRect","_FPDFText_GetSchCount","_FPDFText_GetSchResultIndex","_FPDFText_GetStrokeColor","_FPDFText_GetText","_FPDFText_GetTextIndexFromCharIndex","_FPDFText_GetTextObject","_FPDFText_GetUnicode","_FPDFText_HasUnicodeMapError","_FPDFText_IsGenerated","_FPDFText_IsHyphen","_FPDFText_LoadCidType2Font","_FPDFText_LoadFont","_FPDFText_LoadPage","_FPDFText_LoadStandardFont","_FPDFText_SetCharcodes","_FPDFText_SetText","_FPDFTextObj_GetFont","_FPDFTextObj_GetFontSize","_FPDFTextObj_GetRenderedBitmap","_FPDFTextObj_GetText","_FPDFTextObj_GetTextRenderMode","_FPDFTextObj_SetTextRenderMode","_PDFiumExt_CloseFileWriter","_PDFiumExt_CloseFormFillInfo","_PDFiumExt_ExitFormFillEnvironment","_PDFiumExt_GetFileWriterData","_PDFiumExt_GetFileWriterSize","_PDFiumExt_Init","_PDFiumExt_InitFormFillEnvironment","_PDFiumExt_OpenFileWriter","_PDFiumExt_OpenFormFillInfo","_PDFiumExt_SaveAsCopy","_malloc","_free","_memory","___indirect_function_table","onRuntimeInitialized"].forEach((prop) => { if (!Object.getOwnPropertyDescriptor(readyPromise, prop)) { Object.defineProperty(readyPromise, prop, { get: () => abort('You are getting ' + prop + ' on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js'), @@ -5478,6 +5478,7 @@ var _FPDFBitmap_GetHeight = Module['_FPDFBitmap_GetHeight'] = createExportWrappe var _FPDFBitmap_GetStride = Module['_FPDFBitmap_GetStride'] = createExportWrapper('FPDFBitmap_GetStride', 1); var _FPDFBitmap_Destroy = Module['_FPDFBitmap_Destroy'] = createExportWrapper('FPDFBitmap_Destroy', 1); var _FPDF_GetPageSizeByIndexF = Module['_FPDF_GetPageSizeByIndexF'] = createExportWrapper('FPDF_GetPageSizeByIndexF', 3); +var _EPDF_GetPageObjNum = Module['_EPDF_GetPageObjNum'] = createExportWrapper('EPDF_GetPageObjNum', 2); var _EPDF_GetPageRotationByIndex = Module['_EPDF_GetPageRotationByIndex'] = createExportWrapper('EPDF_GetPageRotationByIndex', 2); var _EPDF_GetPageSizeByIndexNormalized = Module['_EPDF_GetPageSizeByIndexNormalized'] = createExportWrapper('EPDF_GetPageSizeByIndexNormalized', 3); var _EPDF_LoadPageNormalized = Module['_EPDF_LoadPageNormalized'] = createExportWrapper('EPDF_LoadPageNormalized', 3); diff --git a/packages/pdfium/src/vendor/pdfium.js b/packages/pdfium/src/vendor/pdfium.js index 869293e28..dc020ba1c 100644 --- a/packages/pdfium/src/vendor/pdfium.js +++ b/packages/pdfium/src/vendor/pdfium.js @@ -30,6 +30,7 @@ var createPdfium = (() => { '_EPDF_GetMetaKeyCount', '_EPDF_GetMetaKeyName', '_EPDF_GetMetaTrapped', + '_EPDF_GetPageObjNum', '_EPDF_GetPageRotationByIndex', '_EPDF_GetPageSizeByIndexNormalized', '_EPDF_HasMetaText', @@ -7709,6 +7710,8 @@ var createPdfium = (() => { 'FPDF_GetPageSizeByIndexF', 3, )); + var _EPDF_GetPageObjNum = (Module['_EPDF_GetPageObjNum'] = + createExportWrapper('EPDF_GetPageObjNum', 2)); var _EPDF_GetPageRotationByIndex = (Module['_EPDF_GetPageRotationByIndex'] = createExportWrapper('EPDF_GetPageRotationByIndex', 2)); var _EPDF_GetPageSizeByIndexNormalized = (Module['_EPDF_GetPageSizeByIndexNormalized'] = From 0566bc202fa4a38e7d34aa42eedfd6ae8e443365 Mon Sep 17 00:00:00 2001 From: Mykola Pogodin Date: Fri, 3 Apr 2026 13:57:18 +0300 Subject: [PATCH 2/2] chore: add changeset for EPDF_GetPageObjNum --- .changeset/pink-balloons-make.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changeset/pink-balloons-make.md diff --git a/.changeset/pink-balloons-make.md b/.changeset/pink-balloons-make.md new file mode 100644 index 000000000..fe6f4e787 --- /dev/null +++ b/.changeset/pink-balloons-make.md @@ -0,0 +1,7 @@ +--- +'@embedpdf/engines': minor +'@embedpdf/models': minor +'@embedpdf/pdfium': minor +--- + +Add EPDF_GetPageObjNum to expose PDF page indirect object numbers, populate objectNumber on PdfPageObject via the engine