xref: /aosp_15_r20/external/pdfium/fpdfsdk/fpdf_view_c_api_test.c (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
1 // Copyright 2015 The PDFium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // This "C" (not "C++") file ensures that the public headers compile
6 // and link for "C" (and not just "C++").
7 
8 #include <stdio.h>
9 
10 #include "fpdfsdk/fpdf_view_c_api_test.h"
11 
12 #include "public/fpdf_annot.h"
13 #include "public/fpdf_attachment.h"
14 #include "public/fpdf_catalog.h"
15 #include "public/fpdf_dataavail.h"
16 #include "public/fpdf_doc.h"
17 #include "public/fpdf_edit.h"
18 #include "public/fpdf_ext.h"
19 #include "public/fpdf_flatten.h"
20 #include "public/fpdf_formfill.h"
21 #include "public/fpdf_fwlevent.h"
22 #include "public/fpdf_javascript.h"
23 #include "public/fpdf_ppo.h"
24 #include "public/fpdf_progressive.h"
25 #include "public/fpdf_save.h"
26 #include "public/fpdf_searchex.h"
27 #include "public/fpdf_signature.h"
28 #include "public/fpdf_structtree.h"
29 #include "public/fpdf_sysfontinfo.h"
30 #include "public/fpdf_text.h"
31 #include "public/fpdf_thumbnail.h"
32 #include "public/fpdf_transformpage.h"
33 #include "public/fpdfview.h"
34 
35 // Scheme for avoiding LTO out of existence, warnings, etc.
36 typedef void (*fnptr)(void);  // Legal generic function type for casts.
37 fnptr g_c_api_test_fnptr = NULL;  // Extern, so can't know it doesn't change.
38 #define CHK(x) if ((fnptr)(x) == g_c_api_test_fnptr) return 0
39 
40 // Function to call from gtest harness to ensure linker resolution.
CheckPDFiumCApi()41 int CheckPDFiumCApi() {
42     // fpdf_annot.h
43     CHK(FPDFAnnot_AddInkStroke);
44     CHK(FPDFAnnot_AppendAttachmentPoints);
45     CHK(FPDFAnnot_AppendObject);
46     CHK(FPDFAnnot_CountAttachmentPoints);
47     CHK(FPDFAnnot_GetAP);
48     CHK(FPDFAnnot_GetAttachmentPoints);
49     CHK(FPDFAnnot_GetBorder);
50     CHK(FPDFAnnot_GetColor);
51     CHK(FPDFAnnot_GetFlags);
52     CHK(FPDFAnnot_GetFocusableSubtypes);
53     CHK(FPDFAnnot_GetFocusableSubtypesCount);
54     CHK(FPDFAnnot_GetFontSize);
55     CHK(FPDFAnnot_GetFormAdditionalActionJavaScript);
56     CHK(FPDFAnnot_GetFormControlCount);
57     CHK(FPDFAnnot_GetFormControlIndex);
58     CHK(FPDFAnnot_GetFormFieldAlternateName);
59     CHK(FPDFAnnot_GetFormFieldAtPoint);
60     CHK(FPDFAnnot_GetFormFieldExportValue);
61     CHK(FPDFAnnot_GetFormFieldFlags);
62     CHK(FPDFAnnot_GetFormFieldName);
63     CHK(FPDFAnnot_GetFormFieldType);
64     CHK(FPDFAnnot_GetFormFieldValue);
65     CHK(FPDFAnnot_GetInkListCount);
66     CHK(FPDFAnnot_GetInkListPath);
67     CHK(FPDFAnnot_GetLine);
68     CHK(FPDFAnnot_GetLink);
69     CHK(FPDFAnnot_GetLinkedAnnot);
70     CHK(FPDFAnnot_GetNumberValue);
71     CHK(FPDFAnnot_GetObject);
72     CHK(FPDFAnnot_GetObjectCount);
73     CHK(FPDFAnnot_GetOptionCount);
74     CHK(FPDFAnnot_GetOptionLabel);
75     CHK(FPDFAnnot_GetRect);
76     CHK(FPDFAnnot_GetStringValue);
77     CHK(FPDFAnnot_GetSubtype);
78     CHK(FPDFAnnot_GetValueType);
79     CHK(FPDFAnnot_GetVertices);
80     CHK(FPDFAnnot_HasAttachmentPoints);
81     CHK(FPDFAnnot_HasKey);
82     CHK(FPDFAnnot_IsChecked);
83     CHK(FPDFAnnot_IsObjectSupportedSubtype);
84     CHK(FPDFAnnot_IsOptionSelected);
85     CHK(FPDFAnnot_IsSupportedSubtype);
86     CHK(FPDFAnnot_RemoveInkList);
87     CHK(FPDFAnnot_RemoveObject);
88     CHK(FPDFAnnot_SetAP);
89     CHK(FPDFAnnot_SetAttachmentPoints);
90     CHK(FPDFAnnot_SetBorder);
91     CHK(FPDFAnnot_SetColor);
92     CHK(FPDFAnnot_SetFlags);
93     CHK(FPDFAnnot_SetFocusableSubtypes);
94     CHK(FPDFAnnot_SetRect);
95     CHK(FPDFAnnot_SetStringValue);
96     CHK(FPDFAnnot_SetURI);
97     CHK(FPDFAnnot_UpdateObject);
98     CHK(FPDFPage_CloseAnnot);
99     CHK(FPDFPage_CreateAnnot);
100     CHK(FPDFPage_GetAnnot);
101     CHK(FPDFPage_GetAnnotCount);
102     CHK(FPDFPage_GetAnnotIndex);
103     CHK(FPDFPage_RemoveAnnot);
104 
105     // fpdf_attachment.h
106     CHK(FPDFAttachment_GetFile);
107     CHK(FPDFAttachment_GetName);
108     CHK(FPDFAttachment_GetStringValue);
109     CHK(FPDFAttachment_GetValueType);
110     CHK(FPDFAttachment_HasKey);
111     CHK(FPDFAttachment_SetFile);
112     CHK(FPDFAttachment_SetStringValue);
113     CHK(FPDFDoc_AddAttachment);
114     CHK(FPDFDoc_DeleteAttachment);
115     CHK(FPDFDoc_GetAttachment);
116     CHK(FPDFDoc_GetAttachmentCount);
117 
118     // fpdf_catalog.h
119     CHK(FPDFCatalog_IsTagged);
120 
121     // fpdf_dataavail.h
122     CHK(FPDFAvail_Create);
123     CHK(FPDFAvail_Destroy);
124     CHK(FPDFAvail_GetDocument);
125     CHK(FPDFAvail_GetFirstPageNum);
126     CHK(FPDFAvail_IsDocAvail);
127     CHK(FPDFAvail_IsFormAvail);
128     CHK(FPDFAvail_IsLinearized);
129     CHK(FPDFAvail_IsPageAvail);
130 
131     // fpdf_doc.h
132     CHK(FPDFAction_GetDest);
133     CHK(FPDFAction_GetFilePath);
134     CHK(FPDFAction_GetType);
135     CHK(FPDFAction_GetURIPath);
136     CHK(FPDFBookmark_Find);
137     CHK(FPDFBookmark_GetAction);
138     CHK(FPDFBookmark_GetCount);
139     CHK(FPDFBookmark_GetDest);
140     CHK(FPDFBookmark_GetFirstChild);
141     CHK(FPDFBookmark_GetNextSibling);
142     CHK(FPDFBookmark_GetTitle);
143     CHK(FPDFDest_GetDestPageIndex);
144     CHK(FPDFDest_GetLocationInPage);
145     CHK(FPDFDest_GetView);
146     CHK(FPDFLink_CountQuadPoints);
147     CHK(FPDFLink_Enumerate);
148     CHK(FPDFLink_GetAction);
149     CHK(FPDFLink_GetAnnot);
150     CHK(FPDFLink_GetAnnotRect);
151     CHK(FPDFLink_GetDest);
152     CHK(FPDFLink_GetLinkAtPoint);
153     CHK(FPDFLink_GetLinkZOrderAtPoint);
154     CHK(FPDFLink_GetQuadPoints);
155     CHK(FPDF_GetFileIdentifier);
156     CHK(FPDF_GetMetaText);
157     CHK(FPDF_GetPageAAction);
158     CHK(FPDF_GetPageLabel);
159 
160     // fpdf_edit.h
161     CHK(FPDFFont_Close);
162     CHK(FPDFFont_GetAscent);
163     CHK(FPDFFont_GetDescent);
164     CHK(FPDFFont_GetFlags);
165     CHK(FPDFFont_GetFontData);
166     CHK(FPDFFont_GetFontName);
167     CHK(FPDFFont_GetGlyphPath);
168     CHK(FPDFFont_GetGlyphWidth);
169     CHK(FPDFFont_GetIsEmbedded);
170     CHK(FPDFFont_GetItalicAngle);
171     CHK(FPDFFont_GetWeight);
172     CHK(FPDFFormObj_CountObjects);
173     CHK(FPDFFormObj_GetObject);
174     CHK(FPDFGlyphPath_CountGlyphSegments);
175     CHK(FPDFGlyphPath_GetGlyphPathSegment);
176     CHK(FPDFImageObj_GetBitmap);
177     CHK(FPDFImageObj_GetImageDataDecoded);
178     CHK(FPDFImageObj_GetImageDataRaw);
179     CHK(FPDFImageObj_GetImageFilter);
180     CHK(FPDFImageObj_GetImageFilterCount);
181     CHK(FPDFImageObj_GetImageMetadata);
182     CHK(FPDFImageObj_GetImagePixelSize);
183     CHK(FPDFImageObj_GetRenderedBitmap);
184     CHK(FPDFImageObj_LoadJpegFile);
185     CHK(FPDFImageObj_LoadJpegFileInline);
186     CHK(FPDFImageObj_SetBitmap);
187     CHK(FPDFImageObj_SetMatrix);
188     CHK(FPDFPageObjMark_CountParams);
189     CHK(FPDFPageObjMark_GetName);
190     CHK(FPDFPageObjMark_GetParamBlobValue);
191     CHK(FPDFPageObjMark_GetParamIntValue);
192     CHK(FPDFPageObjMark_GetParamKey);
193     CHK(FPDFPageObjMark_GetParamStringValue);
194     CHK(FPDFPageObjMark_GetParamValueType);
195     CHK(FPDFPageObjMark_RemoveParam);
196     CHK(FPDFPageObjMark_SetBlobParam);
197     CHK(FPDFPageObjMark_SetIntParam);
198     CHK(FPDFPageObjMark_SetStringParam);
199     CHK(FPDFPageObj_AddMark);
200     CHK(FPDFPageObj_CountMarks);
201     CHK(FPDFPageObj_CreateNewPath);
202     CHK(FPDFPageObj_CreateNewRect);
203     CHK(FPDFPageObj_CreateTextObj);
204     CHK(FPDFPageObj_Destroy);
205     CHK(FPDFPageObj_GetBounds);
206     CHK(FPDFPageObj_GetDashArray);
207     CHK(FPDFPageObj_GetDashCount);
208     CHK(FPDFPageObj_GetDashPhase);
209     CHK(FPDFPageObj_GetFillColor);
210     CHK(FPDFPageObj_GetLineCap);
211     CHK(FPDFPageObj_GetLineJoin);
212     CHK(FPDFPageObj_GetMark);
213     CHK(FPDFPageObj_GetMatrix);
214     CHK(FPDFPageObj_GetRotatedBounds);
215     CHK(FPDFPageObj_GetStrokeColor);
216     CHK(FPDFPageObj_GetStrokeWidth);
217     CHK(FPDFPageObj_GetType);
218     CHK(FPDFPageObj_HasTransparency);
219     CHK(FPDFPageObj_NewImageObj);
220     CHK(FPDFPageObj_NewTextObj);
221     CHK(FPDFPageObj_RemoveMark);
222     CHK(FPDFPageObj_SetBlendMode);
223     CHK(FPDFPageObj_SetDashArray);
224     CHK(FPDFPageObj_SetDashPhase);
225     CHK(FPDFPageObj_SetFillColor);
226     CHK(FPDFPageObj_SetLineCap);
227     CHK(FPDFPageObj_SetLineJoin);
228     CHK(FPDFPageObj_SetMatrix);
229     CHK(FPDFPageObj_SetStrokeColor);
230     CHK(FPDFPageObj_SetStrokeWidth);
231     CHK(FPDFPageObj_Transform);
232     CHK(FPDFPage_CountObjects);
233     CHK(FPDFPage_Delete);
234     CHK(FPDFPage_GenerateContent);
235     CHK(FPDFPage_GetObject);
236     CHK(FPDFPage_GetRotation);
237     CHK(FPDFPage_HasTransparency);
238     CHK(FPDFPage_InsertObject);
239     CHK(FPDFPage_New);
240     CHK(FPDFPage_RemoveObject);
241     CHK(FPDFPage_SetRotation);
242     CHK(FPDFPage_TransformAnnots);
243     CHK(FPDFPathSegment_GetClose);
244     CHK(FPDFPathSegment_GetPoint);
245     CHK(FPDFPathSegment_GetType);
246     CHK(FPDFPath_BezierTo);
247     CHK(FPDFPath_Close);
248     CHK(FPDFPath_CountSegments);
249     CHK(FPDFPath_GetDrawMode);
250     CHK(FPDFPath_GetPathSegment);
251     CHK(FPDFPath_LineTo);
252     CHK(FPDFPath_MoveTo);
253     CHK(FPDFPath_SetDrawMode);
254     CHK(FPDFTextObj_GetFont);
255     CHK(FPDFTextObj_GetFontSize);
256     CHK(FPDFTextObj_GetRenderedBitmap);
257     CHK(FPDFTextObj_GetText);
258     CHK(FPDFTextObj_GetTextRenderMode);
259     CHK(FPDFTextObj_SetTextRenderMode);
260     CHK(FPDFText_LoadFont);
261     CHK(FPDFText_LoadStandardFont);
262     CHK(FPDFText_SetCharcodes);
263     CHK(FPDFText_SetText);
264     CHK(FPDF_CreateNewDocument);
265 
266     // fpdf_ext.h
267     CHK(FPDFDoc_GetPageMode);
268     CHK(FSDK_SetLocaltimeFunction);
269     CHK(FSDK_SetTimeFunction);
270     CHK(FSDK_SetUnSpObjProcessHandler);
271 
272     // fpdf_flatten.h
273     CHK(FPDFPage_Flatten);
274 
275     // fpdf_fwlevent.h - no exports.
276 
277     // fpdf_formfill.h
278     CHK(FORM_CanRedo);
279     CHK(FORM_CanUndo);
280     CHK(FORM_DoDocumentAAction);
281     CHK(FORM_DoDocumentJSAction);
282     CHK(FORM_DoDocumentOpenAction);
283     CHK(FORM_DoPageAAction);
284     CHK(FORM_ForceToKillFocus);
285     CHK(FORM_GetFocusedAnnot);
286     CHK(FORM_GetFocusedText);
287     CHK(FORM_GetSelectedText);
288     CHK(FORM_IsIndexSelected);
289     CHK(FORM_OnAfterLoadPage);
290     CHK(FORM_OnBeforeClosePage);
291     CHK(FORM_OnChar);
292     CHK(FORM_OnFocus);
293     CHK(FORM_OnKeyDown);
294     CHK(FORM_OnKeyUp);
295     CHK(FORM_OnLButtonDoubleClick);
296     CHK(FORM_OnLButtonDown);
297     CHK(FORM_OnLButtonUp);
298     CHK(FORM_OnMouseMove);
299     CHK(FORM_OnMouseWheel);
300     CHK(FORM_OnRButtonDown);
301     CHK(FORM_OnRButtonUp);
302     CHK(FORM_Redo);
303     CHK(FORM_ReplaceAndKeepSelection);
304     CHK(FORM_ReplaceSelection);
305     CHK(FORM_SelectAllText);
306     CHK(FORM_SetFocusedAnnot);
307     CHK(FORM_SetIndexSelected);
308     CHK(FORM_Undo);
309     CHK(FPDFDOC_ExitFormFillEnvironment);
310     CHK(FPDFDOC_InitFormFillEnvironment);
311     CHK(FPDFPage_FormFieldZOrderAtPoint);
312     CHK(FPDFPage_HasFormFieldAtPoint);
313     CHK(FPDF_FFLDraw);
314 #if defined(_SKIA_SUPPORT_)
315     CHK(FPDF_FFLDrawSkia);
316 #endif
317     CHK(FPDF_GetFormType);
318     CHK(FPDF_LoadXFA);
319     CHK(FPDF_RemoveFormFieldHighlight);
320     CHK(FPDF_SetFormFieldHighlightAlpha);
321     CHK(FPDF_SetFormFieldHighlightColor);
322 
323     // fpdf_javascript.h
324     CHK(FPDFDoc_CloseJavaScriptAction);
325     CHK(FPDFDoc_GetJavaScriptAction);
326     CHK(FPDFDoc_GetJavaScriptActionCount);
327     CHK(FPDFJavaScriptAction_GetName);
328     CHK(FPDFJavaScriptAction_GetScript);
329 
330     // fpdf_ppo.h
331     CHK(FPDF_CloseXObject);
332     CHK(FPDF_CopyViewerPreferences);
333     CHK(FPDF_ImportNPagesToOne);
334     CHK(FPDF_ImportPages);
335     CHK(FPDF_ImportPagesByIndex);
336     CHK(FPDF_NewFormObjectFromXObject);
337     CHK(FPDF_NewXObjectFromPage);
338 
339     // fpdf_progressive.h
340     CHK(FPDF_RenderPageBitmapWithColorScheme_Start);
341     CHK(FPDF_RenderPageBitmap_Start);
342     CHK(FPDF_RenderPage_Close);
343     CHK(FPDF_RenderPage_Continue);
344 
345     // fpdf_save.h
346     CHK(FPDF_SaveAsCopy);
347     CHK(FPDF_SaveWithVersion);
348 
349     // fpdf_searchex.h
350     CHK(FPDFText_GetCharIndexFromTextIndex);
351     CHK(FPDFText_GetTextIndexFromCharIndex);
352 
353     // fpdf_signature.h
354     CHK(FPDFSignatureObj_GetByteRange);
355     CHK(FPDFSignatureObj_GetContents);
356     CHK(FPDFSignatureObj_GetDocMDPPermission);
357     CHK(FPDFSignatureObj_GetReason);
358     CHK(FPDFSignatureObj_GetSubFilter);
359     CHK(FPDFSignatureObj_GetTime);
360     CHK(FPDF_GetSignatureCount);
361     CHK(FPDF_GetSignatureObject);
362 
363     // fpdf_structtree.h
364     CHK(FPDF_StructElement_Attr_GetBlobValue);
365     CHK(FPDF_StructElement_Attr_GetBooleanValue);
366     CHK(FPDF_StructElement_Attr_GetCount);
367     CHK(FPDF_StructElement_Attr_GetName);
368     CHK(FPDF_StructElement_Attr_GetNumberValue);
369     CHK(FPDF_StructElement_Attr_GetStringValue);
370     CHK(FPDF_StructElement_Attr_GetType);
371     CHK(FPDF_StructElement_CountChildren);
372     CHK(FPDF_StructElement_GetActualText);
373     CHK(FPDF_StructElement_GetAltText);
374     CHK(FPDF_StructElement_GetAttributeAtIndex);
375     CHK(FPDF_StructElement_GetAttributeCount);
376     CHK(FPDF_StructElement_GetChildAtIndex);
377     CHK(FPDF_StructElement_GetID);
378     CHK(FPDF_StructElement_GetLang);
379     CHK(FPDF_StructElement_GetMarkedContentID);
380     CHK(FPDF_StructElement_GetMarkedContentIdAtIndex);
381     CHK(FPDF_StructElement_GetMarkedContentIdCount);
382     CHK(FPDF_StructElement_GetObjType);
383     CHK(FPDF_StructElement_GetParent);
384     CHK(FPDF_StructElement_GetStringAttribute);
385     CHK(FPDF_StructElement_GetTitle);
386     CHK(FPDF_StructElement_GetType);
387     CHK(FPDF_StructTree_Close);
388     CHK(FPDF_StructTree_CountChildren);
389     CHK(FPDF_StructTree_GetChildAtIndex);
390     CHK(FPDF_StructTree_GetForPage);
391 
392     // fpdf_sysfontinfo.h
393     CHK(FPDF_AddInstalledFont);
394     CHK(FPDF_FreeDefaultSystemFontInfo);
395     CHK(FPDF_GetDefaultSystemFontInfo);
396     CHK(FPDF_GetDefaultTTFMap);
397     CHK(FPDF_SetSystemFontInfo);
398 
399     // fpdf_text.h
400     CHK(FPDFLink_CloseWebLinks);
401     CHK(FPDFLink_CountRects);
402     CHK(FPDFLink_CountWebLinks);
403     CHK(FPDFLink_GetRect);
404     CHK(FPDFLink_GetTextRange);
405     CHK(FPDFLink_GetURL);
406     CHK(FPDFLink_LoadWebLinks);
407     CHK(FPDFText_ClosePage);
408     CHK(FPDFText_CountChars);
409     CHK(FPDFText_CountRects);
410     CHK(FPDFText_FindClose);
411     CHK(FPDFText_FindNext);
412     CHK(FPDFText_FindPrev);
413     CHK(FPDFText_FindStart);
414     CHK(FPDFText_GetBoundedText);
415     CHK(FPDFText_GetCharAngle);
416     CHK(FPDFText_GetCharBox);
417     CHK(FPDFText_GetCharIndexAtPos);
418     CHK(FPDFText_GetCharOrigin);
419     CHK(FPDFText_GetFillColor);
420     CHK(FPDFText_GetFontInfo);
421     CHK(FPDFText_GetFontSize);
422     CHK(FPDFText_GetFontWeight);
423     CHK(FPDFText_GetLooseCharBox);
424     CHK(FPDFText_GetMatrix);
425     CHK(FPDFText_GetRect);
426     CHK(FPDFText_GetSchCount);
427     CHK(FPDFText_GetSchResultIndex);
428     CHK(FPDFText_GetStrokeColor);
429     CHK(FPDFText_GetText);
430     CHK(FPDFText_GetTextRenderMode);
431     CHK(FPDFText_GetUnicode);
432     CHK(FPDFText_HasUnicodeMapError);
433     CHK(FPDFText_IsGenerated);
434     CHK(FPDFText_LoadPage);
435 
436     // fpdf_thumbnail.h
437     CHK(FPDFPage_GetDecodedThumbnailData);
438     CHK(FPDFPage_GetRawThumbnailData);
439     CHK(FPDFPage_GetThumbnailAsBitmap);
440 
441     // fpdf_transformpage.h
442     CHK(FPDFClipPath_CountPathSegments);
443     CHK(FPDFClipPath_CountPaths);
444     CHK(FPDFClipPath_GetPathSegment);
445     CHK(FPDFPageObj_GetClipPath);
446     CHK(FPDFPageObj_TransformClipPath);
447     CHK(FPDFPage_GetArtBox);
448     CHK(FPDFPage_GetBleedBox);
449     CHK(FPDFPage_GetCropBox);
450     CHK(FPDFPage_GetMediaBox);
451     CHK(FPDFPage_GetTrimBox);
452     CHK(FPDFPage_InsertClipPath);
453     CHK(FPDFPage_SetArtBox);
454     CHK(FPDFPage_SetBleedBox);
455     CHK(FPDFPage_SetCropBox);
456     CHK(FPDFPage_SetMediaBox);
457     CHK(FPDFPage_SetTrimBox);
458     CHK(FPDFPage_TransFormWithClip);
459     CHK(FPDF_CreateClipPath);
460     CHK(FPDF_DestroyClipPath);
461 
462     // fpdfview.h
463     CHK(FPDFBitmap_Create);
464     CHK(FPDFBitmap_CreateEx);
465     CHK(FPDFBitmap_Destroy);
466     CHK(FPDFBitmap_FillRect);
467     CHK(FPDFBitmap_GetBuffer);
468     CHK(FPDFBitmap_GetFormat);
469     CHK(FPDFBitmap_GetHeight);
470     CHK(FPDFBitmap_GetStride);
471     CHK(FPDFBitmap_GetWidth);
472 #ifdef PDF_ENABLE_XFA
473     CHK(FPDF_BStr_Clear);
474     CHK(FPDF_BStr_Init);
475     CHK(FPDF_BStr_Set);
476 #endif
477     CHK(FPDF_CloseDocument);
478     CHK(FPDF_ClosePage);
479     CHK(FPDF_CountNamedDests);
480     CHK(FPDF_DestroyLibrary);
481     CHK(FPDF_DeviceToPage);
482     CHK(FPDF_DocumentHasValidCrossReferenceTable);
483 #ifdef PDF_ENABLE_V8
484     CHK(FPDF_GetArrayBufferAllocatorSharedInstance);
485 #endif
486     CHK(FPDF_GetDocPermissions);
487     CHK(FPDF_GetFileVersion);
488     CHK(FPDF_GetLastError);
489     CHK(FPDF_GetNamedDest);
490     CHK(FPDF_GetNamedDestByName);
491     CHK(FPDF_GetPageBoundingBox);
492     CHK(FPDF_GetPageCount);
493     CHK(FPDF_GetPageHeight);
494     CHK(FPDF_GetPageHeightF);
495     CHK(FPDF_GetPageSizeByIndex);
496     CHK(FPDF_GetPageSizeByIndexF);
497     CHK(FPDF_GetPageWidth);
498     CHK(FPDF_GetPageWidthF);
499 #ifdef PDF_ENABLE_V8
500     CHK(FPDF_GetRecommendedV8Flags);
501 #endif
502     CHK(FPDF_GetSecurityHandlerRevision);
503     CHK(FPDF_GetTrailerEnds);
504     CHK(FPDF_GetXFAPacketContent);
505     CHK(FPDF_GetXFAPacketCount);
506     CHK(FPDF_GetXFAPacketName);
507     CHK(FPDF_InitLibrary);
508     CHK(FPDF_InitLibraryWithConfig);
509     CHK(FPDF_LoadCustomDocument);
510     CHK(FPDF_LoadDocument);
511     CHK(FPDF_LoadMemDocument);
512     CHK(FPDF_LoadMemDocument64);
513     CHK(FPDF_LoadPage);
514     CHK(FPDF_PageToDevice);
515 #ifdef _WIN32
516     CHK(FPDF_RenderPage);
517 #endif
518     CHK(FPDF_RenderPageBitmap);
519     CHK(FPDF_RenderPageBitmapWithMatrix);
520 #if defined(_SKIA_SUPPORT_)
521     CHK(FPDF_RenderPageSkia);
522 #endif
523 #if defined(_WIN32)
524     CHK(FPDF_SetPrintMode);
525 #endif
526     CHK(FPDF_SetSandBoxPolicy);
527     CHK(FPDF_VIEWERREF_GetDuplex);
528     CHK(FPDF_VIEWERREF_GetName);
529     CHK(FPDF_VIEWERREF_GetNumCopies);
530     CHK(FPDF_VIEWERREF_GetPrintPageRange);
531     CHK(FPDF_VIEWERREF_GetPrintPageRangeCount);
532     CHK(FPDF_VIEWERREF_GetPrintPageRangeElement);
533     CHK(FPDF_VIEWERREF_GetPrintScaling);
534 
535     return 1;
536 }
537 
538 #undef CHK
539