summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_doc_embeddertest.cpp
AgeCommit message (Collapse)Author
2018-08-23Remove deprecated FPDFDest_GetPageIndex() API.Lei Zhang
Use FPDFDest_GetDestPageIndex() instead. BUG=pdfium:1041 Change-Id: I8e91ef46456a60ebd873068765b7c3ff1a991fa4 Reviewed-on: https://pdfium-review.googlesource.com/41230 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-08-22Properly handle language markers in decoded textRyan Harrison
In text like document title 0x001B is used as a marker for the beginning/end of a language metadata section. Currently PDFium does nothing with this data, but when returning the 'decoded' text it needs to be stripped out. The existing code assumed that the two bytes following a marker would be the data to be removed and did nothing to track if it was in/out of one of these regions. This led to a situation where it would always strip the two bytes following the region, since it assumed the end marker was the beginning of a new region. This CL corrects the detection and handling of these regions, and adds a regression test for the reported bug. BUG=pdfium:182 Change-Id: I92ddba5666274a8986fed03f502a0331f150f7ac Reviewed-on: https://pdfium-review.googlesource.com/41070 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-06-05Add test for FPDF_GetPageSizeByIndex()Tom Sepez
Ensure that FPDF_GetPageSizeByIndex() doesn't do a full page parse. Issue was noticed on CL https://pdfium-review.googlesource.com/32830 Change-Id: I51966e0b91e1a002d33ee51f00c0428fa1cda04d Reviewed-on: https://pdfium-review.googlesource.com/33792 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-06-04Revert "Make CPDF_Document cache CPDF_Pages"Tom Sepez
This reverts commit f0d9d28a034fe3650c3c2d662090c1e8687ddb16. Reason for revert: avoid parsing page. Change-Id: Id3478f7e38f1cbe95d098e00158b1d7d9dc6f76e Reviewed-on: https://pdfium-review.googlesource.com/33750 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-05-30Make CPDF_Document cache CPDF_PagesTom Sepez
We cache pages not by page number, which can bounce around as pages are inserted or removed, but by page dictionary's object number. Since the page may be created under one function and used under another, we can't take the shortcut of not instantiating a render cache nor not parsing the page. Change-Id: I9a325cda8b3141153544ac53e78a51a44e6b411a Reviewed-on: https://pdfium-review.googlesource.com/32830 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-05-14Add regression test for XFA crash under CPDF_LinkList::GetPageLinks().Tom Sepez
Bug: 840922 Change-Id: I984db568153bd55eff6d217e6a5219fd8a32c947 Reviewed-on: https://pdfium-review.googlesource.com/32470 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-05-07Add test for mutltiple copies of same PDF page.Tom Sepez
Shows that under non-XFA, we hand out a new FPDF_PAGE on each call, but under XFA we hand out the same FPDF_PAGE and ref-count it under the covers. Change-Id: I47cd28c65faed90cf425bbc920e1b56b1e4676a8 Reviewed-on: https://pdfium-review.googlesource.com/32057 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-03-28Rename fpdfsdk/fpdf* files to be consistentDan Sinclair
This CL makes the fpdfsdk/fpdf* files to be consistently prefixed with fpdf_ instead of randomly dropping the _. Change-Id: I23e3c8a0831b56bcd17c788d9fe874b2ab8b24fc Reviewed-on: https://pdfium-review.googlesource.com/29390 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>