8#include "core/fpdfapi/parser/cpdf_document.h"
9#include "core/fxcrt/bytestring.h"
10#include "core/fxge/cfx_defaultrenderdevice.h"
11#include "fpdfsdk/cpdfsdk_helpers.h"
12#include "public/cpp/fpdf_scopers.h"
13#include "public/fpdf_doc.h"
14#include "public/fpdf_edit.h"
15#include "public/fpdfview.h"
16#include "testing/embedder_test.h"
17#include "testing/fx_string_testhelpers.h"
18#include "testing/gtest/include/gtest/gtest.h"
23 ASSERT_TRUE(OpenDocument(
"hello_world.pdf"));
24 CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document());
26 std::set<FPDF_PAGE> unique_pages;
27 std::vector<ScopedFPDFPage> owned_pages(4);
28 for (
auto& ref : owned_pages) {
29 ref.reset(FPDF_LoadPage(document(), 0));
30 unique_pages.insert(ref.get());
33 EXPECT_EQ(1u, unique_pages.size());
34 EXPECT_EQ(1u, pDoc->GetParsedPageCountForTesting());
36 EXPECT_EQ(4u, unique_pages.size());
42 ASSERT_TRUE(OpenDocument(
"named_dests.pdf"));
46 EXPECT_EQ(-1, FPDFDest_GetDestPageIndex(document(),
nullptr));
49 FPDF_DEST dest = FPDF_GetNamedDestByName(document(),
"First");
51 EXPECT_EQ(1, FPDFDest_GetDestPageIndex(document(), dest));
54 dest = FPDF_GetNamedDestByName(document(),
"Next");
56 EXPECT_EQ(1, FPDFDest_GetDestPageIndex(document(), dest));
59 dest = FPDF_GetNamedDestByName(document(),
"FirstAlternate");
61 EXPECT_EQ(11, FPDFDest_GetDestPageIndex(document(), dest));
64 dest = FPDF_GetNamedDestByName(document(),
"LastAlternate");
66 EXPECT_EQ(-1, FPDFDest_GetDestPageIndex(document(), dest));
70 ASSERT_TRUE(OpenDocument(
"named_dests.pdf"));
72 unsigned long numParams;
76 std::fill_n(params, 4, 42.4242f);
79 EXPECT_EQ(0U, numParams);
80 EXPECT_FLOAT_EQ(42.4242f, params[0]);
83 std::fill_n(params, 4, 42.4242f);
84 FPDF_DEST dest = FPDF_GetNamedDestByName(document(),
"First");
88 EXPECT_EQ(3U, numParams);
89 EXPECT_FLOAT_EQ(0, params[0]);
90 EXPECT_FLOAT_EQ(0, params[1]);
91 EXPECT_FLOAT_EQ(1, params[2]);
92 EXPECT_FLOAT_EQ(42.4242f, params[3]);
95 std::fill_n(params, 4, 42.4242f);
96 dest = FPDF_GetNamedDestByName(document(),
"Next");
100 EXPECT_EQ(0U, numParams);
101 EXPECT_FLOAT_EQ(42.4242f, params[0]);
104 std::fill_n(params, 4, 42.4242f);
105 dest = FPDF_GetNamedDestByName(document(),
"FirstAlternate");
109 EXPECT_EQ(3U, numParams);
110 EXPECT_FLOAT_EQ(200, params[0]);
111 EXPECT_FLOAT_EQ(400, params[1]);
112 EXPECT_FLOAT_EQ(800, params[2]);
113 EXPECT_FLOAT_EQ(42.4242f, params[3]);
116 std::fill_n(params, 4, 42.4242f);
117 dest = FPDF_GetNamedDestByName(document(),
"LastAlternate");
121 EXPECT_EQ(3U, numParams);
122 EXPECT_FLOAT_EQ(0, params[0]);
123 EXPECT_FLOAT_EQ(0, params[1]);
124 EXPECT_FLOAT_EQ(-200, params[2]);
125 EXPECT_FLOAT_EQ(42.4242f, params[3]);
129 ASSERT_TRUE(OpenDocument(
"named_dests.pdf"));
131 FPDF_DEST dest = FPDF_GetNamedDestByName(document(),
"First");
136 FPDF_BOOL hasZoom = 0;
139 FS_FLOAT zoom = -1.0f;
150 EXPECT_TRUE(hasZoom);
157 ASSERT_TRUE(OpenDocument(
"bug_1506.pdf"));
159 FPDF_DEST dest = FPDF_GetNamedDestByName(document(),
"First");
161 EXPECT_EQ(3, FPDFDest_GetDestPageIndex(document(), dest));
165 ASSERT_TRUE(OpenDocument(
"bug_1506.pdf"));
167 std::vector<FPDF_PAGE> pages;
169 pages.push_back(LoadPage(i));
171 FPDF_DEST dest = FPDF_GetNamedDestByName(document(),
"First");
173 EXPECT_EQ(3, FPDFDest_GetDestPageIndex(document(), dest));
175 for (FPDF_PAGE page : pages)
180 ASSERT_TRUE(OpenDocument(
"bug_1506.pdf"));
182 std::vector<FPDF_PAGE> pages;
183 for (
int i : {0, 1, 3})
184 pages.push_back(LoadPage(i));
186 FPDF_DEST dest = FPDF_GetNamedDestByName(document(),
"First");
188 EXPECT_EQ(3, FPDFDest_GetDestPageIndex(document(), dest));
190 for (FPDF_PAGE page : pages)
195 ASSERT_TRUE(OpenDocument(
"bug_680376.pdf"));
198 FPDF_DEST dest = FPDF_GetNamedDestByName(document(),
"First");
200 EXPECT_EQ(-1, FPDFDest_GetDestPageIndex(document(), dest));
204 ASSERT_TRUE(OpenDocument(
"bug_821454.pdf"));
206 FPDF_PAGE page = LoadPage(0);
221 FPDF_DEST dest1 = FPDFLink_GetDest(document(), link1);
223 FPDF_DEST dest2 = FPDFLink_GetDest(document(), link2);
229 EXPECT_FALSE(FPDFLink_GetDest(document(),
nullptr));
231 EXPECT_EQ(0, FPDFDest_GetDestPageIndex(document(), dest1));
232 EXPECT_EQ(0, FPDFDest_GetDestPageIndex(document(), dest2));
235 FPDF_BOOL has_x_coord;
236 FPDF_BOOL has_y_coord;
242 dest1
, &has_x_coord
, &has_y_coord
, &has_zoom
, &x
, &y
, &zoom
);
243 ASSERT_TRUE(success);
244 EXPECT_TRUE(has_x_coord);
245 EXPECT_TRUE(has_y_coord);
246 EXPECT_FALSE(has_zoom);
247 EXPECT_FLOAT_EQ(100.0f, x);
248 EXPECT_FLOAT_EQ(200.0f, y);
251 FPDF_BOOL has_x_coord;
252 FPDF_BOOL has_y_coord;
258 dest2
, &has_x_coord
, &has_y_coord
, &has_zoom
, &x
, &y
, &zoom
);
259 ASSERT_TRUE(success);
260 EXPECT_TRUE(has_x_coord);
261 EXPECT_TRUE(has_y_coord);
262 EXPECT_FALSE(has_zoom);
263 EXPECT_FLOAT_EQ(150.0f, x);
264 EXPECT_FLOAT_EQ(250.0f, y);
271 ASSERT_TRUE(OpenDocument(
"launch_action.pdf"));
276 EXPECT_FALSE(FPDFAction_GetDest(document(),
nullptr));
279 EXPECT_EQ(0u, FPDFAction_GetURIPath(document(),
nullptr,
nullptr, 0));
283 ASSERT_TRUE(OpenDocument(
"launch_action.pdf"));
285 FPDF_PAGE page = LoadPage(0);
297 const char kExpectedResult[] =
"test.pdf";
298 const unsigned long kExpectedLength =
sizeof(kExpectedResult);
300 EXPECT_EQ(kExpectedLength, bufsize);
304 EXPECT_STREQ(kExpectedResult, buf);
307 EXPECT_FALSE(FPDFAction_GetDest(document(), action));
308 EXPECT_EQ(0u, FPDFAction_GetURIPath(document(), action, buf,
sizeof(buf)));
314 ASSERT_TRUE(OpenDocument(
"uri_action.pdf"));
316 FPDF_PAGE page = LoadPage(0);
328 const char kExpectedResult[] =
"https://example.com/page.html";
329 const unsigned long kExpectedLength =
sizeof(kExpectedResult);
330 unsigned long bufsize = FPDFAction_GetURIPath(document(), action,
nullptr, 0);
331 ASSERT_EQ(kExpectedLength, bufsize);
334 EXPECT_EQ(bufsize, FPDFAction_GetURIPath(document(), action, buf, bufsize));
335 EXPECT_STREQ(kExpectedResult, buf);
338 EXPECT_FALSE(FPDFAction_GetDest(document(), action));
345 ASSERT_TRUE(OpenDocument(
"uri_action_nonascii.pdf"));
347 FPDF_PAGE page = LoadPage(0);
361 const char kExpectedResult[] =
362 "https://example.com/\xA5octal\xC7"
364 const unsigned long kExpectedLength =
sizeof(kExpectedResult);
365 unsigned long bufsize = FPDFAction_GetURIPath(document(), action,
nullptr, 0);
366 ASSERT_EQ(kExpectedLength, bufsize);
369 EXPECT_EQ(bufsize, FPDFAction_GetURIPath(document(), action, buf, bufsize));
370 EXPECT_STREQ(kExpectedResult, buf);
376 ASSERT_TRUE(OpenDocument(
"annots.pdf"));
377 FPDF_PAGE page = LoadPage(0);
381 ScopedFPDFAnnotation first_annot(FPDFLink_GetAnnot(page, first_link));
382 EXPECT_EQ(0, FPDFPage_GetAnnotIndex(page, first_annot.get()));
385 ScopedFPDFAnnotation second_annot(FPDFLink_GetAnnot(page, second_link));
386 EXPECT_EQ(1, FPDFPage_GetAnnotIndex(page, second_annot.get()));
398 ASSERT_TRUE(OpenDocument(
"goto_action.pdf"));
400 FPDF_PAGE page = LoadPage(0);
412 EXPECT_TRUE(FPDFAction_GetDest(document(), action));
417 EXPECT_EQ(0u, FPDFAction_GetURIPath(document(), action, buf,
sizeof(buf)));
423 ASSERT_TRUE(OpenDocument(
"gotoe_action.pdf"));
425 FPDF_PAGE page = LoadPage(0);
437 FPDF_DEST dest = FPDFAction_GetDest(document(), action);
440 unsigned long num_params = 42;
442 std::fill_n(params, 4, 42.4242f);
445 EXPECT_EQ(0u, num_params);
446 EXPECT_FLOAT_EQ(42.4242f, params[0]);
448 const char kExpectedResult[] =
"ExampleFile.pdf";
449 const unsigned long kExpectedLength =
sizeof(kExpectedResult);
452 EXPECT_EQ(kExpectedLength, bufsize);
454 EXPECT_STREQ(kExpectedResult, buf);
460 ASSERT_TRUE(OpenDocument(
"nonesuch_action.pdf"));
462 FPDF_PAGE page = LoadPage(0);
476 EXPECT_FALSE(FPDFAction_GetDest(document(), action));
478 EXPECT_EQ(0u, FPDFAction_GetURIPath(document(), action, buf,
sizeof(buf)));
484 unsigned short buf[128];
487 ASSERT_TRUE(OpenDocument(
"named_dests.pdf"));
492 EXPECT_FALSE(FPDFBookmark_GetFirstChild(document(),
nullptr));
494 EXPECT_FALSE(FPDFBookmark_GetNextSibling(document(),
nullptr));
496 EXPECT_FALSE(FPDFBookmark_Find(document(),
nullptr));
498 EXPECT_FALSE(FPDFBookmark_GetDest(document(),
nullptr));
503 unsigned short buf[128];
506 ASSERT_TRUE(OpenDocument(
"bookmarks.pdf"));
508 FPDF_BOOKMARK child = FPDFBookmark_GetFirstChild(document(),
nullptr);
515 EXPECT_FALSE(FPDFBookmark_GetDest(document(), child));
518 FPDF_BOOKMARK grand_child = FPDFBookmark_GetFirstChild(document(), child);
519 EXPECT_FALSE(grand_child);
521 FPDF_BOOKMARK sibling = FPDFBookmark_GetNextSibling(document(), child);
522 EXPECT_TRUE(sibling);
528 FPDF_BOOKMARK sibling2 = FPDFBookmark_GetNextSibling(document(), sibling);
529 EXPECT_TRUE(sibling2);
534 EXPECT_FALSE(FPDFBookmark_GetNextSibling(document(), sibling2));
536 grand_child = FPDFBookmark_GetFirstChild(document(), sibling);
537 EXPECT_TRUE(grand_child);
541 EXPECT_TRUE(FPDFBookmark_GetDest(document(), grand_child));
543 EXPECT_FALSE(FPDFBookmark_GetNextSibling(document(), grand_child));
547 unsigned short buf[128];
550 ASSERT_TRUE(OpenDocument(
"bookmarks.pdf"));
553 ScopedFPDFWideString title = GetFPDFWideString(L"A Good Beginning");
554 FPDF_BOOKMARK child = FPDFBookmark_Find(document(), title.get());
562 EXPECT_EQ(child, FPDFBookmark_GetFirstChild(document(),
nullptr));
565 ScopedFPDFWideString bad_title = GetFPDFWideString(L"A BAD Beginning");
566 EXPECT_FALSE(FPDFBookmark_Find(document(), bad_title.get()));
572 ASSERT_TRUE(OpenDocument(
"bookmarks_circular.pdf"));
575 ScopedFPDFWideString title = GetFPDFWideString(L"anything");
576 EXPECT_FALSE(FPDFBookmark_Find(document(), title.get()));
580 ASSERT_TRUE(OpenDocument(
"hello_world.pdf"));
581 EXPECT_EQ(1, FPDF_GetPageCount(document()));
584 EXPECT_EQ(1, FPDF_GetPageCount(document()));
586 FPDFPage_Delete(document(), -1);
587 EXPECT_EQ(1, FPDF_GetPageCount(document()));
588 FPDFPage_Delete(document(), 1);
589 EXPECT_EQ(1, FPDF_GetPageCount(document()));
591 FPDFPage_Delete(document(), 0);
592 EXPECT_EQ(0, FPDF_GetPageCount(document()));
599 const char* checksum;
601 const PageData expected_page_data[5] = {
605 ?
"4b6590a267eae90b8be1607e808fb57f"
606 :
"1e5d1cf19ffbb9cf9dbf099483cea327";
611 ?
"e8edd3655f6629ff489bd8c3bb110c82"
612 :
"65c80685916aa36e767dd2270ba4d72b";
617 ?
"a2bde6b68d7981e665ab25bc633746aa"
618 :
"a53b21c68edf43c1cddb5c06e361bb45";
623 ?
"a8c5b3e626f665eddf593c6d4c32ae9e"
624 :
"dcd768be15efb9c6e5093cf74508752c";
628 ?
"72eb157853ae2d19b70ea62e3f5ac202"
629 :
"7a3f8f79ebcb350854c0d69607729ec5";
633 ASSERT_TRUE(OpenDocument(
"rectangles_multi_pages.pdf"));
634 EXPECT_EQ(5, FPDF_GetPageCount(document()));
635 for (
int i = 0; i < 5; ++i) {
636 FPDF_PAGE page = LoadPage(i);
638 ScopedFPDFBitmap bitmap = RenderLoadedPage(page);
639 const PageData& expected = expected_page_data[i];
640 CompareBitmap(bitmap.get(), expected.width, expected.height,
646 FPDFPage_Delete(document(), 0);
647 EXPECT_EQ(4, FPDF_GetPageCount(document()));
648 for (
int i = 0; i < 4; ++i) {
649 FPDF_PAGE page = LoadPage(i);
651 ScopedFPDFBitmap bitmap = RenderLoadedPage(page);
652 const PageData& expected = expected_page_data[i + 1];
653 CompareBitmap(bitmap.get(), expected.width, expected.height,
659 FPDFPage_Delete(document(), 3);
660 EXPECT_EQ(3, FPDF_GetPageCount(document()));
661 for (
int i = 0; i < 3; ++i) {
662 FPDF_PAGE page = LoadPage(i);
664 ScopedFPDFBitmap bitmap = RenderLoadedPage(page);
665 const PageData& expected = expected_page_data[i + 1];
666 CompareBitmap(bitmap.get(), expected.width, expected.height,
672 FPDFPage_Delete(document(), 1);
673 EXPECT_EQ(2, FPDF_GetPageCount(document()));
674 for (
int i = 0; i < 2; ++i) {
675 FPDF_PAGE page = LoadPage(i);
677 ScopedFPDFBitmap bitmap = RenderLoadedPage(page);
678 int adjusted_index = i == 0 ? 1 : 3;
679 const PageData& expected = expected_page_data[adjusted_index];
680 CompareBitmap(bitmap.get(), expected.width, expected.height,
687 ASSERT_TRUE(OpenDocument(
"split_streams.pdf"));
688 constexpr size_t kMd5Length = 17;
689 char buf[kMd5Length];
691 FPDF_GetFileIdentifier(document(),
static_cast<FPDF_FILEIDTYPE>(-1),
694 FPDF_GetFileIdentifier(document(),
static_cast<FPDF_FILEIDTYPE>(2),
696 EXPECT_EQ(0u, FPDF_GetFileIdentifier(
nullptr, FILEIDTYPE_PERMANENT, buf,
698 EXPECT_EQ(kMd5Length, FPDF_GetFileIdentifier(document(), FILEIDTYPE_PERMANENT,
701 constexpr char kExpectedPermanent[] =
702 "\xF3\x41\xAE\x65\x4A\x77\xAC\xD5\x06\x5A\x76\x45\xE5\x96\xE6\xE6";
703 ASSERT_EQ(kMd5Length, FPDF_GetFileIdentifier(document(), FILEIDTYPE_PERMANENT,
705 EXPECT_EQ(kExpectedPermanent, ByteString(buf));
707 constexpr char kExpectedChanging[] =
708 "\xBC\x37\x29\x8A\x3F\x87\xF4\x79\x22\x9B\xCE\x99\x7C\xA7\x91\xF7";
709 ASSERT_EQ(kMd5Length, FPDF_GetFileIdentifier(document(), FILEIDTYPE_CHANGING,
711 EXPECT_EQ(kExpectedChanging, ByteString(buf));
715 ASSERT_TRUE(OpenDocument(
"non_hex_file_id.pdf"));
718 constexpr char kPermanentNonHex[] =
"permanent non-hex";
719 ASSERT_EQ(18u, FPDF_GetFileIdentifier(document(), FILEIDTYPE_PERMANENT, buf,
721 EXPECT_EQ(kPermanentNonHex, ByteString
(buf
));
723 constexpr char kChangingNonHex[] =
"changing non-hex";
724 ASSERT_EQ(17u, FPDF_GetFileIdentifier(document(), FILEIDTYPE_CHANGING, buf,
726 EXPECT_EQ(kChangingNonHex, ByteString
(buf
));
730 ASSERT_TRUE(OpenDocument(
"hello_world.pdf"));
732 0u, FPDF_GetFileIdentifier(document(), FILEIDTYPE_PERMANENT,
nullptr, 0));
734 0u, FPDF_GetFileIdentifier(document(), FILEIDTYPE_CHANGING,
nullptr, 0));
738 ASSERT_TRUE(OpenDocument(
"bug_601362.pdf"));
741 unsigned short buf[128];
742 EXPECT_EQ(0u, FPDF_GetMetaText(document(),
nullptr, buf,
sizeof(buf)));
746 EXPECT_EQ(2u, FPDF_GetMetaText(document(),
"", buf,
sizeof(buf)));
747 EXPECT_EQ(2u, FPDF_GetMetaText(document(),
"foo", buf,
sizeof(buf)));
748 ASSERT_EQ(2u, FPDF_GetMetaText(document(),
"Title", buf,
sizeof(buf)));
749 ASSERT_EQ(2u, FPDF_GetMetaText(document(),
"Author", buf,
sizeof(buf)));
750 ASSERT_EQ(2u, FPDF_GetMetaText(document(),
"Subject", buf,
sizeof(buf)));
751 ASSERT_EQ(2u, FPDF_GetMetaText(document(),
"Keywords", buf,
sizeof(buf)));
752 ASSERT_EQ(2u, FPDF_GetMetaText(document(),
"Producer", buf,
sizeof(buf)));
754 ASSERT_EQ(30u, FPDF_GetMetaText(document(),
"Creator", buf,
sizeof(buf)));
758 FPDF_GetMetaText(document(),
"CreationDate", buf,
sizeof(buf)));
761 ASSERT_EQ(48u, FPDF_GetMetaText(document(),
"ModDate", buf,
sizeof(buf)));
766 ASSERT_TRUE(OpenDocument(
"utf-8.pdf"));
768 unsigned short buf[128];
770 ASSERT_EQ(34u, FPDF_GetMetaText(document(),
"Producer", buf,
sizeof(buf)));
773 FPDF_BOOKMARK child = FPDFBookmark_GetFirstChild(document(),
nullptr);
780 ASSERT_TRUE(OpenDocument(
"bug_182.pdf"));
782 unsigned short buf[128];
784 ASSERT_EQ(48u, FPDF_GetMetaText(document(),
"Title", buf,
sizeof(buf)));
789 ASSERT_TRUE(OpenDocument(
"annotation_highlight_square_with_ap.pdf"));
794 unsigned short buf[128];
795 ASSERT_EQ(48u, FPDF_GetMetaText(document(),
"ModDate", buf,
sizeof(buf)));
800 ASSERT_TRUE(OpenDocument(
"embedded_attachments.pdf"));
803 unsigned short buf[128];
804 ASSERT_EQ(48u, FPDF_GetMetaText(document(),
"ModDate", buf,
sizeof(buf)));
809 ScopedFPDFDocument empty_doc(FPDF_CreateNewDocument());
810 unsigned short buf[128];
811 EXPECT_EQ(2u, FPDF_GetMetaText(empty_doc.get(),
"Title", buf,
sizeof(buf)));
815 ASSERT_TRUE(OpenDocument(
"get_page_aaction.pdf"));
816 FPDF_PAGE page = LoadPage(0);
828 const char kExpectedResult[] =
"\\\\127.0.0.1\\c$\\Program Files\\test.exe";
829 const unsigned long kExpectedLength =
sizeof(kExpectedResult);
833 EXPECT_EQ(kExpectedLength, bufsize);
835 EXPECT_STREQ(kExpectedResult, buf);
847 ASSERT_TRUE(OpenDocument(
"about_blank.pdf"));
848 EXPECT_EQ(1, FPDF_GetPageCount(document()));
850 ASSERT_EQ(0u, FPDF_GetPageLabel(document(), 0,
nullptr, 0));
854 ASSERT_TRUE(OpenDocument(
"page_labels.pdf"));
855 EXPECT_EQ(7, FPDF_GetPageCount(document()));
859 SetWholeFileAvailable();
861 unsigned short buf[128];
862 EXPECT_EQ(0u, FPDF_GetPageLabel(document(), -2, buf,
sizeof(buf)));
863 EXPECT_EQ(0u, FPDF_GetPageLabel(document(), -1, buf,
sizeof(buf)));
865 ASSERT_EQ(4u, FPDF_GetPageLabel(document(), 0, buf,
sizeof(buf)));
868 ASSERT_EQ(6u, FPDF_GetPageLabel(document(), 1, buf,
sizeof(buf)));
871 ASSERT_EQ(4u, FPDF_GetPageLabel(document(), 2, buf,
sizeof(buf)));
874 ASSERT_EQ(4u, FPDF_GetPageLabel(document(), 3, buf,
sizeof(buf)));
877 ASSERT_EQ(8u, FPDF_GetPageLabel(document(), 4, buf,
sizeof(buf)));
880 ASSERT_EQ(8u, FPDF_GetPageLabel(document(), 5, buf,
sizeof(buf)));
883 ASSERT_EQ(2u, FPDF_GetPageLabel(document(), 6, buf,
sizeof(buf)));
886 ASSERT_EQ(0u, FPDF_GetPageLabel(document(), 7, buf,
sizeof(buf)));
887 ASSERT_EQ(0u, FPDF_GetPageLabel(document(), 8, buf,
sizeof(buf)));
891TEST_F(FPDFDocEmbedderTest, GetXFALinks) {
892 ASSERT_TRUE(OpenDocument(
"simple_xfa.pdf"));
894 ScopedFPDFPage page(FPDF_LoadPage(document(), 0));
897 FPDFLink_GetLinkAtPoint(page.get(), 150, 360);
898 FPDFLink_GetLinkAtPoint(page.get(), 150, 420);
static bool UseSkiaRenderer()
uint32_t GetParsedPageCountForTesting()
ByteString(const char *ptr)
FPDF_EXPORT FPDF_ACTION FPDF_CALLCONV FPDFLink_GetAction(FPDF_LINK link)
FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDFLink_GetDest(FPDF_DOCUMENT document, FPDF_LINK link)
FPDF_EXPORT FPDF_ACTION FPDF_CALLCONV FPDFBookmark_GetAction(FPDF_BOOKMARK bookmark)
FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDFAction_GetDest(FPDF_DOCUMENT document, FPDF_ACTION action)
FPDF_EXPORT FPDF_BOOKMARK FPDF_CALLCONV FPDFBookmark_Find(FPDF_DOCUMENT document, FPDF_WIDESTRING title)
FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFDest_GetView(FPDF_DEST dest, unsigned long *pNumParams, FS_FLOAT *pParams)
FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFBookmark_GetTitle(FPDF_BOOKMARK bookmark, void *buffer, unsigned long buflen)
FPDF_EXPORT FPDF_ACTION FPDF_CALLCONV FPDF_GetPageAAction(FPDF_PAGE page, int aa_type)
FPDF_EXPORT FPDF_BOOKMARK FPDF_CALLCONV FPDFBookmark_GetNextSibling(FPDF_DOCUMENT document, FPDF_BOOKMARK bookmark)
FPDF_EXPORT int FPDF_CALLCONV FPDFLink_GetLinkZOrderAtPoint(FPDF_PAGE page, double x, double y)
FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDFBookmark_GetDest(FPDF_DOCUMENT document, FPDF_BOOKMARK bookmark)
FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFAction_GetFilePath(FPDF_ACTION action, void *buffer, unsigned long buflen)
FPDF_EXPORT int FPDF_CALLCONV FPDFBookmark_GetCount(FPDF_BOOKMARK bookmark)
FPDF_EXPORT FPDF_ANNOTATION FPDF_CALLCONV FPDFLink_GetAnnot(FPDF_PAGE page, FPDF_LINK link_annot)
FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFAction_GetType(FPDF_ACTION action)
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFDest_GetLocationInPage(FPDF_DEST dest, FPDF_BOOL *hasXVal, FPDF_BOOL *hasYVal, FPDF_BOOL *hasZoomVal, FS_FLOAT *x, FS_FLOAT *y, FS_FLOAT *zoom)
FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFAction_GetURIPath(FPDF_DOCUMENT document, FPDF_ACTION action, void *buffer, unsigned long buflen)
FPDF_EXPORT unsigned long FPDF_CALLCONV FPDF_GetMetaText(FPDF_DOCUMENT document, FPDF_BYTESTRING tag, void *buffer, unsigned long buflen)
FPDF_EXPORT FPDF_LINK FPDF_CALLCONV FPDFLink_GetLinkAtPoint(FPDF_PAGE page, double x, double y)
FPDF_EXPORT FPDF_BOOKMARK FPDF_CALLCONV FPDFBookmark_GetFirstChild(FPDF_DOCUMENT document, FPDF_BOOKMARK bookmark)
FPDF_EXPORT int FPDF_CALLCONV FPDFDest_GetDestPageIndex(FPDF_DOCUMENT document, FPDF_DEST dest)
#define PDFDEST_VIEW_UNKNOWN_MODE
#define PDFACTION_EMBEDDEDGOTO
#define PDFACTION_UNSUPPORTED
TEST_F(FPDFDocEmbedderTest, MultipleSamePage)
FPDF_EXPORT void FPDF_CALLCONV FPDFPage_Delete(FPDF_DOCUMENT document, int page_index)
std::wstring GetPlatformWString(FPDF_WIDESTRING wstr)