| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Allow reading font name from Windows name table entry. This change adds support for reading font names from the TTF table from both Mac/MacRoman and Windows/Unicode name entries. Before, only Mac/MacRoman was supported. Bug: pdfium:1427 Change-Id: I435265c43d4fb85664323d6a674244690e60cc21 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/62830 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Fix CID Font /W array output error Function CreateWidthsArray being invoked from function LoadCustomCompositeFont misproduces continuous array when actual font character sequence contains gaps. Bug: 377948405 Change-Id: Ic97178aa46f4c582c3cce99054712ec47be62e4c Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/125730 Commit-Queue: Thomas Sepez <tsepez@google.com> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Thomas Sepez <tsepez@google.com> | 1 年前 | |
Fixed a return value error in CJS_Document::getAnnots. The function incorrectly returned the number of pages. After the fix, it returns the total number of annotations across all pages. Bug: 421304870 Change-Id: I923dfa5b9cabf7d37bdc75a1cb2f41e90d60c9c5 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/135230 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 10 个月前 | |
[Skia] Optimize DrawPath() when knockout is on Instead of calculating geometric union and subtraction of paths which may contain many points, composite the objects in pixel-space using blend modes. This updates the pdfium_tests hash in DEPS to https://pdfium-review.googlesource.com/c/pdfium_tests/+/138210 Initially I kept the same structure of doing a union or difference based on the stroke color and drawing the stroke on the separate layer from the fill. However when I read ISO 32000-1:2008 I realized I could simplify it and make the function more accurately follow the spec. Rendering performance for the pdf in the bug using pdfium_test: - Before: 68.72s user 0.37s system 99% cpu 1:09.14 total - After: 0.52s user 0.12s system 99% cpu 0.645 total Bug: 334774307, 460180742 Change-Id: I7cc2d264bb06182c69d74dc7fcd04fe285d47256 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/137630 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: April Kallmeyer <ask@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 7 个月前 | |
Cover more of CFXA_ViewLayoutProcessor::RunBreak(). We don't have enough of a full-up document in the test case to generate expected result pixels, so run as an embedder test instead of as a pixel test. - Inherit from XFA embedder test class, invoking more cleanup. Change-Id: I24b65b37c314b4b16a95244e35f4132c7d492099 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/94152 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 4 年前 | |
Add FPDFFlattenEmbedderTest.FlatWithBadFont Demonstrate how PDFium-flattened output carries over an out-of-spec font encoding from the input. Bug: 344775293 Change-Id: Ic7dab7408a6b14b6494ae69818cc34ed43e841f9 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/120850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Thomas Sepez <tsepez@google.com> | 2 年前 | |
Add FPDFFlattenEmbedderTest.FlatWithBadFont Demonstrate how PDFium-flattened output carries over an out-of-spec font encoding from the input. Bug: 344775293 Change-Id: Ic7dab7408a6b14b6494ae69818cc34ed43e841f9 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/120850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Thomas Sepez <tsepez@google.com> | 2 年前 | |
Add a test case for incorrect PDF flattening Demonstrate Encoding dictionaries without /BaseEncoding are being removed during the flattening process. Bug: 363015187 Change-Id: I2389801cd24eae58a05c4fa42a5565536bac7356 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/123970 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@google.com> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 1 年前 | |
Add a test case for incorrect PDF flattening Demonstrate Encoding dictionaries without /BaseEncoding are being removed during the flattening process. Bug: 363015187 Change-Id: I2389801cd24eae58a05c4fa42a5565536bac7356 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/123970 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@google.com> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 1 年前 | |
Add basic /JPXDecode test cases Adds test cases for the /JPXDecode filter that exercise all the basic color spaces (gray, RGB, and CMYK), both with and without opacity. The test file renders correctly in Adobe Acrobat Reader, but has issues in most other PDF readers. The expectation file was created manually, based on the PDF specification, and may not reflect our final implementation. The files are included into the .in template using the {{include}} mechanism, without additional filters. The gray and RGB files are in the basic JP2 (.jp2) format, while the CMYK files are in JPX (.jpf) format, as CMYK support is an extension. This change includes a simple utility script, strip_jp2_comments.py, for removing comment segments from a JPEG 2000 codestream. Bug: pdfium:2000 Change-Id: I246ab1573b15089af9f2812d62b49ae67680d249 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/104710 Commit-Queue: K. Moon <kmoon@chromium.org> Auto-Submit: K. Moon <kmoon@chromium.org> Reviewed-by: Nigi <nigi@chromium.org> | 3 年前 | |
Add basic /JPXDecode test cases Adds test cases for the /JPXDecode filter that exercise all the basic color spaces (gray, RGB, and CMYK), both with and without opacity. The test file renders correctly in Adobe Acrobat Reader, but has issues in most other PDF readers. The expectation file was created manually, based on the PDF specification, and may not reflect our final implementation. The files are included into the .in template using the {{include}} mechanism, without additional filters. The gray and RGB files are in the basic JP2 (.jp2) format, while the CMYK files are in JPX (.jpf) format, as CMYK support is an extension. This change includes a simple utility script, strip_jp2_comments.py, for removing comment segments from a JPEG 2000 codestream. Bug: pdfium:2000 Change-Id: I246ab1573b15089af9f2812d62b49ae67680d249 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/104710 Commit-Queue: K. Moon <kmoon@chromium.org> Auto-Submit: K. Moon <kmoon@chromium.org> Reviewed-by: Nigi <nigi@chromium.org> | 3 年前 | |
Add basic /JPXDecode test cases Adds test cases for the /JPXDecode filter that exercise all the basic color spaces (gray, RGB, and CMYK), both with and without opacity. The test file renders correctly in Adobe Acrobat Reader, but has issues in most other PDF readers. The expectation file was created manually, based on the PDF specification, and may not reflect our final implementation. The files are included into the .in template using the {{include}} mechanism, without additional filters. The gray and RGB files are in the basic JP2 (.jp2) format, while the CMYK files are in JPX (.jpf) format, as CMYK support is an extension. This change includes a simple utility script, strip_jp2_comments.py, for removing comment segments from a JPEG 2000 codestream. Bug: pdfium:2000 Change-Id: I246ab1573b15089af9f2812d62b49ae67680d249 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/104710 Commit-Queue: K. Moon <kmoon@chromium.org> Auto-Submit: K. Moon <kmoon@chromium.org> Reviewed-by: Nigi <nigi@chromium.org> | 3 年前 | |
Add basic /JPXDecode test cases Adds test cases for the /JPXDecode filter that exercise all the basic color spaces (gray, RGB, and CMYK), both with and without opacity. The test file renders correctly in Adobe Acrobat Reader, but has issues in most other PDF readers. The expectation file was created manually, based on the PDF specification, and may not reflect our final implementation. The files are included into the .in template using the {{include}} mechanism, without additional filters. The gray and RGB files are in the basic JP2 (.jp2) format, while the CMYK files are in JPX (.jpf) format, as CMYK support is an extension. This change includes a simple utility script, strip_jp2_comments.py, for removing comment segments from a JPEG 2000 codestream. Bug: pdfium:2000 Change-Id: I246ab1573b15089af9f2812d62b49ae67680d249 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/104710 Commit-Queue: K. Moon <kmoon@chromium.org> Auto-Submit: K. Moon <kmoon@chromium.org> Reviewed-by: Nigi <nigi@chromium.org> | 3 年前 | |
Merge to XFA: PDFium embeddertests. This consists of two origin/master CLs: Review URL: https://codereview.chromium.org/857483005 Review URL: https://codereview.chromium.org/827733006 It also fixes a couple of segv's in XFA when the library is initialized and destroyed multiple times in the same process. R=jam@chromium.org TBR=jam@chromium.org Review URL: https://codereview.chromium.org/856623004 | 11 年前 | |
Add FPDFAnnot_GetFormAdditionalActionJavaScript() API This is similar to FPDFAnnot_GetFormFieldType() and allows getting the JavaScript of a given event. Such JavaScripts are used e.g. on a text form which wants to accept dates. Bug: pdfium:1885 Change-Id: Ieceb3042a309b9578e8a6751a60918c7e8d8f91d Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/97950 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 3 年前 | |
Add FPDFAnnot_GetFormAdditionalActionJavaScript() API This is similar to FPDFAnnot_GetFormFieldType() and allows getting the JavaScript of a given event. Such JavaScripts are used e.g. on a text form which wants to accept dates. Bug: pdfium:1885 Change-Id: Ieceb3042a309b9578e8a6751a60918c7e8d8f91d Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/97950 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 3 年前 | |
add file annot api Added experimental public API for getting and creating file attachment annotations. Bug: pdfium:2125 Change-Id: Idc405e88eed1c8efaa7d690c11251ad8f4ede64d Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/116490 Reviewed-by: Thomas Sepez <tsepez@google.com> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Thomas Sepez <tsepez@google.com> | 2 年前 | |
Basic APIs and tests for extracting annotations 1. Added API for extracting annotation properties: * Added testing flag "--annot" that outputs the annotation properties into a .txt file. * Added two embedder tests covering all the API functions. Bug=pdfium:737 Change-Id: I95943a9b2b3d5d431bc8a74a31b27b4f4b521026 Reviewed-on: https://pdfium-review.googlesource.com/6092 Commit-Queue: Jane Liu <janeliulwq@google.com> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Use the {{trailer}} macro in more PDFs. Change-Id: Idd985dfe2def8ae9dfb7921d006129f66d0bce28 Reviewed-on: https://pdfium-review.googlesource.com/c/45630 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Minor change to AP generation logic Current behavior: Our CPVT_GenerateAP::Generate*AP() functions do not get called as long as the annotation dictionary has an "AP" entry. Problem: We always need the "N" entry in AP dictionary to display an annotation. Even though the spec requires "AP" dictionary to have an "N" entry for normal mode appearance, in case of a malformed pdf with "AP" but without "N" in "AP", we won't be able to display the annotation at all. Fix: Always check if "AP" has "N" entry to decide whether AP needs to be generated. If not, then we still need to generate AP, and add to the AP dictionary under the key "N". Bug=pdfium:778 Change-Id: Icf0c6a681b3c8c22b0b67bf8d16ce6fefdc2c45b Reviewed-on: https://pdfium-review.googlesource.com/6692 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Jane Liu <janeliulwq@google.com> | 8 年前 | |
Made existing annotation APIs to work with AP 1. Modified some existing annotation APIs to take into account the effect of annotation's appearance streams. * Added an embedder test testing annotations with APs. This CL is refactored out of https://pdfium-review.googlesource.com/c/6676/. Bug=pdfium:737 Change-Id: I27d5e66dfdb90038d147cab1a26e0bf86b324982 Reviewed-on: https://pdfium-review.googlesource.com/7030 Commit-Queue: Jane Liu <janeliulwq@google.com> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Basic APIs and tests for extracting annotations 1. Added API for extracting annotation properties: * Added testing flag "--annot" that outputs the annotation properties into a .txt file. * Added two embedder tests covering all the API functions. Bug=pdfium:737 Change-Id: I95943a9b2b3d5d431bc8a74a31b27b4f4b521026 Reviewed-on: https://pdfium-review.googlesource.com/6092 Commit-Queue: Jane Liu <janeliulwq@google.com> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Calculate AP for multi-line markup annotations correctly Currently, when constructing AP for multi-line markup annotations, we only take into account the first set of quadpoints, resulting in only the first line of the annotation being displayed if the annotation spans multiple lines. This CL, initially written by Jane Liu <janeliulwq@google.com> (https://pdfium-review.googlesource.com/12010) takes into account all the quadpoints, so multi-line annotations can be displayed correctly. BUG=pdfium:876 Change-Id: I8be10ee38e01eb6525ddef556df1b727189455c7 Reviewed-on: https://pdfium-review.googlesource.com/28590 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 8 年前 | |
Calculate AP for multi-line markup annotations correctly Currently, when constructing AP for multi-line markup annotations, we only take into account the first set of quadpoints, resulting in only the first line of the annotation being displayed if the annotation spans multiple lines. This CL, initially written by Jane Liu <janeliulwq@google.com> (https://pdfium-review.googlesource.com/12010) takes into account all the quadpoints, so multi-line annotations can be displayed correctly. BUG=pdfium:876 Change-Id: I8be10ee38e01eb6525ddef556df1b727189455c7 Reviewed-on: https://pdfium-review.googlesource.com/28590 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 8 年前 | |
Basic APIs and tests for extracting and setting annotation paths 1. Added APIs for retrieving existing annotation paths and setting annotation paths. * Added an embedder test testing all the new functions. Bug=pdfium:737 Change-Id: Ic451bcd3be488261baf2182549c4238b887b219e Reviewed-on: https://pdfium-review.googlesource.com/6676 Commit-Queue: Jane Liu <janeliulwq@google.com> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Fix the Size trailer entry in hand written PDFs. Change-Id: Ib84cc570c2ffaf9fdd49d32bc12c7e6197e130c1 Reviewed-on: https://pdfium-review.googlesource.com/6850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Fix the Size trailer entry in hand written PDFs. Change-Id: Ib84cc570c2ffaf9fdd49d32bc12c7e6197e130c1 Reviewed-on: https://pdfium-review.googlesource.com/6850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Add a test case for FPDFAnnot_SetBorder() to test rendering. The existing test case that exercises FPDFAnnot_SetBorder() cannot render the line annotations in its test PDF. Rather than waiting for that issue to get resolved, just leave the existing test case alone and write a second test that uses a different annotation type which is known to have support for borders. Add a new square annotation to annots.pdf, and use that in a new test case to make sure FPDFAnnot_SetBorder() calls reflect in the rendered in-memory PDF and in the saved PDF. With only the new test by itself, it fails, which shows FPDFAnnot_SetBorder() does not work properly. To make the test pass, change FPDFAnnot_SetBorder() to remove appearance streams. Change-Id: I0f34832c545f8d29350542bb57ab1de5f14b39f4 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/79533 Reviewed-by: Daniel Hosseinian <dhoss@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 5 年前 | |
Add a test case for FPDFAnnot_SetBorder() to test rendering. The existing test case that exercises FPDFAnnot_SetBorder() cannot render the line annotations in its test PDF. Rather than waiting for that issue to get resolved, just leave the existing test case alone and write a second test that uses a different annotation type which is known to have support for borders. Add a new square annotation to annots.pdf, and use that in a new test case to make sure FPDFAnnot_SetBorder() calls reflect in the rendered in-memory PDF and in the saved PDF. With only the new test by itself, it fails, which shows FPDFAnnot_SetBorder() does not work properly. To make the test pass, change FPDFAnnot_SetBorder() to remove appearance streams. Change-Id: I0f34832c545f8d29350542bb57ab1de5f14b39f4 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/79533 Reviewed-by: Daniel Hosseinian <dhoss@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 5 年前 | |
Implemented Goto Action Handling for Internal links via key press. Support for opening an internal link exists using mouse. But after setting focus over internal link by pressing Tab key, we do not have the provision to open the internal link using enter key press. This implementation uses FFI_DoGoToAction API to handle opening an internal link. Bug: chromium:994500 Change-Id: I94fde897bc22c283d9304bffd093ee810ba128e8 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68931 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Badhri Ravikumar <bravi@microsoft.com> | 6 年前 | |
Implemented Goto Action Handling for Internal links via key press. Support for opening an internal link exists using mouse. But after setting focus over internal link by pressing Tab key, we do not have the provision to open the internal link using enter key press. This implementation uses FFI_DoGoToAction API to handle opening an internal link. Bug: chromium:994500 Change-Id: I94fde897bc22c283d9304bffd093ee810ba128e8 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68931 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Badhri Ravikumar <bravi@microsoft.com> | 6 年前 | |
Add a test for FPDFPage_GetAnnotIndex() when there is a bad annot entry. The specially crafted test PDF has an array where there should be an annotation dictionary. Then call FPDFPage_GetAnnot() for index 0, and call FPDFPage_GetAnnotIndex() for the returned FPDF_ANNOTATION. FPDFPage_GetAnnotIndex() returns -1. BUG=pdfium:1255 Change-Id: Ia6d5772cc2c045c66b32737e0858fdd5a522aeeb Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/51290 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Add a test for FPDFPage_GetAnnotIndex() when there is a bad annot entry. The specially crafted test PDF has an array where there should be an annotation dictionary. Then call FPDFPage_GetAnnot() for index 0, and call FPDFPage_GetAnnotIndex() for the returned FPDF_ANNOTATION. FPDFPage_GetAnnotIndex() returns -1. BUG=pdfium:1255 Change-Id: Ia6d5772cc2c045c66b32737e0858fdd5a522aeeb Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/51290 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Remove CPDF_Dictionary::IsValidKey(). - The project leader for ISO 32000 says it is wrong. - https://crbug.com/1248924#c8 contains a PDF with non-ASCII keys that work in other PDF viewers. Bug: pdfium:1729 Change-Id: Ica23e5fe655696bed5df0126b350cc6110ce25f5 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/86131 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Remove CPDF_Dictionary::IsValidKey(). - The project leader for ISO 32000 says it is wrong. - https://crbug.com/1248924#c8 contains a PDF with non-ASCII keys that work in other PDF viewers. Bug: pdfium:1729 Change-Id: Ica23e5fe655696bed5df0126b350cc6110ce25f5 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/86131 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Add FPDFPPOEmbedderTest.ImportIntoDocWithWrongPageType test case This CL adds testing/resources/bad_page_type.pdf, which deliberately has the wrong /Type for one of its page objects. This violates the spec, but most PDF viewers will still correctly render this PDF without complaining. Add an embedder test to show that importing into bad_page_type.pdf with FPDF_ImportPagesByIndex() does not work correctly. Bug: pdfium:2098 Change-Id: Ibf8be444b2d63ee1c286544c3427ac3f28c02636 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/113890 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Nigi <nigi@chromium.org> | 2 年前 | |
Add FPDFPPOEmbedderTest.ImportIntoDocWithWrongPageType test case This CL adds testing/resources/bad_page_type.pdf, which deliberately has the wrong /Type for one of its page objects. This violates the spec, but most PDF viewers will still correctly render this PDF without complaining. Add an embedder test to show that importing into bad_page_type.pdf with FPDF_ImportPagesByIndex() does not work correctly. Bug: pdfium:2098 Change-Id: Ibf8be444b2d63ee1c286544c3427ac3f28c02636 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/113890 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Nigi <nigi@chromium.org> | 2 年前 | |
Add a test case for FPDFText_GetUnicode() regression. https://pdfium-review.googlesource.com/80610 regressed text extraction for bigtable-osdi06.pdf, so the CL got reverted in https://pdfium-review.googlesource.com/83070. This adds a regression test with a minimized version of bigtable-osdi06.pdf. Change-Id: Ieff1cabfd0afffc3ad5d538427a766c55099b7d1 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/83072 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Hui Yingst <nigi@chromium.org> | 4 年前 | |
Add a test case for FPDFText_GetUnicode() regression. https://pdfium-review.googlesource.com/80610 regressed text extraction for bigtable-osdi06.pdf, so the CL got reverted in https://pdfium-review.googlesource.com/83070. This adds a regression test with a minimized version of bigtable-osdi06.pdf. Change-Id: Ieff1cabfd0afffc3ad5d538427a766c55099b7d1 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/83072 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Hui Yingst <nigi@chromium.org> | 4 年前 | |
Add a regression test for rasterizing PDFs. BUG=chromium:667012 Review-Url: https://codereview.chromium.org/2508203007 | 9 年前 | |
Improve testing/resources/bookmarks.pdf. Add a larger variety of bookmarks, including: 1) Open and closed bookmarks based on /Count. 2) Bookmarks with working destinations and actions. 3) Bookmarks with child nodes. Update FPDFDocEmbedderTest.Bookmarks to test (2) and (3). Bug: pdfium:1758 Change-Id: Iffc3d6c5b38c359a4342a566945d8d8c14ad9d26 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/93590 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Improve testing/resources/bookmarks.pdf. Add a larger variety of bookmarks, including: 1) Open and closed bookmarks based on /Count. 2) Bookmarks with working destinations and actions. 3) Bookmarks with child nodes. Update FPDFDocEmbedderTest.Bookmarks to test (2) and (3). Bug: pdfium:1758 Change-Id: Iffc3d6c5b38c359a4342a566945d8d8c14ad9d26 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/93590 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Fix the Size trailer entry in hand written PDFs. Change-Id: Ib84cc570c2ffaf9fdd49d32bc12c7e6197e130c1 Reviewed-on: https://pdfium-review.googlesource.com/6850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Fix the Size trailer entry in hand written PDFs. Change-Id: Ib84cc570c2ffaf9fdd49d32bc12c7e6197e130c1 Reviewed-on: https://pdfium-review.googlesource.com/6850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Add test that non-ASCII characters to not foul hyphen processing In this doc there is a hyphen followed a fi ligature. Older versions of PDFium were not inserting the appropriate soft hyphen marker (0x0002) at this point, since they were only checking for ASCII characters. That bug is fixed in the preceding CLs, so this test is being added to avoid regressions. BUG=pdfium:1029 Change-Id: I9c9906de5a13ade1400a589fb18967938150516d Reviewed-on: https://pdfium-review.googlesource.com/28470 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Retain layout item in a few more places where text changes. Although these methods are not explicitly called On*(), they have the same inplications for triggering callbacks. Bug: chromium:1055869 Change-Id: I6bb8f31bf94cf414e14b09201a3f58340b260866 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/67170 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Fix a /Parent reference in xfa_pages_8_0.fragment. Then regenerate all the affected PDFs. Change-Id: I54f605a0e5b5a021463fc3a13fcbba51e94a03f3 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/69251 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Retain layout item in all CFXA_FF.*::Paste() method overrides. Covers cases missed by https://pdfium-review.googlesource.com/c/pdfium/+/67170 Bug: chromium:1058653 Change-Id: I9ede1c49d26bd0c37b80415b1ef30e5d318f79ca Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/67270 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Fix a /Parent reference in xfa_pages_8_0.fragment. Then regenerate all the affected PDFs. Change-Id: I54f605a0e5b5a021463fc3a13fcbba51e94a03f3 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/69251 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Add another embedder test for password handling. A higher level regression test for passwords not working correctly. The instructions to generate the test PDF are on the bug. Bug: chromium:1124998 Change-Id: Ic4fd799b549679eb868febe823e1db2bfc08a5d3 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/73350 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 5 年前 | |
Merge to XFA: Fix stack exhaustion in CPDF_DataAvail::HaveResourceAncestor() Original Review URL: https://codereview.chromium.org/880043004 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/893333003 | 11 年前 | |
Merge to XFA: Fix stack exhaustion in CPDF_DataAvail::HaveResourceAncestor() Original Review URL: https://codereview.chromium.org/880043004 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/893333003 | 11 年前 | |
Handle non-printing characters at beginning of extraction region Currently if a text extraction region begins on a non-printing character then "" will be returned. This is the incorrect behaviour, instead the call should scan ahead until a printing character is found and start extracting from there. Also proactively adds a similar check and scan for the end of the extraction region. BUG=pdfium:1139 Change-Id: Ia2001ac89740f3d31d2bb69e8000773f8b01091b Reviewed-on: https://pdfium-review.googlesource.com/41532 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org> | 7 年前 | |
Handle non-printing characters at beginning of extraction region Currently if a text extraction region begins on a non-printing character then "" will be returned. This is the incorrect behaviour, instead the call should scan ahead until a printing character is found and start extracting from there. Also proactively adds a similar check and scan for the end of the extraction region. BUG=pdfium:1139 Change-Id: Ia2001ac89740f3d31d2bb69e8000773f8b01091b Reviewed-on: https://pdfium-review.googlesource.com/41532 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org> | 7 年前 | |
Add a test to show rendering a PDF can affect saving. PDFs with popups, under certain conditions, create new objects every time they are rendered. BUG=pdfium:1206 Change-Id: I42a8ca63d8c72caa1d4d7980bf26e1a7cafb09b4 Reviewed-on: https://pdfium-review.googlesource.com/c/49710 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Add a test to show rendering a PDF can affect saving. PDFs with popups, under certain conditions, create new objects every time they are rendered. BUG=pdfium:1206 Change-Id: I42a8ca63d8c72caa1d4d7980bf26e1a7cafb09b4 Reviewed-on: https://pdfium-review.googlesource.com/c/49710 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Add a test case for 2-up PDF generation with rotated pages. Demonstrate that identical looking pages created with different page rotations will render differently when converted to a 2-up PDF with FPDF_ImportNPagesToOne(). Bug: chromium:1229106 Change-Id: I22bf5c05e72cd595a9d0cb167c8fcc1f92e549de Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/84071 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Hui Yingst <nigi@chromium.org> | 4 年前 | |
Add a test case for 2-up PDF generation with rotated pages. Demonstrate that identical looking pages created with different page rotations will render differently when converted to a 2-up PDF with FPDF_ImportNPagesToOne(). Bug: chromium:1229106 Change-Id: I22bf5c05e72cd595a9d0cb167c8fcc1f92e549de Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/84071 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Hui Yingst <nigi@chromium.org> | 4 年前 | |
Add test case for leak from bug 1265. Disable for LSAN builds because it leaks. Bug: pdfium:1265 Change-Id: I7b4afff4a390321b59450b88a078ac12c86960cc Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/54130 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Add test case for leak from bug 1265. Disable for LSAN builds because it leaks. Bug: pdfium:1265 Change-Id: I7b4afff4a390321b59450b88a078ac12c86960cc Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/54130 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Add a regression test for a CPDF_StructElement crash. Add a test case to make sure creating and destroying a struct tree does not crash for certain trees. Bug: chromium:1296920 Change-Id: Idb907df086092b0b65569ac43914b7be082cfcb4 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/91030 Reviewed-by: Nigi <nigi@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Add a regression test for a CPDF_StructElement crash. Add a test case to make sure creating and destroying a struct tree does not crash for certain trees. Bug: chromium:1296920 Change-Id: Idb907df086092b0b65569ac43914b7be082cfcb4 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/91030 Reviewed-by: Nigi <nigi@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Explicitly check for null parent in CXFA_LayoutPageMgr::CreateViewRecord() Prior to the refactoring in 112b16f, this would silently succeed despite invoking a method on a null |this| because of an early return prior to touching member variables. This restores that old behaviour. Bug: pdfium:1301 Change-Id: I3fdb37cd1420b5af86d784d24fd6e15a010bb224 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/54710 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Fix a /Parent reference in xfa_pages_8_0.fragment. Then regenerate all the affected PDFs. Change-Id: I54f605a0e5b5a021463fc3a13fcbba51e94a03f3 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/69251 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Add a test for rendering a transparency onto a white background Demonstrate an issue where the transparency is not rendered. Use an embedder test with a specific FPDFBitmap_FillRect() call to trigger the bug. The bug does not happen in pixel tests and in CompareBitmap(). Bug: chromium:1302355 Change-Id: I01a3dc6eb00810d77082a732aece2239a4744445 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/113210 Reviewed-by: Nigi <nigi@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 2 年前 | |
Add a test for rendering a transparency onto a white background Demonstrate an issue where the transparency is not rendered. Use an embedder test with a specific FPDFBitmap_FillRect() call to trigger the bug. The bug does not happen in pixel tests and in CompareBitmap(). Bug: chromium:1302355 Change-Id: I01a3dc6eb00810d77082a732aece2239a4744445 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/113210 Reviewed-by: Nigi <nigi@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 2 年前 | |
Create new stream objects when changing annotation appearance streams. Avoid editing existing streams, as they may be shared. Update affected JS tests as a result. The new behavior better matches other PDF JS implementations. Bug: chromium:1302455 Change-Id: Ib0f56b6f9eda29a94a2b98e758c77a84b2ef36ec Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/91290 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Create new stream objects when changing annotation appearance streams. Avoid editing existing streams, as they may be shared. Update affected JS tests as a result. The new behavior better matches other PDF JS implementations. Bug: chromium:1302455 Change-Id: Ib0f56b6f9eda29a94a2b98e758c77a84b2ef36ec Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/91290 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Beware of negative offset values in trailers. Handle them as if they were omitted entirely (e.g. zero). Bug: chromium:1324503, chromium:1324189 Change-Id: Icd3d28793d4168274b0b5a8829069afd3e2ddbea Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/93615 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Beware of negative offset values in trailers. Handle them as if they were omitted entirely (e.g. zero). Bug: chromium:1324503, chromium:1324189 Change-Id: Icd3d28793d4168274b0b5a8829069afd3e2ddbea Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/93615 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Beware of negative offset values in trailers. Handle them as if they were omitted entirely (e.g. zero). Bug: chromium:1324503, chromium:1324189 Change-Id: Icd3d28793d4168274b0b5a8829069afd3e2ddbea Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/93615 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Beware of negative offset values in trailers. Handle them as if they were omitted entirely (e.g. zero). Bug: chromium:1324503, chromium:1324189 Change-Id: Icd3d28793d4168274b0b5a8829069afd3e2ddbea Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/93615 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Ensure pProtoNode is a template in CJX_Object::ScriptAttributeString. Malformed documents may result in other nodes being found here. In turn, beef up the test harness to handle null returns in a few places. Bug: chromium:1327884 Change-Id: I5139d2c4041908123b8317ab826352c3430d05d7 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/94010 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 4 年前 | |
Add a test case for a DCHECK() failure inside FPDF_SaveAsCopy(). Add a simple FPDFSaveEmbedderTest test case that calls FPDF_SaveAsCopy() on a malformed PDF. The test case starts out disabled because it currently triggers the bug. Bug: chromium:1328389 Change-Id: I944cebaa1b4f57e74a7aeffe79ea9b5e313b71ed Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/93910 Reviewed-by: Nigi <nigi@chromium.org> Commit-Queue: Nigi <nigi@chromium.org> | 4 年前 | |
Add a test case for a DCHECK() failure inside FPDF_SaveAsCopy(). Add a simple FPDFSaveEmbedderTest test case that calls FPDF_SaveAsCopy() on a malformed PDF. The test case starts out disabled because it currently triggers the bug. Bug: chromium:1328389 Change-Id: I944cebaa1b4f57e74a7aeffe79ea9b5e313b71ed Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/93910 Reviewed-by: Nigi <nigi@chromium.org> Commit-Queue: Nigi <nigi@chromium.org> | 4 年前 | |
Add (disabled) test case for functional bug 1333298 Keep it disabled until the underlying issue is resolved. -- fix pre-existing gtest naming convention in other test in file. Bug: chromium:1333298 Change-Id: I528c2dc06d98ab737e940593c8ed9160339c185a Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/94290 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 4 年前 | |
Add (disabled) test case for functional bug 1333298 Keep it disabled until the underlying issue is resolved. -- fix pre-existing gtest naming convention in other test in file. Bug: chromium:1333298 Change-Id: I528c2dc06d98ab737e940593c8ed9160339c185a Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/94290 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 4 年前 | |
Add FPDFText_HasUnicodeMapError() API. PDFium already detects characters with invalid ToUnicode mappings. Plumb this to a public API so embedders can use this info. The newly added testing/resources/bug_1388_2.pdf file is generated from testing/resources/pixel/bug_1388_2.in. Bug: pdfium:1926 Change-Id: I9f2f8975b33e80cdbdb302821156f64bdc000f12 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/100211 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 3 年前 | |
Add a pixel test for pattern rendering. Bug: chromium:984811 Change-Id: If04619ffe51bb65b38eee888606566bd2cb3b75c Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/61031 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 6 年前 | |
Add a pixel test for pattern rendering. Bug: chromium:984811 Change-Id: If04619ffe51bb65b38eee888606566bd2cb3b75c Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/61031 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 6 年前 | |
Fix Skia rendering when using reverse-byte-order option. When using --reverse-byte-order rendering option, the R and B channels in the backing SkCanvas are already flipped during the construction of Skia rendering device. We no longer needed to flip the byte order in Upsample() calls. Bug: chromium:1396264, pdfium:1955 Change-Id: I272a70a8e588c772044877058cf9739154b86220 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/103110 Commit-Queue: Nigi <nigi@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 3 年前 | |
Fix Skia rendering when using reverse-byte-order option. When using --reverse-byte-order rendering option, the R and B channels in the backing SkCanvas are already flipped during the construction of Skia rendering device. We no longer needed to flip the byte order in Upsample() calls. Bug: chromium:1396264, pdfium:1955 Change-Id: I272a70a8e588c772044877058cf9739154b86220 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/103110 Commit-Queue: Nigi <nigi@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 3 年前 | |
Fix crashes in FPDFClipPath_CountPaths() and friends. FPDFClipPath_CountPaths(), FPDFClipPath_CountPathSegments(), and FPDFClipPath_GetPathSegment() all need to verify the FPDF_CLIPPATH passed in has a reference. Bug: pdfium:1399 Change-Id: Ib89eff933882e2ccb1736828799547fb9ac0d29b Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/61090 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 6 年前 | |
Ensure {{include}} output ends on its own line Ensures fixup_pdf_template.py ends the output of any {{include}} directive on its own line. This ensures any lines after an {{include}} are treated separately from the inclusion itself. For example, macOS Preview doesn't treat bug_1469.jp2 as a valid JP2 file, because it has an extraneous newline character at the end. This character previously was necessary to separate the inclusion from the following "endstream" token. With the fix, the extra character in the JP2 file is no longer needed. If including a file that allows modifying line endings, the final line ending may be borrowed from the included file. Bug: pdfium:2000 Change-Id: I23963ee8ebe92db659640f0878d2f8cc019b68d3 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/104690 Reviewed-by: Nigi <nigi@chromium.org> Commit-Queue: K. Moon <kmoon@chromium.org> | 3 年前 | |
Replace overly-strong DCHECK() in CPDF_FormField::SetItemSelection(). Early return in error should the condition occur. -- Same for UseSelectedIndicesObject(). Bug: chromium:1477093 Change-Id: I0075020a4d843895e3f9b69e6b5a26467ab66baa Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/111552 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nigi <nigi@chromium.org> | 2 年前 | |
Replace overly-strong DCHECK() in CPDF_FormField::SetItemSelection(). Early return in error should the condition occur. -- Same for UseSelectedIndicesObject(). Bug: chromium:1477093 Change-Id: I0075020a4d843895e3f9b69e6b5a26467ab66baa Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/111552 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nigi <nigi@chromium.org> | 2 年前 | |
Add regression tests for a failure in FindPageIndex(). Bug: pdfium:1506 Change-Id: I141c263236dae9bf7910490404ada3f58c10c88b Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68590 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Add regression tests for a failure in FindPageIndex(). Bug: pdfium:1506 Change-Id: I141c263236dae9bf7910490404ada3f58c10c88b Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68590 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Add a test case for FPDFPage_GenerateContent() not applying color. This minimal test case demonstrates the bug in question and leaves a TODO to fix it. Bug: pdfium:1549 Change-Id: I1ef27ae7bf305e73f94c080031063dc9c6270ae5 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/82890 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Hui Yingst <nigi@chromium.org> | 4 年前 | |
Add a test case for FPDFPage_GenerateContent() not applying color. This minimal test case demonstrates the bug in question and leaves a TODO to fix it. Bug: pdfium:1549 Change-Id: I1ef27ae7bf305e73f94c080031063dc9c6270ae5 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/82890 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Hui Yingst <nigi@chromium.org> | 4 年前 | |
Add test for dropped clipping paths when saving dirty text When saving a document with text that has been changed (dirty), the text object's stream is regenerated and the clipping paths are dropped. Add a test PDF and an embedder test proving the behavior. Bug: pdfium:1558 Change-Id: Ida49ac7abcc4ef7994095d2a656ca53cc60c0a48 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/71670 Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 5 年前 | |
Add test for dropped clipping paths when saving dirty text When saving a document with text that has been changed (dirty), the text object's stream is regenerated and the clipping paths are dropped. Add a test PDF and an embedder test proving the behavior. Bug: pdfium:1558 Change-Id: Ida49ac7abcc4ef7994095d2a656ca53cc60c0a48 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/71670 Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 5 年前 | |
Add test for black rectangle over edited objects inside clipping path The regenerated stream resets the nonstroking color space to black, which causes paths to be drawn as black. Bug: pdfium:1574 Change-Id: I8fce9ba1ba86e866715e17aba96264e1179fa163 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/77630 Reviewed-by: Hui Yingst <nigi@chromium.org> Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> | 5 年前 | |
Add test for black rectangle over edited objects inside clipping path The regenerated stream resets the nonstroking color space to black, which causes paths to be drawn as black. Bug: pdfium:1574 Change-Id: I8fce9ba1ba86e866715e17aba96264e1179fa163 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/77630 Reviewed-by: Hui Yingst <nigi@chromium.org> Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> | 5 年前 | |
Ignore inline images without EI operators If content stream parsing is handling the BI operator and it does not find an EI operator before reaching the end of the stream, then the inline image is invalid and should not be displayed. - Add a pixel test for this to demonstrate this corner case. - Fix bug_1591.in so it has enough image data. The existing file did not take the image pitch into account and was reading "\nEI" as part of the image data. - Temporarily suppress bug_1236805.in pixel test, which uses inline images and is very sensitive to these changes. Bug: 412524377 Change-Id: Icaa7089fb14f0e74c613f7f1461f0d1ead19d656 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/130930 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 1 年前 | |
Ignore inline images without EI operators If content stream parsing is handling the BI operator and it does not find an EI operator before reaching the end of the stream, then the inline image is invalid and should not be displayed. - Add a pixel test for this to demonstrate this corner case. - Fix bug_1591.in so it has enough image data. The existing file did not take the image pitch into account and was reading "\nEI" as part of the image data. - Temporarily suppress bug_1236805.in pixel test, which uses inline images and is very sensitive to these changes. Bug: 412524377 Change-Id: Icaa7089fb14f0e74c613f7f1461f0d1ead19d656 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/130930 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 1 年前 | |
Add a test case for rendering a large image. Add an embedder test case that triggers the integer overflow check in the old CStretchEngine::StartStretchHorz() implementation. The newly added test file is a copy of testing/pixel/bug_718762.in. Note that the rendered image is very large and this test case roughly doubles the embedder_tests run time. Bug: pdfium:1646 Change-Id: Ia9049bfe6f15d2fac103707923627bd644e0ae33 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/100350 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 3 年前 | |
Test rendering an annotation with FPDF_PRINTING flag Add a test to render an non-print type annotation with FPDF_PRINTING flag. This will excise the following condition in CPDF_AnnotList::DisplayPass(): "bPrinting && (annot_flags & pdfium::annotation_flags::kPrint) == 0". Bug: pdfium:1658 Change-Id: Ic07d93f8f1f6be5205f60120a2127987a9ac2a57 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/109392 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Nigi <nigi@chromium.org> | 2 年前 | |
Test rendering an annotation with FPDF_PRINTING flag Add a test to render an non-print type annotation with FPDF_PRINTING flag. This will excise the following condition in CPDF_AnnotList::DisplayPass(): "bPrinting && (annot_flags & pdfium::annotation_flags::kPrint) == 0". Bug: pdfium:1658 Change-Id: Ic07d93f8f1f6be5205f60120a2127987a9ac2a57 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/109392 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Nigi <nigi@chromium.org> | 2 年前 | |
Add a test for rendering embedded font with narrow/wide glyph width. Pixel test bug_845697.in usually gets rendered with FoxitSansMM as the substitute font. To observe how glyphs are scaled when their assigned widths change in the PDF, this CL adds a new test with NotoSansRegular font embedded, and test on rendering behaviors when assigned character width is either narrower or wider than the glyph's default width. Bug: pdfium:1752 Change-Id: I5bd191c143addda6f450dff062765122eafb3d26 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/91514 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Nigi <nigi@chromium.org> | 4 年前 | |
Add a test case for a struct tree that does not parse correctly. The test case is based on the PDF provided by the bug reporter, but reduced in size, and without any PII. Bug: pdfium:1768 Change-Id: Id97c79e97fd9463743af0f9c4c7369230c0b642b Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/90131 Reviewed-by: Nigi <nigi@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Add a test case for a struct tree that does not parse correctly. The test case is based on the PDF provided by the bug reporter, but reduced in size, and without any PII. Bug: pdfium:1768 Change-Id: Id97c79e97fd9463743af0f9c4c7369230c0b642b Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/90131 Reviewed-by: Nigi <nigi@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Add a FPDFText_GetText() test case with scaled text. In this test case, the text is scaled down by 1000X inside an XObject. Then the XObject is scaled up 1000X when drawn. Also draw the XObject again at 1X scale to give the test case more variety. Bug: pdfium:1769 Change-Id: I0067844c3a56ab79b18e0819fb5ec4a3029ec19f Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/90170 Reviewed-by: Nigi <nigi@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Add a FPDFText_GetText() test case with scaled text. In this test case, the text is scaled down by 1000X inside an XObject. Then the XObject is scaled up 1000X when drawn. Also draw the XObject again at 1X scale to give the test case more variety. Bug: pdfium:1769 Change-Id: I0067844c3a56ab79b18e0819fb5ec4a3029ec19f Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/90170 Reviewed-by: Nigi <nigi@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Properly handle language markers in decoded text 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> | 7 年前 | |
Add an embedder test for crbug.com/pdfium/1893 Adds an embedder test to prove that removing an object sometimes affects the content stream matrix unexpectedly. Bug: pdfium:1893 Change-Id: I997c3c094078b768f0ffffc2a5a04084ba05a1e2 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/111870 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Nigi <nigi@chromium.org> | 2 年前 | |
Add an embedder test for crbug.com/pdfium/1893 Adds an embedder test to prove that removing an object sometimes affects the content stream matrix unexpectedly. Bug: pdfium:1893 Change-Id: I997c3c094078b768f0ffffc2a5a04084ba05a1e2 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/111870 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Nigi <nigi@chromium.org> | 2 年前 | |
Fix overlapping glyphs rendering for aliased text Bug: pdfium:1919 Change-Id: I241ccb6ab67ec7b5eb36afb0f090439848cc21d9 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/99531 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 3 年前 | |
Add high-resolution re-rendering test Adds a test for repeatedly rendering a PDF page containing a single full-page, high-resolution (600 DPI) image. This should cache the derived SkImage, but currently does not. Bug: pdfium:2034 Change-Id: I80dff81abbb0b7009fe3ea46d1fe3f21554fcf19 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/108050 Reviewed-by: Nigi <nigi@chromium.org> Commit-Queue: K. Moon <kmoon@chromium.org> | 3 年前 | |
Add high-resolution re-rendering test Adds a test for repeatedly rendering a PDF page containing a single full-page, high-resolution (600 DPI) image. This should cache the derived SkImage, but currently does not. Bug: pdfium:2034 Change-Id: I80dff81abbb0b7009fe3ea46d1fe3f21554fcf19 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/108050 Reviewed-by: Nigi <nigi@chromium.org> Commit-Queue: K. Moon <kmoon@chromium.org> | 3 年前 | |
Add high-resolution re-rendering test Adds a test for repeatedly rendering a PDF page containing a single full-page, high-resolution (600 DPI) image. This should cache the derived SkImage, but currently does not. Bug: pdfium:2034 Change-Id: I80dff81abbb0b7009fe3ea46d1fe3f21554fcf19 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/108050 Reviewed-by: Nigi <nigi@chromium.org> Commit-Queue: K. Moon <kmoon@chromium.org> | 3 年前 | |
Merge to XFA: Loose checking for trailer's size field Although trailer's size value is required by spec, other readers such as Acrobat or libpoppler can handle without it. Loose up the check to be more tolerant. BUG=pdfium:213 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1582193002 . (cherry picked from commit 34291b900ad0472eef582215cfce0d942a40fd16) Review URL: https://codereview.chromium.org/1589783004 . | 10 年前 | |
Add a test case for a PDF saving bug Add a minimal embedder test case to illustate the issue in the associated bug, where a no-op FPDFPageObj_SetMatrix() call causes the saved PDF to have incorrect transformation matrices. Bug: pdfium:2132 Change-Id: Ie14770fca6d15ecad40ace52eb2d9ff270d0cb07 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/116931 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Thomas Sepez <tsepez@google.com> | 2 年前 | |
Add a test case for a PDF saving bug Add a minimal embedder test case to illustate the issue in the associated bug, where a no-op FPDFPageObj_SetMatrix() call causes the saved PDF to have incorrect transformation matrices. Bug: pdfium:2132 Change-Id: Ie14770fca6d15ecad40ace52eb2d9ff270d0cb07 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/116931 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Thomas Sepez <tsepez@google.com> | 2 年前 | |
A crasher due to lacking 'template' node in XFA file A template node is mandatory in XFA file. Pdfium should ignore processing it when no template node is found in XFA file. BUG=pdfium:216 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1423903002 . | 10 年前 | |
A crasher due to lacking 'template' node in XFA file A template node is mandatory in XFA file. Pdfium should ignore processing it when no template node is found in XFA file. BUG=pdfium:216 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1423903002 . | 10 年前 | |
Merge to XFA: Prevent infinite looping in CPDF_Parser::LoadAllCrossRefV5(). BUG=pdfium:298 TBR=weili@chromium.org Review URL: https://codereview.chromium.org/1496703005 . (cherry picked from commit 93181f9a20db7ac706bb9405750303db93762a5b) Review URL: https://codereview.chromium.org/1514783002 . | 10 年前 | |
Merge to XFA: Prevent infinite looping in CPDF_Parser::LoadAllCrossRefV5(). BUG=pdfium:298 TBR=weili@chromium.org Review URL: https://codereview.chromium.org/1496703005 . (cherry picked from commit 93181f9a20db7ac706bb9405750303db93762a5b) Review URL: https://codereview.chromium.org/1514783002 . | 10 年前 | |
Add embedder test for looping/leakage disclosed by bug 306123. Adds a hand-minimized PDF that triggers the issue, and runs it as an embedder test so we can easily conditionally disable it from ASAN until the leak is fixed. Bug: chromium:306123 Change-Id: I82670366d5560bba6658f597aa2b15bda24b91a6 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/54090 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Fix a /Parent reference in xfa_pages_8_0.fragment. Then regenerate all the affected PDFs. Change-Id: I54f605a0e5b5a021463fc3a13fcbba51e94a03f3 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/69251 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Merge to XFA: Fix an infinite loop in CPDF_Parser::RebuildCrossRef(). BUG=pdfium:325 TBR=weili@chromium.org Review URL: https://codereview.chromium.org/1543043003 . (cherry picked from commit 2d88e91ca5538470c9f4bc098e7f1f1ea9013c37) Review URL: https://codereview.chromium.org/1560903002 . | 10 年前 | |
Merge to XFA: Fix an infinite loop in CPDF_Parser::RebuildCrossRef(). BUG=pdfium:325 TBR=weili@chromium.org Review URL: https://codereview.chromium.org/1543043003 . (cherry picked from commit 2d88e91ca5538470c9f4bc098e7f1f1ea9013c37) Review URL: https://codereview.chromium.org/1560903002 . | 10 年前 | |
Merge to XFA: Fix infinite loop caused by parsing same indirect objects BUG=pdfium:343 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1569343002 . (cherry picked from commit 149f1db8bba85bdf2b40d330c38f2478695ca0d5) Review URL: https://codereview.chromium.org/1575663002 . | 10 年前 | |
Loosen palette check in FPDFImageObj_GetBitmap() Adjust FPDFImageObj_GetBitmap() behavior based on PDFium embedder feedback. One of the checks added in https://pdfium-review.googlesource.com/111950 does not work for images that have both indexed colorspaces and /Mask. Add a test PDF where an image has these properties to trigger this behavior. Bug: 343075986 Change-Id: I74805f22d5dffc6adcad144cdd1c8c424b68240b Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/119970 Reviewed-by: Thomas Sepez <tsepez@google.com> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 2 年前 | |
Loosen palette check in FPDFImageObj_GetBitmap() Adjust FPDFImageObj_GetBitmap() behavior based on PDFium embedder feedback. One of the checks added in https://pdfium-review.googlesource.com/111950 does not work for images that have both indexed colorspaces and /Mask. Add a test PDF where an image has these properties to trigger this behavior. Bug: 343075986 Change-Id: I74805f22d5dffc6adcad144cdd1c8c424b68240b Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/119970 Reviewed-by: Thomas Sepez <tsepez@google.com> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 2 年前 | |
Merge to XFA: Fix an infinite loop parsing in CPDF_SyntaxParser::GetObject() CPDF_SyntaxParser::GetObject() may enter into an infinite loop when a signature dictionary doesn't have 'Contents' field. Add a check to avoid that. BUG=pdfium:344 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1575833004 . (cherry picked from commit d3ab0f383f6736657480a8bb418c5e715a1aed3b) Review URL: https://codereview.chromium.org/1571333004 . | 10 年前 | |
Merge to XFA: Fix infinite loops caused by calling circular indirect objects There are multiple functions in CPDF_Object class which can cause infinite loop due to recursively calling circular indirect objects. Fix them by deference indirect object first. BUG=pdfium:355 TBR=jun_fang@foxitsoftware.com, thestig@chromium.org Review URL: https://codereview.chromium.org/1585533002 . (cherry picked from commit 90853cb1dfd1bf3803ec21cfae3e93948137be61) Review URL: https://codereview.chromium.org/1602103004 . | 10 年前 | |
Merge to XFA: Correct the way to count pages and to avoid infinite loop BUG=pdfium:360 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1585823003 . (cherry picked from commit 5d5d9fe7bd1c9566b9d6570015b7c60894d9fc0c) Review URL: https://codereview.chromium.org/1583073004 . | 10 年前 | |
Add embedder test to help demonstrate FPDFPageObj_SetIsActive() crash The newly added FPDFPageObj_SetIsActive() API can cause a crash in some cases. Add a small test file that has the properties to trigger the crash. Then add a test that exercises such a scenario and stops just short of actually crashing. Bug: 378120423 Change-Id: I211d11fbeda95e96035ad6aa6603db7fca32a31d Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/125670 Reviewed-by: dan sinclair <dsinclair@google.com> Commit-Queue: Lei Zhang <thestig@chromium.org> | 1 年前 | |
Add embedder test to help demonstrate FPDFPageObj_SetIsActive() crash The newly added FPDFPageObj_SetIsActive() API can cause a crash in some cases. Add a small test file that has the properties to trigger the crash. Then add a test that exercises such a scenario and stops just short of actually crashing. Bug: 378120423 Change-Id: I211d11fbeda95e96035ad6aa6603db7fca32a31d Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/125670 Reviewed-by: dan sinclair <dsinclair@google.com> Commit-Queue: Lei Zhang <thestig@chromium.org> | 1 年前 | |
Add regression test for /ActualText parsing Use [1] as a starting point, handwrite a small PDF for testing and use it in an embedder test. [1] https://pdfium-review.googlesource.com/c/pdfium/+/127410/1 Bug: 384770169 Change-Id: Ia714d269c9235e1de312eeef5937a011fa9e11ce Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/128591 Reviewed-by: Thomas Sepez <tsepez@google.com> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 1 年前 | |
Add regression test for /ActualText parsing Use [1] as a starting point, handwrite a small PDF for testing and use it in an embedder test. [1] https://pdfium-review.googlesource.com/c/pdfium/+/127410/1 Bug: 384770169 Change-Id: Ia714d269c9235e1de312eeef5937a011fa9e11ce Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/128591 Reviewed-by: Thomas Sepez <tsepez@google.com> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 1 年前 | |
Demonstrate FPDFText_GetLooseCharBox() bug with generated chars Check in a minimized PDF that demonstrates the bug. Compare the current FPDFText_GetLooseCharBox() behavior against FPDFText_GetCharBox(). Bug: 399689604 Change-Id: Iff604b85b546f8506408fbf9ff933670d461e54b Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/129190 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Thomas Sepez <tsepez@google.com> Commit-Queue: Lei Zhang <thestig@chromium.org> | 1 年前 | |
Demonstrate FPDFText_GetLooseCharBox() bug with generated chars Check in a minimized PDF that demonstrates the bug. Compare the current FPDFText_GetLooseCharBox() behavior against FPDFText_GetCharBox(). Bug: 399689604 Change-Id: Iff604b85b546f8506408fbf9ff933670d461e54b Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/129190 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Thomas Sepez <tsepez@google.com> Commit-Queue: Lei Zhang <thestig@chromium.org> | 1 年前 | |
Fix GetLooseBounds to ensure loose char box contains regular char box Bug: 402562387 Change-Id: I2a2d95c8d1df2db9ac8a6d269025d35ab7f9aaf1 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/134730 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 10 个月前 | |
Fix GetLooseBounds to ensure loose char box contains regular char box Bug: 402562387 Change-Id: I2a2d95c8d1df2db9ac8a6d269025d35ab7f9aaf1 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/134730 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 10 个月前 | |
Current font need not contain part of ActualText When handling marked content there is currently a check that if the current font does not have a mapping for any of the code points in an ActualText then the ActualText is ignored. This check has been in the code since the initial code drop. This undermines part of the purpose of ActualText, such as providing the original code points even if there was no font which represented them. In addition, it is not clear why this behavior would be wanted. One possibility is an attempt to reduce phishing where the copied (or accessible) content is intentionally different from was is drawn on the page (especially with respect to Unicode confusables). However, this is generally malicious content which could easily work around such a check by simply adding mappings in its fonts. Any benefit of ignoring such ActualText has the downside of incorrectly handling real and intentional uses like when multiple code points map to a single glyph in a font. Remove this check and add a test which replaces English words with Chinese replacements. This test fails before this change as the default test font does not contain both sets of code points. Bug: 420508260 Change-Id: I4d82b603e5bda8ed13614e6ba3a4ce0c8f8f0d62 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/132710 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> | 1 年前 | |
Current font need not contain part of ActualText When handling marked content there is currently a check that if the current font does not have a mapping for any of the code points in an ActualText then the ActualText is ignored. This check has been in the code since the initial code drop. This undermines part of the purpose of ActualText, such as providing the original code points even if there was no font which represented them. In addition, it is not clear why this behavior would be wanted. One possibility is an attempt to reduce phishing where the copied (or accessible) content is intentionally different from was is drawn on the page (especially with respect to Unicode confusables). However, this is generally malicious content which could easily work around such a check by simply adding mappings in its fonts. Any benefit of ignoring such ActualText has the downside of incorrectly handling real and intentional uses like when multiple code points map to a single glyph in a font. Remove this check and add a test which replaces English words with Chinese replacements. This test fails before this change as the default test font does not contain both sets of code points. Bug: 420508260 Change-Id: I4d82b603e5bda8ed13614e6ba3a4ce0c8f8f0d62 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/132710 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> | 1 年前 | |
Add support for ICC profile extraction Introduces functionality to extract ICC profile metadata associated with images embedded in PDF documents. Add new public API to access raw data of the ICC profile. Bug: 42270471 Change-Id: I1bca935dc19cb24df990455e0ff1963a737403dd Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/126170 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Thomas Sepez <tsepez@google.com> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 1 年前 | |
Add support for ICC profile extraction Introduces functionality to extract ICC profile metadata associated with images embedded in PDF documents. Add new public API to access raw data of the ICC profile. Bug: 42270471 Change-Id: I1bca935dc19cb24df990455e0ff1963a737403dd Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/126170 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Thomas Sepez <tsepez@google.com> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 1 年前 | |
Add test for colorspace handling of regenerated streams Add a test for 42271133, where grayscale colorspaces turn black when regenerating streams - Add FPDFSaveEmbedderTest::Bug42271133 which regenerates streams and checks if grayscale paths were turned black - Add test file Bug: 42271133 Change-Id: I5d3cc2ebf181ca4531a536c726478a214cd4e023 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/118890 Commit-Queue: Thomas Sepez <tsepez@google.com> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Thomas Sepez <tsepez@google.com> Reviewed-by: Lei Zhang <thestig@chromium.org> | 2 年前 | |
Add test for colorspace handling of regenerated streams Add a test for 42271133, where grayscale colorspaces turn black when regenerating streams - Add FPDFSaveEmbedderTest::Bug42271133 which regenerates streams and checks if grayscale paths were turned black - Add test file Bug: 42271133 Change-Id: I5d3cc2ebf181ca4531a536c726478a214cd4e023 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/118890 Commit-Queue: Thomas Sepez <tsepez@google.com> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Thomas Sepez <tsepez@google.com> Reviewed-by: Lei Zhang <thestig@chromium.org> | 2 年前 | |
Discard portion of decrypt key longer than 32 bytes. This is now tripping a strict assert that all arguments to CRYPT_AESDecrypt() be an exact multilpe of 16 bytes. Formerly, only the destination length was used and checked, and any additional material was silently ignored. -- Add a few additional bytes to be ignored to existing test. Bug: 424613308 Change-Id: Ia5199670401726b95c8d6981e134f26693af2c11 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/133130 Reviewed-by: Lei Zhang <thestig@chromium.org> Auto-Submit: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 1 年前 | |
Add embedder test for FPDFText_GetText() behavior with invalid chars Take the relevant part of the PDF from the bug and combine it with hello_world.pdf into a minimal test case. Demonstrate FPDFText_GetText() currently cannot return the valid characters, and FPDFText_FindStart() cannot find them either. Bug: 425244539 Change-Id: Ic90d64566e45e9c3ea39ca5132b0533f678a5af8 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/133550 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 1 年前 | |
Add embedder test for FPDFText_GetText() behavior with invalid chars Take the relevant part of the PDF from the bug and combine it with hello_world.pdf into a minimal test case. Demonstrate FPDFText_GetText() currently cannot return the valid characters, and FPDFText_FindStart() cannot find them either. Bug: 425244539 Change-Id: Ic90d64566e45e9c3ea39ca5132b0533f678a5af8 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/133550 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 1 年前 | |
Add a test case for another find text failure Distill the PDF attached on the bug into a minimal test case. Add an embedder test case to extract the text. Show that the text is missing a dash. Bug: 431824298 Change-Id: I67ce45a17dca191e28a7aa31e9b27cbe339b37b2 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/134450 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 11 个月前 | |
Add a test case for another find text failure Distill the PDF attached on the bug into a minimal test case. Add an embedder test case to extract the text. Show that the text is missing a dash. Bug: 431824298 Change-Id: I67ce45a17dca191e28a7aa31e9b27cbe339b37b2 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/134450 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 11 个月前 | |
Merge to XFA: Fix infinite recursion in CPDF_RenderStatus::RenderSingleObject(). This brings in: 14b2bb0 Fix infinite recursion in CPDF_RenderStatus::RenderSingleObject(). 1d43e82 Add minimized test cases for stack exhaustion crash to repository. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/893493002 | 11 年前 | |
Merge to XFA: Fix segv in CPDF_DataAvail::CheckRoot() Original Review URL: https://codereview.chromium.org/895933003 BUG=454695 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/901013003 | 11 年前 | |
Merge to XFA: Fix infinite recursion in CPDF_Parser::ParseIndirectObjectAt(). Orignal Review URL: https://codereview.chromium.org/875263002 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/880753002 | 11 年前 | |
Merge to XFA: Add embedder test for fix to bug_452455. Original Review URL: https://codereview.chromium.org/887063003 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/895713003 | 11 年前 | |
Merge to XFA: Fix segv in CPDF_DataAvail::CheckRoot() Original Review URL: https://codereview.chromium.org/895933003 BUG=454695 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/901013003 | 11 年前 | |
Merge to XFA: Fix segv in CPDF_DataAvail::CheckRoot() Original Review URL: https://codereview.chromium.org/895933003 BUG=454695 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/901013003 | 11 年前 | |
Merge to XFA: Fix segv in CPDF_DataAvail::CheckRoot() Original Review URL: https://codereview.chromium.org/895933003 BUG=454695 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/901013003 | 11 年前 | |
Fix parsing of object numbers > 16,777,216. Currently, there is a check that an object number is <= 0x1000000. If that check fails, we end up putting the parser into a bad state and fail to load documents. The object does not need to be in the XRef table, or referenced from the document, just be in the document. This Cl removes the size check and updates the various atoi calls to use a uint32_t instead of an int32_t so we don't end up getting strange values when converting from a string. BUG=455199 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1755273002 . | 10 年前 | |
Update Git EOL policies for source files This CL adds a number of source files and extensions to the git attributes file to prevent CRLF checkins and checkouts, by forcing LF end of line characters in these files. Also fix CRLF files. Based on https://crrev.com/573230 BUG=chromium:832129 Change-Id: I5b02f48b2794d0ee25f75d22210cdfa0f3587e3f Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/54451 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Update Git EOL policies for source files This CL adds a number of source files and extensions to the git attributes file to prevent CRLF checkins and checkouts, by forcing LF end of line characters in these files. Also fix CRLF files. Based on https://crrev.com/573230 BUG=chromium:832129 Change-Id: I5b02f48b2794d0ee25f75d22210cdfa0f3587e3f Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/54451 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Fix longstanding typo in bug_481363.in Noticed while stepping through FindStreamEndPos() in the debugger. The PDF file used as input contained a untransformed {{object}} tag owing to the closing }} being typo'd as )). Change-Id: I781ccdb2b1b17a27ce4e4c99130f2dd7ba27e2e7 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/76871 Reviewed-by: Hui Yingst <nigi@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 5 年前 | |
Fix longstanding typo in bug_481363.in Noticed while stepping through FindStreamEndPos() in the debugger. The PDF file used as input contained a untransformed {{object}} tag owing to the closing }} being typo'd as )). Change-Id: I781ccdb2b1b17a27ce4e4c99130f2dd7ba27e2e7 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/76871 Reviewed-by: Hui Yingst <nigi@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 5 年前 | |
Merge to XFA: Automated test case for 487928. Original Review URL: https://codereview.chromium.org/1153213004 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1158483004 | 10 年前 | |
Merge to XFA: Automated test case for 487928. Original Review URL: https://codereview.chromium.org/1153213004 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1158483004 | 10 年前 | |
【CVE-2026-11303】【504416752】Use-After-Free in PDFium XFA due to unrooted V8 wrappers Signed-off-by: qq_40999241 <lizeqiang4@h-partners.com> | 1 个月前 | |
【CVE-2026-11303】【504416752】Use-After-Free in PDFium XFA due to unrooted V8 wrappers Signed-off-by: qq_40999241 <lizeqiang4@h-partners.com> | 1 个月前 | |
Use the {{trailer}} macro in more PDFs. Change-Id: Idd985dfe2def8ae9dfb7921d006129f66d0bce28 Reviewed-on: https://pdfium-review.googlesource.com/c/45630 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Use the {{trailer}} macro in more PDFs. Change-Id: Idd985dfe2def8ae9dfb7921d006129f66d0bce28 Reviewed-on: https://pdfium-review.googlesource.com/c/45630 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Use the {{trailer}} macro in more PDFs. Change-Id: Idd985dfe2def8ae9dfb7921d006129f66d0bce28 Reviewed-on: https://pdfium-review.googlesource.com/c/45630 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Use the {{trailer}} macro in more PDFs. Change-Id: Idd985dfe2def8ae9dfb7921d006129f66d0bce28 Reviewed-on: https://pdfium-review.googlesource.com/c/45630 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Use the {{trailer}} macro in more PDFs. Change-Id: Idd985dfe2def8ae9dfb7921d006129f66d0bce28 Reviewed-on: https://pdfium-review.googlesource.com/c/45630 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Merge to XFA: Type check the m_pShadingObj before assuming it's a stream. The m_pShadingObj can be a stream or a dictionary depending on how it's used. This CL adds some simple type checking to make sure that the type of the object matches what we expect. BUG=chromium:547706 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1421973004 . (cherry picked from commit 4ef782ab57979add3e3910d6bcfde6ef59f65724) Review URL: https://codereview.chromium.org/1422253002 . | 10 年前 | |
Add test for bug 620428 (setinterval cancellation) While we're at it, beef up existing test for non-cancellation. In turn, fix test harness to implement intervals properly. In turn, fix public documentation to be clearer about timers. Also rename a few identifiers that sounded "off". Review-Url: https://codereview.chromium.org/2211513002 | 9 年前 | |
Add test for bug 620428 (setinterval cancellation) While we're at it, beef up existing test for non-cancellation. In turn, fix test harness to implement intervals properly. In turn, fix public documentation to be clearer about timers. Also rename a few identifiers that sounded "off". Review-Url: https://codereview.chromium.org/2211513002 | 9 年前 | |
Merge to XFA: Enforce input and output dimensionalities for CPDF_StitchFunc. Also cleans up some places in the relevant functions since we're here. BUG=551460 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1421783004 . Clean merge. (cherry picked from commit 4f85605cbc652a17bc833f883186e0a68af6006d) Review URL: https://codereview.chromium.org/1405383009 . | 10 年前 | |
Merge to XFA: Clear decoders after the image decoder in the /Filter array. During decoding, when an image decoder is encountered, any subsequent decoders are ignored, but remain in the array. However, later on CPDF_DIBSource::ValidateDictParam expects the image decoder to be the last in the array, causing issues. A check is also added in CPDF_DIBSource::GetScanline to ensure that the calculated pitch value is <= the (4-aligned) pitch value in the cached bitmap to prevent future issues. Also cleans up some NULL usages. BUG=552046 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1406943005 . (cherry picked from commit 182d129bcee8f7731b9bbfde0064295ad3b37271) Review URL: https://codereview.chromium.org/1436153003 . | 10 年前 | |
Merge to XFA: Clear decoders after the image decoder in the /Filter array. During decoding, when an image decoder is encountered, any subsequent decoders are ignored, but remain in the array. However, later on CPDF_DIBSource::ValidateDictParam expects the image decoder to be the last in the array, causing issues. A check is also added in CPDF_DIBSource::GetScanline to ensure that the calculated pitch value is <= the (4-aligned) pitch value in the cached bitmap to prevent future issues. Also cleans up some NULL usages. BUG=552046 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1406943005 . (cherry picked from commit 182d129bcee8f7731b9bbfde0064295ad3b37271) Review URL: https://codereview.chromium.org/1436153003 . | 10 年前 | |
Use the {{trailer}} macro in more PDFs. Change-Id: Idd985dfe2def8ae9dfb7921d006129f66d0bce28 Reviewed-on: https://pdfium-review.googlesource.com/c/45630 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Merge to XFA: Change |CCodec_ScanlineDecoder::m_Pitch| to FX_DWORD This matches the type of the corresponding |CFX_DIBSource::m_Pitch|, where integer overflow is checked for FX_DWORD. This change is propagated to many other places. Also, check for integer overflow in |CCodec_RLScanlineDecoder::Create| during the calculation of |m_Pitch| since it aligns to 4 bytes while overflow was was previously checked without this alignment. TBR=tsepez@chromium.org BUG=555784 Review URL: https://codereview.chromium.org/1460033002 . (cherry picked from commit e7950df70a2fd658f466751b29483436cb31e829) Review URL: https://codereview.chromium.org/1461363002 . | 10 年前 | |
Use the {{trailer}} macro in more PDFs. Change-Id: Idd985dfe2def8ae9dfb7921d006129f66d0bce28 Reviewed-on: https://pdfium-review.googlesource.com/c/45630 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Use the {{trailer}} macro in more PDFs. Change-Id: Idd985dfe2def8ae9dfb7921d006129f66d0bce28 Reviewed-on: https://pdfium-review.googlesource.com/c/45630 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Use the {{trailer}} macro in more PDFs. Change-Id: Idd985dfe2def8ae9dfb7921d006129f66d0bce28 Reviewed-on: https://pdfium-review.googlesource.com/c/45630 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Use the {{trailer}} macro in more PDFs. Change-Id: Idd985dfe2def8ae9dfb7921d006129f66d0bce28 Reviewed-on: https://pdfium-review.googlesource.com/c/45630 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Use ToUnicode mapping even when unicode is 0. CPDF_Font::UnicodeFromCharcode returns 0 only if ToUnicode map maps the charcode to 0. CPDF_SimpleFont::UnicodeFromCharcode and CPDF_CID_Font:: UnicodeFromCharCode return 0 only if the call to CPDF_Font returns 0. In other cases, these methods return an empty string. So when processing text, a 0 return from the method should not be replaced with the charcode. BUG=pdfium:583 Review-Url: https://codereview.chromium.org/2342073002 | 9 年前 | |
Fix integer issues leading to out of bounds access in fx_ge_text.cpp. - Using |-skew| to get positive index, which doesn't work when skew is INT_MIN - Incorrect logic when determining when to use |-skew| as an index. R=tsepez@chromium.org,weili@chromium.org BUG=chromium:601362 Review URL: https://codereview.chromium.org/1875673004 | 10 年前 | |
Add a simple check for V4 cross reference table Some unknown software generates cross reference table with the claimed object numbers are all off by one. Add a simple verification function to detect this scenario, thus have a chance to rebuild the correct cross reference table. To avoid unnecessary checks and potiential performance hit, we only check for the very first non free entry. BUG=602650 Review URL: https://codereview.chromium.org/1910063004 | 10 年前 | |
Beef up timer cancellation tests Adds more questionable invocations of ClearTimeOut(). Also, checking that nothing happened is fragile. Log at least one thing to show that the code ran. Review-Url: https://codereview.chromium.org/2218473002 | 9 年前 | |
Beef up timer cancellation tests Adds more questionable invocations of ClearTimeOut(). Also, checking that nothing happened is fragile. Log at least one thing to show that the code ran. Review-Url: https://codereview.chromium.org/2218473002 | 9 年前 | |
Fix Jbig2 document context creation by checking proper pointer The pointer a unique_ptr contains should be checked instead of the pointer of the unique_ptr itself. BUG=chromium:631912 Review-Url: https://codereview.chromium.org/2205573004 | 9 年前 | |
Fix issue when firing TimerProc() destroys timer We must look the timer up a second time since the callback may have released it. BUG=634394 Review-Url: https://codereview.chromium.org/2214003003 | 9 年前 | |
Fix issue when firing TimerProc() destroys timer We must look the timer up a second time since the callback may have released it. BUG=634394 Review-Url: https://codereview.chromium.org/2214003003 | 9 年前 | |
Remove another potential stale CJS_Timer usage Fix memory ownership model for PDFium timers. The |app| class owns the CJS_Timer as part of its vector<unique_ptr> to them. The CJS_Timer "owns" its slot in the global ID to timer map, and removes itself when it is destroyed. Nothing else deletes from the global map. Deleting from the global map is accompanied by a callback to the embedder to clear its resources. Next, the proper way to remove a CJS_Timer is by going through the app, and having the app erase its unique ptr, which then deletes the CJS_Timer, which in turn cleans up the global map. Provide a CJS_Timer::Cancel static method to do this conveniently. There is a alternate path to the CJS_timer via JS and its CJS_TimerObj. CJS_TimerObj owns a TimerObj that currently points to the CJS_Timer. If the timer fires, and cleans itself up, this can go stale. Make the TimerObj maintain a weak reference via global timer ID rather than a direct pointer to the CJS_Timer, so that if the timer fires and is destroyed, future attempts to cancel find nothing. There is another path, where if the JS timer object is GC'd, then we just clean up its CJS_TimerObj without touching the actual CJS_Timers. We could make this match the spec by calling into the new cancel routine as described above, but it seems weird to have a timer depend on whether a gc happened or not. A subsequent CL will rename these objects to more closely match the conventions used by the other JS wrappers. BUG=634716 Review-Url: https://codereview.chromium.org/2221513002 | 9 年前 | |
Remove another potential stale CJS_Timer usage Fix memory ownership model for PDFium timers. The |app| class owns the CJS_Timer as part of its vector<unique_ptr> to them. The CJS_Timer "owns" its slot in the global ID to timer map, and removes itself when it is destroyed. Nothing else deletes from the global map. Deleting from the global map is accompanied by a callback to the embedder to clear its resources. Next, the proper way to remove a CJS_Timer is by going through the app, and having the app erase its unique ptr, which then deletes the CJS_Timer, which in turn cleans up the global map. Provide a CJS_Timer::Cancel static method to do this conveniently. There is a alternate path to the CJS_timer via JS and its CJS_TimerObj. CJS_TimerObj owns a TimerObj that currently points to the CJS_Timer. If the timer fires, and cleans itself up, this can go stale. Make the TimerObj maintain a weak reference via global timer ID rather than a direct pointer to the CJS_Timer, so that if the timer fires and is destroyed, future attempts to cancel find nothing. There is another path, where if the JS timer object is GC'd, then we just clean up its CJS_TimerObj without touching the actual CJS_Timers. We could make this match the spec by calling into the new cancel routine as described above, but it seems weird to have a timer depend on whether a gc happened or not. A subsequent CL will rename these objects to more closely match the conventions used by the other JS wrappers. BUG=634716 Review-Url: https://codereview.chromium.org/2221513002 | 9 年前 | |
Add an embeddertest for text extraction of Type 3 fonts. https://crbug.com/pdfium/642 fixed a text extraction bug involving Type 3 font and misuse of the Encoding array, but did not add a corresponding test case. This CL adds the corresponding PDF test file to test text extraction with FPDFText_GetText(). Bug: pdfium:1424 Change-Id: If8af1e5b5d1926774ef085ba38dbf8002ae6c7cf Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/62930 Commit-Queue: Hui Yingst <nigi@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Add an embeddertest for text extraction of Type 3 fonts. https://crbug.com/pdfium/642 fixed a text extraction bug involving Type 3 font and misuse of the Encoding array, but did not add a corresponding test case. This CL adds the corresponding PDF test file to test text extraction with FPDFText_GetText(). Bug: pdfium:1424 Change-Id: If8af1e5b5d1926774ef085ba38dbf8002ae6c7cf Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/62930 Commit-Queue: Hui Yingst <nigi@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Relax the EncryptMetadata check. BUG=pdfium:644 Review-Url: https://codereview.chromium.org/2581873002 | 9 年前 | |
Relax the EncryptMetadata check. BUG=pdfium:644 Review-Url: https://codereview.chromium.org/2581873002 | 9 年前 | |
Handle web links across lines When a web link has a hyphen at the end of line, we consider it to be continued to the next line. For example, "http://www.abc.com/my-\r\ntest" should be extracted as "http://www.abc.com/my-test". BUG=pdfium:650 Change-Id: I64a93d9c66faf2be0abdaf8cfe8ee496c435d0ca Reviewed-on: https://pdfium-review.googlesource.com/3092 Commit-Queue: Wei Li <weili@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 9 年前 | |
Fix unique ptrs in fpdfppo.cpp There's a path out that deletes a pointer whose ownership was passed off earlier. This will get simpler once more APIs take unique_ptr. BUG=664284 Review-Url: https://codereview.chromium.org/2495003006 | 9 年前 | |
Fix unique ptrs in fpdfppo.cpp There's a path out that deletes a pointer whose ownership was passed off earlier. This will get simpler once more APIs take unique_ptr. BUG=664284 Review-Url: https://codereview.chromium.org/2495003006 | 9 年前 | |
Add FPDF_PRINTMODE_EMF_IMAGE_MASKS print mode. This is a new Windows-only print mode for use with FPDF_SetPrintMode(). It outputs EMF, like FPDF_PRINTMODE_EMF, but can process image masks more efficiently under certain conditions. By adding this additional print mode, embedders can choose whether to use it at run time. This in turn allows embedders to roll out this improvement, which has been known to cause regressions in the past, in a controlled manner. Bug: chromium:674771 Change-Id: Id4a16aa70a785415d2195c6503b35ff7267bc911 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/69810 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Rebekah Potter <rbpotter@chromium.org> | 6 年前 | |
Add FPDF_PRINTMODE_EMF_IMAGE_MASKS print mode. This is a new Windows-only print mode for use with FPDF_SetPrintMode(). It outputs EMF, like FPDF_PRINTMODE_EMF, but can process image masks more efficiently under certain conditions. By adding this additional print mode, embedders can choose whether to use it at run time. This in turn allows embedders to roll out this improvement, which has been known to cause regressions in the past, in a controlled manner. Bug: chromium:674771 Change-Id: Id4a16aa70a785415d2195c6503b35ff7267bc911 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/69810 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Rebekah Potter <rbpotter@chromium.org> | 6 年前 | |
Don't put timers with ID == 0 into the global timer map. A return of ID == 0 from the embedder means the timer was not created (see public/fpdf_formfill.h), although few embedders actually conform to this convention. Firing a timer with ID == 0 will thus do nothing since there can't be such a timer in the map. BUG=679649 Review-Url: https://codereview.chromium.org/2626863003 | 9 年前 | |
Don't put timers with ID == 0 into the global timer map. A return of ID == 0 from the embedder means the timer was not created (see public/fpdf_formfill.h), although few embedders actually conform to this convention. Firing a timer with ID == 0 will thus do nothing since there can't be such a timer in the map. BUG=679649 Review-Url: https://codereview.chromium.org/2626863003 | 9 年前 | |
Fix typos in some .in files and regenerate the .pdf files. Change-Id: I3f07ccee67fcbdc1eaf9a2acea40630ce65708f5 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68330 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Fix typos in some .in files and regenerate the .pdf files. Change-Id: I3f07ccee67fcbdc1eaf9a2acea40630ce65708f5 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68330 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Be less trusting of MaybeLocal<> return types from V8 To* methods. Calling ToLocalChecked() will crash otherwise. Bug: 707673 Change-Id: I66a5b36d8cf1710a725e30c2d14a195d08ef25a4 Reviewed-on: https://pdfium-review.googlesource.com/6130 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 8 年前 | |
Do not insert null node if ParseAsXDPPacket_Config fails Doing so trips an assert in the debug build but is harmless otherwise. This appears to be wrong since the beginning of time. Bug: 709793 Change-Id: I179f6944a3f7b2a89efa65a16078f6f58448ba4b Reviewed-on: https://pdfium-review.googlesource.com/4390 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 9 年前 | |
Do not insert null node if ParseAsXDPPacket_Config fails Doing so trips an assert in the debug build but is harmless otherwise. This appears to be wrong since the beginning of time. Bug: 709793 Change-Id: I179f6944a3f7b2a89efa65a16078f6f58448ba4b Reviewed-on: https://pdfium-review.googlesource.com/4390 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 9 年前 | |
Remove DOS line endings from bug_713197.in. Change-Id: I18852f1b4291737e16baaa271673f7c4a9b6b50a Reviewed-on: https://pdfium-review.googlesource.com/c/45631 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Remove DOS line endings from bug_713197.in. Change-Id: I18852f1b4291737e16baaa271673f7c4a9b6b50a Reviewed-on: https://pdfium-review.googlesource.com/c/45631 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Fix content generation to only generate dirty page objects. BUG=pdfium:717 R=dsinclair@chromium.org,thestig@chromium.org Change-Id: I7e0e6fd301d40f9b5341d40cf11167b7748af243 Reviewed-on: https://pdfium-review.googlesource.com/6071 Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Add a regression test for FPDF_ImportPages(). BUG=chromium:750558 Change-Id: I0d541c660c529b368f420d461a6eb1d81e42579a Reviewed-on: https://pdfium-review.googlesource.com/9730 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 8 年前 | |
Add a regression test for FPDF_ImportPages(). BUG=chromium:750558 Change-Id: I0d541c660c529b368f420d461a6eb1d81e42579a Reviewed-on: https://pdfium-review.googlesource.com/9730 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 8 年前 | |
Move replaced indirect objects to the orphans list. ReplaceIndirectObjectIfHigherGeneration() deletes replaced objects, but those objects may be in use. So move them to the orphans list instead to avoid potential dangling pointers. BUG=chromium:757705 Change-Id: Ide83a1b85b754166d298fd50e655ca331ba4f942 Reviewed-on: https://pdfium-review.googlesource.com/11670 Reviewed-by: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 8 年前 | |
Fix a copy-pasta typo. Change-Id: I497c38fe6b2a311495157127ef5a10a2b7c40cc5 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/66211 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 6 年前 | |
Fix a copy-pasta typo. Change-Id: I497c38fe6b2a311495157127ef5a10a2b7c40cc5 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/66211 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 6 年前 | |
Make CFXJSE-created contexts refer to their CFXJS counteparts. Bug: 773229 Change-Id: Ic3774c7f6abe3a195bbe09b91d91c549d4d7ac46 Reviewed-on: https://pdfium-review.googlesource.com/25110 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 8 年前 | |
Set default graphics before generating page contents In this CL, the content generator sets some default graphics states before processing the page objects. In particular, a default ExtGState is now set before processing, and the last CTM is now stored right after parsing finishes: the only command to change matrix is ctm, and it concatenates, so inverting requires knowing the current value. Bug: pdfium:779 Change-Id: I35b1c07550ce91839fb0e20fbf717e3e80c9b9d6 Reviewed-on: https://pdfium-review.googlesource.com/7070 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Set default graphics before generating page contents In this CL, the content generator sets some default graphics states before processing the page objects. In particular, a default ExtGState is now set before processing, and the last CTM is now stored right after parsing finishes: the only command to change matrix is ctm, and it concatenates, so inverting requires knowing the current value. Bug: pdfium:779 Change-Id: I35b1c07550ce91839fb0e20fbf717e3e80c9b9d6 Reviewed-on: https://pdfium-review.googlesource.com/7070 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Add regression tests for issues with correctly removing hyphens There was a regression due to a refactor, where the public API was no longer removing soft hyphens for line broken words. This was causing issues with find and copy/paste operations that depend on selecting a region of text. This change is covered by FPDFTextEmbeddertest.GetTextWithHyphen. FPDFTextEmbeddertest.bug_782596 is a regression test for a bug that was introduced by the original fix. It only fails when running the test under ASAN. BUG=pdfium:935 Change-Id: I26096583c35f9246a3662e702f89b742f1146780 Reviewed-on: https://pdfium-review.googlesource.com/18610 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org> | 8 年前 | |
Add regression tests for issues with correctly removing hyphens There was a regression due to a refactor, where the public API was no longer removing soft hyphens for line broken words. This was causing issues with find and copy/paste operations that depend on selecting a region of text. This change is covered by FPDFTextEmbeddertest.GetTextWithHyphen. FPDFTextEmbeddertest.bug_782596 is a regression test for a bug that was introduced by the original fix. It only fails when running the test under ASAN. BUG=pdfium:935 Change-Id: I26096583c35f9246a3662e702f89b742f1146780 Reviewed-on: https://pdfium-review.googlesource.com/18610 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org> | 8 年前 | |
Give some .in test files better formatting. Then regenerate the .pdf files. Change-Id: I15ea18f5485e9381de8b9a93110bacadcbd15448 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/65871 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Give some .in test files better formatting. Then regenerate the .pdf files. Change-Id: I15ea18f5485e9381de8b9a93110bacadcbd15448 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/65871 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Off-by-one in CPDF_StreamParser::ParseNextElement() Limit the token to 255 bytes + NUL. Also, shuffle fields in cpdf_streamparser to allow memory tools to better check this inline array. Bug: 828049 Change-Id: I444f2b4c6958167577d9cd76c06805baf7d5c26c Reviewed-on: https://pdfium-review.googlesource.com/29530 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Add a test for a checkbox that does not print. When flattened, the button annotation in bug_861842.pdf, which looks like a checkbox, disappears. Add an embedder test to illustrate this problem. Bug: chromium:861842 Change-Id: Ief691438f4c1cc150586e5f51999d83b1cbebe51 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/59931 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 6 年前 | |
Add a test for a checkbox that does not print. When flattened, the button annotation in bug_861842.pdf, which looks like a checkbox, disappears. Add an embedder test to illustrate this problem. Bug: chromium:861842 Change-Id: Ief691438f4c1cc150586e5f51999d83b1cbebe51 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/59931 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 6 年前 | |
Add a test to show FPDFPage_Flatten() bug with negative box dimensions PDFs that have a MediaBox or CropBox with negative dimensions do not flatten correctly. The flattening function assumes that the PDFs are empty and assigns a default size of 8.5x11. Bug: chromium:889099 Change-Id: I2e90be14a5ab72a9391717773da78f4687cf7ac8 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/69151 Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Add a test to show FPDFPage_Flatten() bug with negative box dimensions PDFs that have a MediaBox or CropBox with negative dimensions do not flatten correctly. The flattening function assumes that the PDFs are empty and assigns a default size of 8.5x11. Bug: chromium:889099 Change-Id: I2e90be14a5ab72a9391717773da78f4687cf7ac8 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/69151 Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Push/pop the graphics state stack when flattening. When FPDFPage_Flatten() manipulates a content stream, it replaces the content stream with a content stream array. The first element in the array is the original content stream and the second element in the array is the flattened annotations content. To make sure the original content stream's graphics state stack does not affect the flattened annotations, FPDFPage_Flatten() rewrites the original content stream to be: q $contents Q When FPDFPage_Flatten() manipulates a content stream array, it just appends the flattened annotations as a new element in the array. This may result in graphics state stack leaking out. To fix this, wrap the content stream array to be: ["q", $content1, ..., $contentN, "Q"] And then append the flattened annotations. BUG=chromium:896366 Change-Id: Ic6499e39eb4c9f1fe45d037622bf02be724b6cae Reviewed-on: https://pdfium-review.googlesource.com/c/44252 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Push/pop the graphics state stack when flattening. When FPDFPage_Flatten() manipulates a content stream, it replaces the content stream with a content stream array. The first element in the array is the original content stream and the second element in the array is the flattened annotations content. To make sure the original content stream's graphics state stack does not affect the flattened annotations, FPDFPage_Flatten() rewrites the original content stream to be: q $contents Q When FPDFPage_Flatten() manipulates a content stream array, it just appends the flattened annotations as a new element in the array. This may result in graphics state stack leaking out. To fix this, wrap the content stream array to be: ["q", $content1, ..., $contentN, "Q"] And then append the flattened annotations. BUG=chromium:896366 Change-Id: Ic6499e39eb4c9f1fe45d037622bf02be724b6cae Reviewed-on: https://pdfium-review.googlesource.com/c/44252 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Push/pop the graphics state stack when flattening. When FPDFPage_Flatten() manipulates a content stream, it replaces the content stream with a content stream array. The first element in the array is the original content stream and the second element in the array is the flattened annotations content. To make sure the original content stream's graphics state stack does not affect the flattened annotations, FPDFPage_Flatten() rewrites the original content stream to be: q $contents Q When FPDFPage_Flatten() manipulates a content stream array, it just appends the flattened annotations as a new element in the array. This may result in graphics state stack leaking out. To fix this, wrap the content stream array to be: ["q", $content1, ..., $contentN, "Q"] And then append the flattened annotations. BUG=chromium:896366 Change-Id: Ic6499e39eb4c9f1fe45d037622bf02be724b6cae Reviewed-on: https://pdfium-review.googlesource.com/c/44252 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Push/pop the graphics state stack when flattening. When FPDFPage_Flatten() manipulates a content stream, it replaces the content stream with a content stream array. The first element in the array is the original content stream and the second element in the array is the flattened annotations content. To make sure the original content stream's graphics state stack does not affect the flattened annotations, FPDFPage_Flatten() rewrites the original content stream to be: q $contents Q When FPDFPage_Flatten() manipulates a content stream array, it just appends the flattened annotations as a new element in the array. This may result in graphics state stack leaking out. To fix this, wrap the content stream array to be: ["q", $content1, ..., $contentN, "Q"] And then append the flattened annotations. BUG=chromium:896366 Change-Id: Ic6499e39eb4c9f1fe45d037622bf02be724b6cae Reviewed-on: https://pdfium-review.googlesource.com/c/44252 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Make CPDF_ContentMarkItem stop caching the properties dict. It could be aliased with some other dictionary in the file. We note that the dictionary one level up will always be an indirect object in the sharing case, and indirect objects are persisted by the IndirectObjectHolder, so hold a pointer to that and retrieve the specific property_name field on the fly. Bug: chromium:900552 Change-Id: I2e300020d6a7191648dd139a485b6d284e259976 Reviewed-on: https://pdfium-review.googlesource.com/c/44970 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Make CPDF_ContentMarkItem stop caching the properties dict. It could be aliased with some other dictionary in the file. We note that the dictionary one level up will always be an indirect object in the sharing case, and indirect objects are persisted by the IndirectObjectHolder, so hold a pointer to that and retrieve the specific property_name field on the fly. Bug: chromium:900552 Change-Id: I2e300020d6a7191648dd139a485b6d284e259976 Reviewed-on: https://pdfium-review.googlesource.com/c/44970 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Make public IndirectObjectHolder orphan tracking feature. Use it to persist formfield /V and /RV objects. Bug: chromium:901654 Change-Id: I22cabd64cbe0e91c6d9febb7fcdc070b4762ea10 Reviewed-on: https://pdfium-review.googlesource.com/c/45111 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Make public IndirectObjectHolder orphan tracking feature. Use it to persist formfield /V and /RV objects. Bug: chromium:901654 Change-Id: I22cabd64cbe0e91c6d9febb7fcdc070b4762ea10 Reviewed-on: https://pdfium-review.googlesource.com/c/45111 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Cover some more orphaning in cpdfsdk_baannot.cpp. Bug: chromium:901654 Change-Id: Ie21106abe47d99638014574a6ec724ff06006508 Reviewed-on: https://pdfium-review.googlesource.com/c/45610 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Cover some more orphaning in cpdfsdk_baannot.cpp. Bug: chromium:901654 Change-Id: Ie21106abe47d99638014574a6ec724ff06006508 Reviewed-on: https://pdfium-review.googlesource.com/c/45610 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Avoid writing out empty streams in CPDF_Stream::WriteTo(). Do not call CFX_FileBufferArchive::WriteBlock() with no data to write out to avoid an ASSERT() failure. Although CFX_FileBufferArchive::WriteBlock() can handle no data just fine, it is an IFX_WriteStream::WriteBlock() implementation and not all IFX_WriteStream::WriteBlock() implementations can handle no data. BUG=chromium:905142 Change-Id: Icef8460443a9363526679261aac0c1ef74bccec4 Reviewed-on: https://pdfium-review.googlesource.com/c/45531 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Avoid writing out empty streams in CPDF_Stream::WriteTo(). Do not call CFX_FileBufferArchive::WriteBlock() with no data to write out to avoid an ASSERT() failure. Although CFX_FileBufferArchive::WriteBlock() can handle no data just fine, it is an IFX_WriteStream::WriteBlock() implementation and not all IFX_WriteStream::WriteBlock() implementations can handle no data. BUG=chromium:905142 Change-Id: Icef8460443a9363526679261aac0c1ef74bccec4 Reviewed-on: https://pdfium-review.googlesource.com/c/45531 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Give some .in test files better formatting. Then regenerate the .pdf files. Change-Id: I15ea18f5485e9381de8b9a93110bacadcbd15448 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/65871 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Give some .in test files better formatting. Then regenerate the .pdf files. Change-Id: I15ea18f5485e9381de8b9a93110bacadcbd15448 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/65871 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Give some .in test files better formatting. Then regenerate the .pdf files. Change-Id: I15ea18f5485e9381de8b9a93110bacadcbd15448 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/65871 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Give some .in test files better formatting. Then regenerate the .pdf files. Change-Id: I15ea18f5485e9381de8b9a93110bacadcbd15448 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/65871 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Avoid segv in XFA layout when font not returned by system. Add test infrastructure that returns bad objects. Bug: chromium:972518 Change-Id: I9d03f31b5facbaab838ef23270a621c1c10a2d0e Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/56430 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 6 年前 | |
Fix a /Parent reference in xfa_pages_8_0.fragment. Then regenerate all the affected PDFs. Change-Id: I54f605a0e5b5a021463fc3a13fcbba51e94a03f3 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/69251 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Merge to XFA: Exit infinite loops for cross reference loading When cross reference sections form a loop, our code will enter an infinite loop. Add detection and exit code for v4 cross reference loading. V5 loading was done previously. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1558093002 . (cherry picked from commit aab8f462ea3368ed4825172231131e1a10db978d) Review URL: https://codereview.chromium.org/1556423002 . | 10 年前 | |
Fixup AFSimple_Calculate indexing bug The refactoring in [1] introduced a bug where we pulled the wrong array index to get the array of fields to use in the AFSimple_Calculate method. This caused the calculation to not be performed as the fields could not be found. This CL fixes up the index and adds a test to verify we use AFSimple_Calucate to sum two fields. 1- https://pdfium-review.googlesource.com/c/pdfium/+/16670 Bug: chromium:811913 Change-Id: I2abb9fe4fe2d6969ce1876736faadf252ef90575 Reviewed-on: https://pdfium-review.googlesource.com/27670 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> | 8 年前 | |
Fixup AFSimple_Calculate indexing bug The refactoring in [1] introduced a bug where we pulled the wrong array index to get the array of fields to use in the AFSimple_Calculate method. This caused the calculation to not be performed as the fields could not be found. This CL fixes up the index and adds a test to verify we use AFSimple_Calucate to sum two fields. 1- https://pdfium-review.googlesource.com/c/pdfium/+/16670 Bug: chromium:811913 Change-Id: I2abb9fe4fe2d6969ce1876736faadf252ef90575 Reviewed-on: https://pdfium-review.googlesource.com/27670 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> | 8 年前 | |
Fix the Size trailer entry in hand written PDFs. Change-Id: Ib84cc570c2ffaf9fdd49d32bc12c7e6197e130c1 Reviewed-on: https://pdfium-review.googlesource.com/6850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Fix the Size trailer entry in hand written PDFs. Change-Id: Ib84cc570c2ffaf9fdd49d32bc12c7e6197e130c1 Reviewed-on: https://pdfium-review.googlesource.com/6850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Add click_form.pdf test PDF. This is a handwritten version of the checkbox / radio button PDF from https://pdfium-review.googlesource.com/56870 Change-Id: I88476edd6f2642908742e8c11eb4acf6941a1b20 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/57890 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Add click_form.pdf test PDF. This is a handwritten version of the checkbox / radio button PDF from https://pdfium-review.googlesource.com/56870 Change-Id: I88476edd6f2642908742e8c11eb4acf6941a1b20 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/57890 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Add FPDFPageObj_GetClipPath() API This adds an API to expose the data inside CPDF_ClipPath. Next to the initial getter, this also adds: - FPDFClipPath_CountPaths() to get number of paths inside the clip path - FPDFClipPath_CountPathSegments() to get the number of segments inside one specific path - FPDFClipPath_GetPathSegment() to get a FPDF_PATHSEGMENT, which can be already analyzed using the existing FPDFPathSegment_*() APIs. Bug: pdfium:1332 Change-Id: I6a8d99fd80d1df2c3e1c1406757f20d9f9873f0d Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/58310 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Add FPDFPageObj_GetClipPath() API This adds an API to expose the data inside CPDF_ClipPath. Next to the initial getter, this also adds: - FPDFClipPath_CountPaths() to get number of paths inside the clip path - FPDFClipPath_CountPathSegments() to get the number of segments inside one specific path - FPDFClipPath_GetPathSegment() to get a FPDF_PATHSEGMENT, which can be already analyzed using the existing FPDFPathSegment_*() APIs. Bug: pdfium:1332 Change-Id: I6a8d99fd80d1df2c3e1c1406757f20d9f9873f0d Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/58310 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Reformat listbox_form.in to be more consistent with other .in files. Also reformat combobox_form.in. Change-Id: Iefb2c6e689c5b6f0afb45dbcc9aba9a4588512da Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/59939 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Reformat listbox_form.in to be more consistent with other .in files. Also reformat combobox_form.in. Change-Id: Iefb2c6e689c5b6f0afb45dbcc9aba9a4588512da Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/59939 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Rewrite lower level details of extracting text from page The current implementation of text extraction was difficult to understand, duplicated logic that existed in other methods, and wasn't clear about the units the inputs were in. It also didn't handle control characters correctly. The new implementation leans on the methods for converting indices between the text buffer index and character list index spaces to avoid duplication of code. It also makes it clear to the reader that inputs are in the character list index space. Finally, it fixes issues being seen in Chrome with respect of ranges being slightly off. This CL also adds a test for extracting text that has control characters. BUG=pdfium:942,chromium:654578 Change-Id: Id9d1f360c2d7492c7b5a48d6c9ae29f530892742 Reviewed-on: https://pdfium-review.googlesource.com/20014 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> | 8 年前 | |
Rewrite lower level details of extracting text from page The current implementation of text extraction was difficult to understand, duplicated logic that existed in other methods, and wasn't clear about the units the inputs were in. It also didn't handle control characters correctly. The new implementation leans on the methods for converting indices between the text buffer index and character list index spaces to avoid duplication of code. It also makes it clear to the reader that inputs are in the character list index space. Finally, it fixes issues being seen in Chrome with respect of ranges being slightly off. This CL also adds a test for extracting text that has control characters. BUG=pdfium:942,chromium:654578 Change-Id: Id9d1f360c2d7492c7b5a48d6c9ae29f530892742 Reviewed-on: https://pdfium-review.googlesource.com/20014 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> | 8 年前 | |
Test page size APIs for PDFs with /CropBox Test PDFs with overlapping / no overlapping cropboxes with the following page size APIs: - FPDF_GetPageWidthF() - FPDF_GetPageHeightF() - FPDF_GetPageSizeByIndex() Bug: 438884266 Change-Id: I27b31770d827ed76ff051a4558f02642cac8926e Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/135050 Reviewed-by: Tom Sepez <tsepez@chromium.org> Auto-Submit: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 11 个月前 | |
Test page size APIs for PDFs with /CropBox Test PDFs with overlapping / no overlapping cropboxes with the following page size APIs: - FPDF_GetPageWidthF() - FPDF_GetPageHeightF() - FPDF_GetPageSizeByIndex() Bug: 438884266 Change-Id: I27b31770d827ed76ff051a4558f02642cac8926e Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/135050 Reviewed-by: Tom Sepez <tsepez@chromium.org> Auto-Submit: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 11 个月前 | |
Add setters/getters for BleedBox and TrimBox. Since BleedBox and TrimBox are supported according to PDF specification, hence added setters and getters to get the value if exists. Bug:894655 Change-Id: I3c2600450f07665241a4724457a7cbc4282941ed Reviewed-on: https://pdfium-review.googlesource.com/c/43977 Commit-Queue: Shirleen Lou <xlou@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Add setters/getters for BleedBox and TrimBox. Since BleedBox and TrimBox are supported according to PDF specification, hence added setters and getters to get the value if exists. Bug:894655 Change-Id: I3c2600450f07665241a4724457a7cbc4282941ed Reviewed-on: https://pdfium-review.googlesource.com/c/43977 Commit-Queue: Shirleen Lou <xlou@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Expose DashingArray and Phase in the public API Access to dashing info was available in the original Foxit API, but not publicly accessible in pdfium. This provides getters and setters for them in fpdf_edit.h. Additionally, CFX_GraphState was extended to enable access. In contrast with the Foxit API, the dashing array getter copies to an array directly instead of passing in an index, like in FPDFPath_GetPathSegment(), to reduce the need for copying. R=tsepez@chromium.org Bug: pdfium:1187 Change-Id: If4b376e164dc8c8a97268ff380683b5d6a9f4be4 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/82030 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Expose DashingArray and Phase in the public API Access to dashing info was available in the original Foxit API, but not publicly accessible in pdfium. This provides getters and setters for them in fpdf_edit.h. Additionally, CFX_GraphState was extended to enable access. In contrast with the Foxit API, the dashing array getter copies to an array directly instead of passing in an index, like in FPDFPath_GetPathSegment(), to reduce the need for copying. R=tsepez@chromium.org Bug: pdfium:1187 Change-Id: If4b376e164dc8c8a97268ff380683b5d6a9f4be4 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/82030 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Add FPDFSignatureObj_GetDocMDPPermission() A document is OK to not contain any explicit markup for this, in which case 0 is returned. If a permission parameter is found, then the returned level of 1, 2 or 3 controls if no incremental updates are allowed (1) or incremental updates are OK, but annotations are not allowed (2) or even annotations are allowed (3). Note how there is a difference between omitting just the /P key (implicitly means 2) and omitting the more of this markup, which will return 0. This API is meant to be used in combination with the FPDF_GetTrailerEnds() API, which allows detecting additional incremental updates after a signature. For example, if a comment is added after signing, then Permission=1 would result in an invalid signature, while Permission=3 just results in a partial signature. Change-Id: I911e9ddaff3a687729e7fe610c013b2ce3283d36 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/75910 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 5 年前 | |
Add FPDFSignatureObj_GetDocMDPPermission() A document is OK to not contain any explicit markup for this, in which case 0 is returned. If a permission parameter is found, then the returned level of 1, 2 or 3 controls if no incremental updates are allowed (1) or incremental updates are OK, but annotations are not allowed (2) or even annotations are allowed (3). Note how there is a difference between omitting just the /P key (implicitly means 2) and omitting the more of this markup, which will return 0. This API is meant to be used in combination with the FPDF_GetTrailerEnds() API, which allows detecting additional incremental updates after a signature. For example, if a comment is added after signing, then Permission=1 would result in an invalid signature, while Permission=3 just results in a partial signature. Change-Id: I911e9ddaff3a687729e7fe610c013b2ce3283d36 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/75910 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 5 年前 | |
Add FPDFFormFillEmbeddertest.DocumentAActions. Provides coverage for CJS_EventContext::OnDoc_* methods. Change-Id: I65dff8fe5af4a9c11ac8fffabe209ad497586b1c Reviewed-on: https://pdfium-review.googlesource.com/c/44392 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Add FPDFFormFillEmbeddertest.DocumentAActions. Provides coverage for CJS_EventContext::OnDoc_* methods. Change-Id: I65dff8fe5af4a9c11ac8fffabe209ad497586b1c Reviewed-on: https://pdfium-review.googlesource.com/c/44392 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Basic APIs and test for retrieving embedded attachment count and name 1. Added APIs for retrieving embedded attachment count and file name. * Added an embedder test testing them. Bug=pdfium:174 Change-Id: I181b8e0b81495d8a7fd8c3f79dbbc0f907f5e3fd Reviewed-on: https://pdfium-review.googlesource.com/7490 Commit-Queue: Jane Liu <janeliulwq@google.com> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Add a test case for another FPDFAttachment_GetFile() failure mode. FPDFAttachment_GetFile() has almost full test coverage, except in the case of a malformed attachment without an embedded file (/EF). Create such a PDF and test FPDFAttachment_* APIs against it. Bug: chromium:177188 Change-Id: I2a0f1b197dbe3609a753516c239116e0e3a06713 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/70631 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 5 年前 | |
Add a test case for another FPDFAttachment_GetFile() failure mode. FPDFAttachment_GetFile() has almost full test coverage, except in the case of a malformed attachment without an embedded file (/EF). Create such a PDF and test FPDFAttachment_* APIs against it. Bug: chromium:177188 Change-Id: I2a0f1b197dbe3609a753516c239116e0e3a06713 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/70631 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 5 年前 | |
Fix crashes in FPDFAttachment_GetStringValue() When the key argument is "CheckSum", FPDFAttachment_GetStringValue() has some special code to handle that case. This code path assumed the value of the checksum will always be a string, per spec. In the wild, the value could have some other type. Add some tests that would confuse the existing implementation and cause a nullptr crash. Then fix the implementation to not crash. Change-Id: I4cc7d6a568634512fa16ffa1bea15d9713cfa00f Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/119410 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Thomas Sepez <tsepez@google.com> Commit-Queue: Lei Zhang <thestig@chromium.org> | 2 年前 | |
Fix crashes in FPDFAttachment_GetStringValue() When the key argument is "CheckSum", FPDFAttachment_GetStringValue() has some special code to handle that case. This code path assumed the value of the checksum will always be a string, per spec. In the wild, the value could have some other type. Add some tests that would confuse the existing implementation and cause a nullptr crash. Then fix the implementation to not crash. Change-Id: I4cc7d6a568634512fa16ffa1bea15d9713cfa00f Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/119410 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Thomas Sepez <tsepez@google.com> Commit-Queue: Lei Zhang <thestig@chromium.org> | 2 年前 | |
API and test for retrieving image filters from image objects Added FPDFImageObj_GetImageFilterCount() and FPDFImageObj_GetImageFilters() for retrieving image filters of image objects. * Added a corresponding embedder test. * Changed the filter of an image object in embedded_image.pdf from DCTDecode to ASCIIHexDecode + DCTDecode, so we have a test case for images with more than one filter. Bug=pdfium:677 Change-Id: I398790a2cad33fea4ca16a0eb0889c04caa6b962 Reviewed-on: https://pdfium-review.googlesource.com/10130 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Jane Liu <janeliulwq@google.com> | 8 年前 | |
Add a test PDF with an empty xref table. Test loading it with various document loading functions to make sure they behave consistently with regards to whether the document needs to have its xref table rebuilt. Right now, it does require a rebuild. Most PDF viewers, along with pdfium_test, are fine with the empty xref table. pdfium_test uses a separate FPDF_FILEACCESS implementation from pdfium_embeddertests, so pdfium_test actually behaves inconsistently with this test. It is preferable to avoid rebuilding the xref table. Rebuilding requires more work and may not always rebuild correctly. There will be a follow-up to skip the rebuild. BUG=pdfium:1197 Change-Id: Ic6378d8514ce122b1072be30e0e06d69dec5c4ed Reviewed-on: https://pdfium-review.googlesource.com/c/47570 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Distinguish between user and owner passwords. BUG=pdfium:496 Review-Url: https://codereview.chromium.org/2005653002 | 9 年前 | |
Add tests for loading documents with non-ASCII passwords. The encoding is different depending on the security handler revision. Add tests to illustrate this. BUG=pdfium:1194 Change-Id: Ia08e4250a41247afce98ac277d25a340beedbe0c Reviewed-on: https://pdfium-review.googlesource.com/c/48210 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Avoid crash in CPDF_SecurityHandler::GetUserPassword(). For r2 and r3 encrypted PDFs, the value for the /O key is normally a 32-byte string. CPDF_SecurityHandler::GetUserPassword() recently started using spans, and that caught an OOB error for /O keys shorter than 32-bytes. While a hard crash is better than an OOB read, gracefully handling the situation is best. Change GetUserPassword() to do that. For testing, add hand-edited copies of encrypted_hello_world_r2.pdf and encrypted_hello_world_r3.pdf, with 31-byte /O keys, and the xref offset adjusted. Then make sure embedder tests that try to load these bad PDFs do not crash. Bug: pdfium:1436 Change-Id: I873eead7c1dc45c9c4bbd41044f8fa5b77d7f558 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/64170 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Add tests for loading documents with non-ASCII passwords. The encoding is different depending on the security handler revision. Add tests to illustrate this. BUG=pdfium:1194 Change-Id: Ia08e4250a41247afce98ac277d25a340beedbe0c Reviewed-on: https://pdfium-review.googlesource.com/c/48210 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Avoid crash in CPDF_SecurityHandler::GetUserPassword(). For r2 and r3 encrypted PDFs, the value for the /O key is normally a 32-byte string. CPDF_SecurityHandler::GetUserPassword() recently started using spans, and that caught an OOB error for /O keys shorter than 32-bytes. While a hard crash is better than an OOB read, gracefully handling the situation is best. Change GetUserPassword() to do that. For testing, add hand-edited copies of encrypted_hello_world_r2.pdf and encrypted_hello_world_r3.pdf, with 31-byte /O keys, and the xref offset adjusted. Then make sure embedder tests that try to load these bad PDFs do not crash. Bug: pdfium:1436 Change-Id: I873eead7c1dc45c9c4bbd41044f8fa5b77d7f558 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/64170 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Add tests for loading documents with non-ASCII passwords. The encoding is different depending on the security handler revision. Add tests to illustrate this. BUG=pdfium:1194 Change-Id: Ia08e4250a41247afce98ac277d25a340beedbe0c Reviewed-on: https://pdfium-review.googlesource.com/c/48210 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Add tests for loading documents with non-ASCII passwords. The encoding is different depending on the security handler revision. Add tests to illustrate this. BUG=pdfium:1194 Change-Id: Ia08e4250a41247afce98ac277d25a340beedbe0c Reviewed-on: https://pdfium-review.googlesource.com/c/48210 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Merge to XFA: Support linearized loading BUG=446715 R=thestig@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/1353093003 . Conflicts: core/include/fpdfapi/fpdf_parser.h core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp samples/pdfium_test.cc testing/embedder_test.cpp testing/embedder_test.h Review URL: https://codereview.chromium.org/1412083010 . | 10 年前 | |
Give some .in test files better formatting. Then regenerate the .pdf files. Change-Id: I15ea18f5485e9381de8b9a93110bacadcbd15448 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/65871 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Give some .in test files better formatting. Then regenerate the .pdf files. Change-Id: I15ea18f5485e9381de8b9a93110bacadcbd15448 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/65871 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Implement FPDFText_GetMatrix(). Add a public API to get the transformation matrix for characters in a FPDF_TEXTPAGE. Include a new font_matrix.pdf test case, where fonts can have a size of 1, even though they are visually rendered as though they have a size of 12. Bug: pdfium:1445 Change-Id: I2f091eeb839d94d5c93b13b8ae755d0e520f5f40 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/65353 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 6 年前 | |
Implement FPDFText_GetMatrix(). Add a public API to get the transformation matrix for characters in a FPDF_TEXTPAGE. Include a new font_matrix.pdf test case, where fonts can have a size of 1, even though they are visually rendered as though they have a size of 12. Bug: pdfium:1445 Change-Id: I2f091eeb839d94d5c93b13b8ae755d0e520f5f40 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/65353 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 6 年前 | |
Add another test for FPDFText_GetFontWeight(). Illustrate the existing behavior and add a TODO to fix it. Rearrange font_weight.in to make adding new fonts for testing more of an append operation inside the .in file, to avoid renumbering the /Contents object every time a font gets added. Bug: pdfium:1420 Change-Id: I3ceb64eeb342803a2d1f47989d6209d70ed157e3 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/62354 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 6 年前 | |
Add another test for FPDFText_GetFontWeight(). Illustrate the existing behavior and add a TODO to fix it. Rearrange font_weight.in to make adding new fonts for testing more of an append operation inside the .in file, to avoid renumbering the /Contents object every time a font gets added. Bug: pdfium:1420 Change-Id: I3ceb64eeb342803a2d1f47989d6209d70ed157e3 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/62354 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 6 年前 | |
Add FPDFFormObj_CountObjects() API To find out the number of sub-objects a form object has, similar to how FPDFPage_CountObjects() does it for page objects. Change-Id: I7e5775dece42b74fd5b71b1d9622a1aa37bf64ac Reviewed-on: https://pdfium-review.googlesource.com/37316 Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> | 7 年前 | |
Add FPDFFormObj_CountObjects() API To find out the number of sub-objects a form object has, similar to how FPDFPage_CountObjects() does it for page objects. Change-Id: I7e5775dece42b74fd5b71b1d9622a1aa37bf64ac Reviewed-on: https://pdfium-review.googlesource.com/37316 Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> | 7 年前 | |
Add a more complex test for a PDF saving bug Add a second PDFEditImgTest case to further demonstrate a PDF saving bug, where a no-op FPDFPageObj_SetMatrix() call causes the saved PDF to have incorrect transformation matrices. This second test case has an image inside a form. This test also demonstrates FPDFPageObj_GetMatrix() behavior and shows what the matrix is relative to. Mention this in the API's documentation. Bug: pdfium:2132 Change-Id: Ibdfac7de37c43ffec45da6d093c2e8798b85950d Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/116911 Reviewed-by: Thomas Sepez <tsepez@google.com> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 2 年前 | |
Add a more complex test for a PDF saving bug Add a second PDFEditImgTest case to further demonstrate a PDF saving bug, where a no-op FPDFPageObj_SetMatrix() call causes the saved PDF to have incorrect transformation matrices. This second test case has an image inside a form. This test also demonstrates FPDFPageObj_GetMatrix() behavior and shows what the matrix is relative to. Mention this in the API's documentation. Bug: pdfium:2132 Change-Id: Ibdfac7de37c43ffec45da6d093c2e8798b85950d Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/116911 Reviewed-by: Thomas Sepez <tsepez@google.com> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 2 年前 | |
Add path objects tests for a PDF saving bug Add FPDFEditPathEmbedderTest cases to demonstrate a PDF saving bug, where a no-op FPDFPageObj_SetMatrix() call causes the saved PDF to have incorrect transformation matrices. These test cases cover path objects and path objects in forms. Bug: pdfium:2132 Change-Id: I81f13fa6a471c4f7184e43f105ff0cc151bfccff Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/117052 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Thomas Sepez <tsepez@google.com> | 2 年前 | |
Add path objects tests for a PDF saving bug Add FPDFEditPathEmbedderTest cases to demonstrate a PDF saving bug, where a no-op FPDFPageObj_SetMatrix() call causes the saved PDF to have incorrect transformation matrices. These test cases cover path objects and path objects in forms. Bug: pdfium:2132 Change-Id: I81f13fa6a471c4f7184e43f105ff0cc151bfccff Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/117052 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Thomas Sepez <tsepez@google.com> | 2 年前 | |
Add text object version of a more complex test for a PDF saving bug Add a FPDFEditEmbedderTest case to demonstrate a PDF saving bug, where a no-op FPDFPageObj_SetMatrix() call causes the saved PDF to have incorrect transformation matrices. This test case has text objects inside a form. The basic case where text objects are not inside a form is already covered by the BUG_1893 test case. Also add a missing sanity check in the prior image object test. Bug: pdfium:2132 Change-Id: Ib6bb459f4d1a707f53b02c6705ca9422e1eb273a Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/117051 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Thomas Sepez <tsepez@google.com> | 2 年前 | |
Add text object version of a more complex test for a PDF saving bug Add a FPDFEditEmbedderTest case to demonstrate a PDF saving bug, where a no-op FPDFPageObj_SetMatrix() call causes the saved PDF to have incorrect transformation matrices. This test case has text objects inside a form. The basic case where text objects are not inside a form is already covered by the BUG_1893 test case. Also add a missing sanity check in the prior image object test. Bug: pdfium:2132 Change-Id: Ib6bb459f4d1a707f53b02c6705ca9422e1eb273a Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/117051 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Thomas Sepez <tsepez@google.com> | 2 年前 | |
Add experimental FPDFAnnot_SetFontColor() API Add an API to mirror FPDFAnnot_GetFontColor(). For now, the implementation stays consistent with FPDFAnnot_SetBorder() and removes the existing appearance stream, if any. Bug: 397836729 Change-Id: I675a4f35c8b481dbb3a64713017c9f55106d121a Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/131830 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 1 年前 | |
Add an experimental API to surface a page's additional action. Add an API to surface a page's additional action (/AA) to the embedder. FORM_GetPageAAction() returns either a page open action or a page close action, depending on the input type. Change-Id: I435d04ddd6bd0755d651a3cbb6e1abd93b81d356 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/72590 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 5 年前 | |
Add an experimental API to surface a page's additional action. Add an API to surface a page's additional action (/AA) to the embedder. FORM_GetPageAAction() returns either a page open action or a page close action, depending on the input type. Change-Id: I435d04ddd6bd0755d651a3cbb6e1abd93b81d356 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/72590 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 5 年前 | |
Create embeddertests for other kinds of actions. Change-Id: Ia4619be65e2ab8ee4bf19ba9608c1cc94594ba89 Reviewed-on: https://pdfium-review.googlesource.com/c/43812 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Create embeddertests for other kinds of actions. Change-Id: Ia4619be65e2ab8ee4bf19ba9608c1cc94594ba89 Reviewed-on: https://pdfium-review.googlesource.com/c/43812 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Add support for action /GoToE Add support for action /GoToE, to allow embedders to get the file path and destination associated to this action. Change-Id: I49eeef889da6babcd212a56f6cc0b291d76b942c Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/72530 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 5 年前 | |
Add support for action /GoToE Add support for action /GoToE, to allow embedders to get the file path and destination associated to this action. Change-Id: I49eeef889da6babcd212a56f6cc0b291d76b942c Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/72530 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 5 年前 | |
Add basic /JPXDecode test cases Adds test cases for the /JPXDecode filter that exercise all the basic color spaces (gray, RGB, and CMYK), both with and without opacity. The test file renders correctly in Adobe Acrobat Reader, but has issues in most other PDF readers. The expectation file was created manually, based on the PDF specification, and may not reflect our final implementation. The files are included into the .in template using the {{include}} mechanism, without additional filters. The gray and RGB files are in the basic JP2 (.jp2) format, while the CMYK files are in JPX (.jpf) format, as CMYK support is an extension. This change includes a simple utility script, strip_jp2_comments.py, for removing comment segments from a JPEG 2000 codestream. Bug: pdfium:2000 Change-Id: I246ab1573b15089af9f2812d62b49ae67680d249 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/104710 Commit-Queue: K. Moon <kmoon@chromium.org> Auto-Submit: K. Moon <kmoon@chromium.org> Reviewed-by: Nigi <nigi@chromium.org> | 3 年前 | |
Add basic /JPXDecode test cases Adds test cases for the /JPXDecode filter that exercise all the basic color spaces (gray, RGB, and CMYK), both with and without opacity. The test file renders correctly in Adobe Acrobat Reader, but has issues in most other PDF readers. The expectation file was created manually, based on the PDF specification, and may not reflect our final implementation. The files are included into the .in template using the {{include}} mechanism, without additional filters. The gray and RGB files are in the basic JP2 (.jp2) format, while the CMYK files are in JPX (.jpf) format, as CMYK support is an extension. This change includes a simple utility script, strip_jp2_comments.py, for removing comment segments from a JPEG 2000 codestream. Bug: pdfium:2000 Change-Id: I246ab1573b15089af9f2812d62b49ae67680d249 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/104710 Commit-Queue: K. Moon <kmoon@chromium.org> Auto-Submit: K. Moon <kmoon@chromium.org> Reviewed-by: Nigi <nigi@chromium.org> | 3 年前 | |
Add a FPDFTextEmbedderTest for mirrored Hebrew text. The PDF contains "Benjamin" in Hebrew written in Noto Sans on the top-right, and "ben" mirrored on the bottom-left. This helps test R2L handling code in CPDF_TextPage and adds coverage for SwapTempTextBuf(). Change-Id: Iff09241253795d9857630b65c2ead030a5ef0f23 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/67910 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Add a FPDFTextEmbedderTest for mirrored Hebrew text. The PDF contains "Benjamin" in Hebrew written in Noto Sans on the top-right, and "ben" mirrored on the bottom-left. This helps test R2L handling code in CPDF_TextPage and adds coverage for SwapTempTextBuf(). Change-Id: Iff09241253795d9857630b65c2ead030a5ef0f23 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/67910 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Remove spaces adjacent to bracket characters in some PDFs Currently, brackets in most PDFs are styled as such: [ (item1) (item2) (item3) ] Remove the spaces adjacent to brackets to style as such: [(item1) (item2) (item3)] The new style is more compact and easier on the eyes for applications like nested lists. Apply the style on rectangles.in and hello_world.in, as those are the two files developers are most likely to look at when styling new files. Change-Id: Ic6144caf0369754bfb40acff7a5afdb4c6e30725 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68650 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> | 6 年前 | |
Remove spaces adjacent to bracket characters in some PDFs Currently, brackets in most PDFs are styled as such: [ (item1) (item2) (item3) ] Remove the spaces adjacent to brackets to style as such: [(item1) (item2) (item3)] The new style is more compact and easier on the eyes for applications like nested lists. Apply the style on rectangles.in and hello_world.in, as those are the two files developers are most likely to look at when styling new files. Change-Id: Ic6144caf0369754bfb40acff7a5afdb4c6e30725 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68650 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> | 6 年前 | |
Add RemoveTextObjectWithTwoPagesSharingContentStreamAndResources test Add a test case to demonstrate FPDFPage_RemoveObject() not working correctly when 2 pages share the same page /Content stream object. Bug: pdfium:2012 Change-Id: I5fc0f0888d71368c0dd257931e4a1013301f639f Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/105212 Reviewed-by: K. Moon <kmoon@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 3 年前 | |
Add RemoveTextObjectWithTwoPagesSharingContentStreamAndResources test Add a test case to demonstrate FPDFPage_RemoveObject() not working correctly when 2 pages share the same page /Content stream object. Bug: pdfium:2012 Change-Id: I5fc0f0888d71368c0dd257931e4a1013301f639f Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/105212 Reviewed-by: K. Moon <kmoon@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 3 年前 | |
Add some FPDFDocEmbedderTests that delete pages and save Exercise FPDFPage_Delete() followed by FPDF_SaveAsCopy() under a variety of situations. Show that FPDF_SaveAsCopy() is writing out more data than necessary. Bug: pdfium:2146 Change-Id: Ic520acc6a86fbf9b14854e3ba4d2b1ee71fa904b Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/117770 Reviewed-by: Thomas Sepez <tsepez@google.com> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 2 年前 | |
Add some FPDFDocEmbedderTests that delete pages and save Exercise FPDFPage_Delete() followed by FPDF_SaveAsCopy() under a variety of situations. Show that FPDF_SaveAsCopy() is writing out more data than necessary. Bug: pdfium:2146 Change-Id: Ic520acc6a86fbf9b14854e3ba4d2b1ee71fa904b Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/117770 Reviewed-by: Thomas Sepez <tsepez@google.com> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 2 年前 | |
Add RemoveTextObjectWithTwoPagesSharingResourcesDict test case In this test case, with yet another 2 page variant of hello_world.pdf, the 2 pages share the /Resources dictionary itself, instead of just sharing the resources in the dictionary. Bug: pdfium:2012 Change-Id: I30d4f35e41c5be78568aab118eb90d460d1c030e Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/105730 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 3 年前 | |
Add RemoveTextObjectWithTwoPagesSharingResourcesDict test case In this test case, with yet another 2 page variant of hello_world.pdf, the 2 pages share the /Resources dictionary itself, instead of just sharing the resources in the dictionary. Bug: pdfium:2012 Change-Id: I30d4f35e41c5be78568aab118eb90d460d1c030e Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/105730 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 3 年前 | |
Add RemoveTextObjectWithTwoPagesSharingContentArrayAndResources test This is another FPDFPage_RemoveObject() test case, similar to RemoveTextObjectWithTwoPagesSharingContentStreamAndResources, where 2 pages share the same page /Content. Except this time the /Content points to an array of stream objects instead of a stream directly. The test PDF added here is similar to hello_world_2_pages.pdf and hello_world_split_streams.pdf. Bug: pdfium:2012 Change-Id: I396d1cf0a9d3da88337c459aa7ef6f6ec189bb1d Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/105491 Reviewed-by: Nigi <nigi@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 3 年前 | |
Add RemoveTextObjectWithTwoPagesSharingContentArrayAndResources test This is another FPDFPage_RemoveObject() test case, similar to RemoveTextObjectWithTwoPagesSharingContentStreamAndResources, where 2 pages share the same page /Content. Except this time the /Content points to an array of stream objects instead of a stream directly. The test PDF added here is similar to hello_world_2_pages.pdf and hello_world_split_streams.pdf. Bug: pdfium:2012 Change-Id: I396d1cf0a9d3da88337c459aa7ef6f6ec189bb1d Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/105491 Reviewed-by: Nigi <nigi@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 3 年前 | |
Handle compressed data streams in CPDF_PageContentGenerator. In CPDF_PageContentGenerator, When it modifies streams, GenerateModifiedStreams() returns uncompressed data. UpdateContentStreams() then puts the data into streams. When doing this, it needs to remember to remove the filters, if any, from the streams. Otherwise the stream's filters and data may have a mismatch. Add an embedder test for this case, with yet another variation of hello_world.pdf. Bug: pdfium:1326 Change-Id: I59a39cbea1e4d71ed8917c90734e73ca1cdaa411 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/57230 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Fix some nits from commit 27cf78d8. Change-Id: I52d7b9692c19af1aafab7d572d0a274726bd37f5 Reviewed-on: https://pdfium-review.googlesource.com/35911 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> | 7 年前 | |
Fix some nits from commit 27cf78d8. Change-Id: I52d7b9692c19af1aafab7d572d0a274726bd37f5 Reviewed-on: https://pdfium-review.googlesource.com/35911 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> | 7 年前 | |
Fix hint tables parsing. Sample PDF: https://yadi.sk/d/oWLtAEfy3YbEb3 For offsets, equal to the hint stream offset, added hint stream length to determine the actual offset, because linearization inserted the hint stream at the original location of the object. Also the number of bits needed to represent the numerator of the fractional position for each shared object reference may be zero, if each shared group contains only one object with obj num, incremented on 1. Change-Id: I4754d603f388354821e8d0cac97ad99a7578fe4b Reviewed-on: https://pdfium-review.googlesource.com/36610 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Add FPDFAnnot_GetInkListPath() API This is somewhat similar to FPDFAnnot_GetVertices(), but this is for ink annotations and here the value is an array of paths. So first add an FPDFAnnot_GetInkListCount() to get the number of paths, then FPDFAnnot_GetInkListPath() can be used to get the individual paths. Change-Id: I204a5a53e949fdbb7b264711c27107fe62c9f2be Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/76350 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 5 年前 | |
Add FPDFAnnot_GetInkListPath() API This is somewhat similar to FPDFAnnot_GetVertices(), but this is for ink annotations and here the value is an array of paths. So first add an FPDFAnnot_GetInkListCount() to get the number of paths, then FPDFAnnot_GetInkListPath() can be used to get the individual paths. Change-Id: I204a5a53e949fdbb7b264711c27107fe62c9f2be Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/76350 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 5 年前 | |
Add another test case for FPDFImageObj_GetImageMetadata(). Test with a PDF that contains a JPEG2000 image. The PDF is just a copy of testing/resources/pixel/lzw1.in. Change-Id: I9f771f559f7eedceb0fa6f0409e30fc2ec2721cf Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/69911 Reviewed-by: Daniel Hosseinian <dhoss@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Add another test case for FPDFImageObj_GetImageMetadata(). Test with a PDF that contains a JPEG2000 image. The PDF is just a copy of testing/resources/pixel/lzw1.in. Change-Id: I9f771f559f7eedceb0fa6f0409e30fc2ec2721cf Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/69911 Reviewed-by: Daniel Hosseinian <dhoss@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Add experimental JavaScript retrieval APIs. Add the following set of APIs to retrieve the JavaScript code from actions in a document's name tree: - FPDFDoc_GetJavaScriptActionCount() - FPDFDoc_GetJavaScriptAction() - FPDFDoc_CloseJavaScriptAction() - FPDFJavaScriptAction_GetName() - FPDFJavaScriptAction_GetScript() This also adds the FPDF_JAVASCRIPT_ACTION type and ScopedFPDFJavaScriptAction to help manage the lifetime of FPDF_JAVASCRIPT_ACTION. This is implemented on top of CPDF_Action, and improves validation in CPDF_Action to better follow the spec. Bug: pdfium:1253 Change-Id: I2b3ba83bb4f661e6c996c9d057fbf7d3a0c20e70 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/55750 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 6 年前 | |
Remove alternate spelling of j#61v#61script from js.pdf We suspect it makes some AVs erroneously suspect that we are up to no good, and flag the file as suspect. It is usually best to just avoid the possibility of the warning, since some other AV will likely flag it again in the future. The unit tests for PDF_NameDecode() give sufficient coverage for this case. Change-Id: Ia186152167cafe17adcd7deeb72357bf1db41d17 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/72331 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 5 年前 | |
Add FPDFText_FindStart() test case with non-ASCII characters. Illustrate a bug where FPDFText_FindStart() and related functions do not get the correct results on Windows. Bug: pdfium:1370 Change-Id: Ibafe0569c5d225d21b1518334c5c6653596bde3a Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/57931 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Fix the Size trailer entry in hand written PDFs. Change-Id: Ib84cc570c2ffaf9fdd49d32bc12c7e6197e130c1 Reviewed-on: https://pdfium-review.googlesource.com/6850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Fix the Size trailer entry in hand written PDFs. Change-Id: Ib84cc570c2ffaf9fdd49d32bc12c7e6197e130c1 Reviewed-on: https://pdfium-review.googlesource.com/6850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Add FPDFAnnot_GetBorder() API This is similar to FPDFAnnot_GetLine(), but a /Border key is valid for all annotation types. The array can have an optional 4th element, but that itself doesn't have a fixed size, so it's not exposed by this API -- could be done by a separate function. Change-Id: I796c2ea17be1f039a6c6129dbde0b0a22276e19a Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/77010 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 5 年前 | |
Add FPDFAnnot_GetBorder() API This is similar to FPDFAnnot_GetLine(), but a /Border key is valid for all annotation types. The array can have an optional 4th element, but that itself doesn't have a fixed size, so it's not exposed by this API -- could be done by a separate function. Change-Id: I796c2ea17be1f039a6c6129dbde0b0a22276e19a Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/77010 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 5 年前 | |
Add FPDFSaveEmbedderTest.SaveLinearizedDoc Bug: pdfium:614 Change-Id: I3c6cd16dfe0ac5db66cc9e996d3f4e74a5d9d716 Reviewed-on: https://pdfium-review.googlesource.com/18251 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 8 年前 | |
Ignore bad data in the shared object hint table. Currently this is being treated as a case of "data not available" which leads to an infinite loop. BUG=pdfium:1055 Change-Id: I2722a5b364d56a4ad5b7cca2a4b42e6b13a933f4 Reviewed-on: https://pdfium-review.googlesource.com/29831 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Added test cases for focus APIs of class BAAnnotHandler. 1. These test cases verify the current behaviour of focus APIs of class BAAnnotHandler. 2. Same test cases will be updated for new behaviour of these APIs once class BAAnnotHandler becomes capable of tabbing over links and highlights. 3. Related PR (https://pdfium-review.googlesource.com/c/pdfium/+/60011/). Bug: chromium:994500 Change-Id: Icd3d1c72354ffd02d92b4e98675fe1aebec59bce Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/62950 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Neha Gupta <negupta@microsoft.com> | 6 年前 | |
Added test cases for focus APIs of class BAAnnotHandler. 1. These test cases verify the current behaviour of focus APIs of class BAAnnotHandler. 2. Same test cases will be updated for new behaviour of these APIs once class BAAnnotHandler becomes capable of tabbing over links and highlights. 3. Related PR (https://pdfium-review.googlesource.com/c/pdfium/+/60011/). Bug: chromium:994500 Change-Id: Icd3d1c72354ffd02d92b4e98675fe1aebec59bce Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/62950 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Neha Gupta <negupta@microsoft.com> | 6 年前 | |
Capture existing multi-select list box behavior with more tests According to the spec [1], if a choice field has both /V and /I entries and the /Opt items they identify are different, then the /V entry should be used. Add tests to show that the current implementation does not behave consistently with the spec. [1] Section 12.7.4.4 "Choice Fields" of the ISO 32000-1 standard. Bug: pdfium:1505 Change-Id: I3564812f30d6aa693f3e5effb25f8f0fc06d6485 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68631 Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Capture existing multi-select list box behavior with more tests According to the spec [1], if a choice field has both /V and /I entries and the /Opt items they identify are different, then the /V entry should be used. Add tests to show that the current implementation does not behave consistently with the spec. [1] Section 12.7.4.4 "Choice Fields" of the ISO 32000-1 standard. Bug: pdfium:1505 Change-Id: I3564812f30d6aa693f3e5effb25f8f0fc06d6485 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68631 Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Set correct stream index when parsing is done in several steps. When parsing happens in several steps (in pages with > 100 page objects), the position is reset to 0 and the start pointer is advanced. This breaks the calculation of which stream an object belongs to. Passing in the base pointer separately from the start offset allows the correct position to be calculated and the correct stream to be identified. Change-Id: Ic0d5f59f437609158aa97b3c8a18dbd48cd3b0d4 Reviewed-on: https://pdfium-review.googlesource.com/42270 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Set correct stream index when parsing is done in several steps. When parsing happens in several steps (in pages with > 100 page objects), the position is reset to 0 and the start pointer is advanced. This breaks the calculation of which stream an object belongs to. Passing in the base pointer separately from the start offset allows the correct position to be calculated and the correct stream to be identified. Change-Id: Ic0d5f59f437609158aa97b3c8a18dbd48cd3b0d4 Reviewed-on: https://pdfium-review.googlesource.com/42270 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Replace marked_content_id.pdf with a handwritten version. Make it easier to modify this PDF in the future. The file no longer has document metadata, and some optional keys that contain irrelevant values were removed. Change-Id: Ie105df407104322575c26196a7c5362383d536ab Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/90636 Reviewed-by: Nigi <nigi@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Replace marked_content_id.pdf with a handwritten version. Make it easier to modify this PDF in the future. The file no longer has document metadata, and some optional keys that contain irrelevant values were removed. Change-Id: Ie105df407104322575c26196a7c5362383d536ab Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/90636 Reviewed-by: Nigi <nigi@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Add a test to show FPDFImageObj_GetBitmap() does not handle masks. Make a copy of testing/resources/pixel/matte.in and the corresponding generated PDF for use by embedder tests. Add a test to extract the images from it. Show that they are all the same, even though they are different when rendered in the PDF. Bug: pdfium:1554 Change-Id: Iced360086b21c0d93a3baeebb95615546c8e6fa3 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/71094 Reviewed-by: Daniel Hosseinian <dhoss@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 5 年前 | |
Add a test to show FPDFImageObj_GetBitmap() does not handle masks. Make a copy of testing/resources/pixel/matte.in and the corresponding generated PDF for use by embedder tests. Add a test to extract the images from it. Show that they are all the same, even though they are different when rendered in the PDF. Bug: pdfium:1554 Change-Id: Iced360086b21c0d93a3baeebb95615546c8e6fa3 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/71094 Reviewed-by: Daniel Hosseinian <dhoss@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 5 年前 | |
Put valid mona_lisa.jpg base64-encoded data in xfa_image_edit.pdf The code to process <imageEdit> works, but can't be tested without a valid jpg. Change-Id: Ibfad30e20436f4cd505893da222f08964778ed25 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/93873 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 4 年前 | |
Add unit test for FPDFImageObj_LoadJpegFile{Inline}() APIs - Take mona_lisa.jpg from chromium tree. - Move fopen-based FileAccess to testing/utils to provide easy access to actual jpeg files. Bug: pdfium:1226 Change-Id: Ie78034f5794ad7789874932b2ecf834601dc23a1 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/62910 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Test FPDFAnnot_GetFormFieldType API with more form field types The CL adds a new file with multiple types of form fields. The file is used to validate the FPDFAnnot_GetFormFieldType API for more form field types. Bug: pdfium:1459 Change-Id: Ibfc2a41aca69feb8845612b2856bd09ea440a9ca Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/65990 Commit-Queue: Ankit Kumar 🌪️ <ankk@microsoft.com> Reviewed-by: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Test FPDFAnnot_GetFormFieldType API with more form field types The CL adds a new file with multiple types of form fields. The file is used to validate the FPDFAnnot_GetFormFieldType API for more form field types. Bug: pdfium:1459 Change-Id: Ibfc2a41aca69feb8845612b2856bd09ea440a9ca Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/65990 Commit-Queue: Ankit Kumar 🌪️ <ankk@microsoft.com> Reviewed-by: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Fix PDF saving when multiple graphics states are in effect To avoid saving unnecessary data, CL [1] added the ability to keep track of which ExtGState resources were in use. This does not work in all cases, like the newly created multiple_graphics_states.pdf being added in this CL. To fix this case where multiple graphics states are in effect at the same time, change the code that keeps track of ExtGState resources to store a vector of resource names, instead of just the most recently used one. [1] https://pdfium-review.googlesource.com/105614 Bug: chromium:1451953 Change-Id: I673fe9f13efe90c50dbfa2511ab57092a2f987e3 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/108471 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 3 年前 | |
Fix PDF saving when multiple graphics states are in effect To avoid saving unnecessary data, CL [1] added the ability to keep track of which ExtGState resources were in use. This does not work in all cases, like the newly created multiple_graphics_states.pdf being added in this CL. To fix this case where multiple graphics states are in effect at the same time, change the code that keeps track of ExtGState resources to store a vector of resource names, instead of just the most recently used one. [1] https://pdfium-review.googlesource.com/105614 Bug: chromium:1451953 Change-Id: I673fe9f13efe90c50dbfa2511ab57092a2f987e3 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/108471 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 3 年前 | |
Fix typos in some .in files and regenerate the .pdf files. Change-Id: I3f07ccee67fcbdc1eaf9a2acea40630ce65708f5 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68330 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Fix typos in some .in files and regenerate the .pdf files. Change-Id: I3f07ccee67fcbdc1eaf9a2acea40630ce65708f5 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68330 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Add more tests for FPDF_CountNamedDests(). Including a new PDF with "old style" destinations. Change-Id: I6a9e9746dbdb89e351d155b5748cc0367dbd6ab0 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68254 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 6 年前 | |
Add more tests for FPDF_CountNamedDests(). Including a new PDF with "old style" destinations. Change-Id: I6a9e9746dbdb89e351d155b5748cc0367dbd6ab0 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68254 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 6 年前 | |
Add FPDFViewEmbedderTest.DocumentWithNoPageCount. Exercise the part of FPDF_GetPageCount() implementation inside cpdf_document.cpp that has no code coverage. Change-Id: I8a0c93f7b4913425f0d518e8a76b19261d258b6e Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/80430 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 5 年前 | |
Add FPDFViewEmbedderTest.DocumentWithNoPageCount. Exercise the part of FPDF_GetPageCount() implementation inside cpdf_document.cpp that has no code coverage. Change-Id: I8a0c93f7b4913425f0d518e8a76b19261d258b6e Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/80430 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 5 年前 | |
Add FPDF_GetFileIdentifier() to public API Add an experimental function to the public API to read the file identifier defined in the document trailer. Bug: pdfium:1047 Change-Id: I47dc9b75aad510d8cf6fec956d088ae9c3201e84 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68370 Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Add FPDF_GetFileIdentifier() to public API Add an experimental function to the public API to read the file identifier defined in the document trailer. Bug: pdfium:1047 Change-Id: I47dc9b75aad510d8cf6fec956d088ae9c3201e84 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68370 Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Create embeddertests for other kinds of actions. Change-Id: Ia4619be65e2ab8ee4bf19ba9608c1cc94594ba89 Reviewed-on: https://pdfium-review.googlesource.com/c/43812 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Create embeddertests for other kinds of actions. Change-Id: Ia4619be65e2ab8ee4bf19ba9608c1cc94594ba89 Reviewed-on: https://pdfium-review.googlesource.com/c/43812 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Add API for getting page labels. BUG=pdfium:479 Review-Url: https://codereview.chromium.org/2521843003 | 9 年前 | |
Add FPDFViewEmbedderTest.DocumentWithEmptyPageTreeNode. Test a corner case where the first non-root node in a pages tree has an empty /Kids list. Change-Id: I1756f829df3a9f07afb25c82eff1b5d3e93d5f66 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/103132 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 3 年前 | |
Add FPDFViewEmbedderTest.DocumentWithEmptyPageTreeNode. Test a corner case where the first non-root node in a pages tree has an empty /Kids list. Change-Id: I1756f829df3a9f07afb25c82eff1b5d3e93d5f66 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/103132 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 3 年前 | |
Merge to XFA: Add base test for RebuildCrossRef function. This tests whether RebuildCrossRef could handle well-formatted pdf file. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1409013005 . (cherry picked from commit 4544797e8998a31e7bc3f5439a5982f7f66dff26) Review URL: https://codereview.chromium.org/1413343004 . | 10 年前 | |
Merge to XFA: Add basic checking for RebuildCrossRef RebuildCrossRef function returns false when we can not find file trailer or any indirect object. This serves as a basic file format checking. BUG=pdfium:215 TBR=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1476163002 . (cherry picked from commit f14da1d58e8e12633c7a47e6efd5ffe43bb37b4b) Review URL: https://codereview.chromium.org/1486383002 . | 10 年前 | |
Add FPDFAnnot_GetVertices() API This follows the same pattern as FPDF_GetTrailerEnds(), so the client has to call this function twice, but allocation of the buffer happens outside pdfium. Change-Id: Ic733083eba0b110310d6bbdc48f874bac4c7f2d6 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/76050 Commit-Queue: Miklos V <vmiklos@collabora.co.uk> Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 5 年前 | |
Add FPDFAnnot_GetVertices() API This follows the same pattern as FPDF_GetTrailerEnds(), so the client has to call this function twice, but allocation of the buffer happens outside pdfium. Change-Id: Ic733083eba0b110310d6bbdc48f874bac4c7f2d6 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/76050 Commit-Queue: Miklos V <vmiklos@collabora.co.uk> Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 5 年前 | |
Remove spaces adjacent to bracket characters in some PDFs Currently, brackets in most PDFs are styled as such: [ (item1) (item2) (item3) ] Remove the spaces adjacent to brackets to style as such: [(item1) (item2) (item3)] The new style is more compact and easier on the eyes for applications like nested lists. Apply the style on rectangles.in and hello_world.in, as those are the two files developers are most likely to look at when styling new files. Change-Id: Ic6144caf0369754bfb40acff7a5afdb4c6e30725 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68650 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> | 6 年前 | |
Remove spaces adjacent to bracket characters in some PDFs Currently, brackets in most PDFs are styled as such: [ (item1) (item2) (item3) ] Remove the spaces adjacent to brackets to style as such: [(item1) (item2) (item3)] The new style is more compact and easier on the eyes for applications like nested lists. Apply the style on rectangles.in and hello_world.in, as those are the two files developers are most likely to look at when styling new files. Change-Id: Ic6144caf0369754bfb40acff7a5afdb4c6e30725 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68650 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> | 6 年前 | |
Add path objects tests for a PDF saving bug Add FPDFEditPathEmbedderTest cases to demonstrate a PDF saving bug, where a no-op FPDFPageObj_SetMatrix() call causes the saved PDF to have incorrect transformation matrices. These test cases cover path objects and path objects in forms. Bug: pdfium:2132 Change-Id: I81f13fa6a471c4f7184e43f105ff0cc151bfccff Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/117052 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Thomas Sepez <tsepez@google.com> | 2 年前 | |
Add path objects tests for a PDF saving bug Add FPDFEditPathEmbedderTest cases to demonstrate a PDF saving bug, where a no-op FPDFPageObj_SetMatrix() call causes the saved PDF to have incorrect transformation matrices. These test cases cover path objects and path objects in forms. Bug: pdfium:2132 Change-Id: I81f13fa6a471c4f7184e43f105ff0cc151bfccff Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/117052 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Thomas Sepez <tsepez@google.com> | 2 年前 | |
Fix page movement handling in XFA-based PDFs Fixes issues with FPDF_MovePages() when used on XFA-enabled PDFs by adding separate logic for XFA extensions. This ensures consistent page movement behavior between standard and XFA-based documents. The patch refines handling of XFA objects during page move operations to preserve form data and structure. Tests for both page movement and insertion in XFA PDFs have been added and verified. Original patch and code contributions by Stefan Ziegler, with further modifications and testing to ensure stability and backward compatibility. Bug: 433689235 Change-Id: Ifc6ad58d149cfb9ec31d3cdb12dc761ef57493ec Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/134810 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 9 个月前 | |
Fix unbalanced endobj keyword in rectangles_multi_pages.pdf. Also add stream lengths. Change-Id: I7a1f565f941f9100058fab0f1ddde5471318f4d3 Reviewed-on: https://pdfium-review.googlesource.com/38350 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Fix unbalanced endobj keyword in rectangles_multi_pages.pdf. Also add stream lengths. Change-Id: I7a1f565f941f9100058fab0f1ddde5471318f4d3 Reviewed-on: https://pdfium-review.googlesource.com/38350 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Fix a CHECK() failure in ObjectTreeTraverser::GetReferenceEntries() In ObjectTreeTraverser::GetReferenceEntries(), only check a referenced object's object number when there is a valid referenced object. This avoids a CHECK() failure when a malformed PDF references object 0, which is always a free object. Bug: chromium:1443734 Change-Id: I580493aae13c454fcce353673d0c5854bb33fcf7 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/107330 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 3 年前 | |
Fix a CHECK() failure in ObjectTreeTraverser::GetReferenceEntries() In ObjectTreeTraverser::GetReferenceEntries(), only check a referenced object's object number when there is a valid referenced object. This avoids a CHECK() failure when a malformed PDF references object 0, which is always a free object. Bug: chromium:1443734 Change-Id: I580493aae13c454fcce353673d0c5854bb33fcf7 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/107330 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 3 年前 | |
Demonstrate PDF saving bug with a "leaky" CTM Add test cases to show the correct behavior with rectangles.pdf, and the incorrect behavior with rectangles_with_leaky_ctm.pdf. Here, the test cases draws a triangle into the PDF and saves a new copy, but the current PDF saving code does not properly account for the CTM. Along the way, consolidate expected rectangle PDF dimension constants. Bug: pdfium:2142 Change-Id: I7826a25c7310db6c2f880df722d82ef0365248f6 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/117334 Reviewed-by: Thomas Sepez <tsepez@google.com> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 2 年前 | |
Demonstrate PDF saving bug with a "leaky" CTM Add test cases to show the correct behavior with rectangles.pdf, and the incorrect behavior with rectangles_with_leaky_ctm.pdf. Here, the test cases draws a triangle into the PDF and saves a new copy, but the current PDF saving code does not properly account for the CTM. Along the way, consolidate expected rectangle PDF dimension constants. Bug: pdfium:2142 Change-Id: I7826a25c7310db6c2f880df722d82ef0365248f6 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/117334 Reviewed-by: Thomas Sepez <tsepez@google.com> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 2 年前 | |
FPDFAnnot_GetSubtype: recognize the Redact annotation sub-type This is new in PDF 1.7, probably that's why it was missing. Change-Id: If75c0f885ccadc1549085ad30a4c2cd3e8db5ede Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/75730 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 5 年前 | |
FPDFAnnot_GetSubtype: recognize the Redact annotation sub-type This is new in PDF 1.7, probably that's why it was missing. Change-Id: If75c0f885ccadc1549085ad30a4c2cd3e8db5ede Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/75730 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 5 年前 | |
【CVE-2026-9957】【504516117】Use-After-Free write in PDFium Ink2 due to silent free in FPDFPage_InsertObject Signed-off-by: qq_40999241 <lizeqiang4@h-partners.com> | 1 个月前 | |
【CVE-2026-9957】【504516117】Use-After-Free write in PDFium Ink2 due to silent free in FPDFPage_InsertObject Signed-off-by: qq_40999241 <lizeqiang4@h-partners.com> | 1 个月前 | |
Fix the Size trailer entry in hand written PDFs. Change-Id: Ib84cc570c2ffaf9fdd49d32bc12c7e6197e130c1 Reviewed-on: https://pdfium-review.googlesource.com/6850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Fix the Size trailer entry in hand written PDFs. Change-Id: Ib84cc570c2ffaf9fdd49d32bc12c7e6197e130c1 Reviewed-on: https://pdfium-review.googlesource.com/6850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Add experimental FPDFPageObj_GetRotatedBounds() API. This new API allows callers to get a closer bound for rotated objects, compared to FPDFPageObj_GetBounds(). Also fix some existing IWYU issues along the way. Bug: pdfium:1840 Change-Id: Iba5b12b8ca0094682c895e9db70840aaea84f0f0 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/94470 Reviewed-by: Nigi <nigi@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 4 年前 | |
Add experimental FPDFPageObj_GetRotatedBounds() API. This new API allows callers to get a closer bound for rotated objects, compared to FPDFPageObj_GetBounds(). Also fix some existing IWYU issues along the way. Bug: pdfium:1840 Change-Id: Iba5b12b8ca0094682c895e9db70840aaea84f0f0 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/94470 Reviewed-by: Nigi <nigi@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 4 年前 | |
Get the rotation angle of a character. Leveraging the transformation matrix attribute of a character, we can easily find the angle by which it is rotated. The angle is used in a separate change on Chromium. For more information, see https://chromium-review.googlesource.com/c/chromium/src/+/1718989 Bug: chromium:985604 Change-Id: Ifc2e46f0e1eeca8f1e10218f0d1b8ff9fcef3d29 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/58233 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Get the rotation angle of a character. Leveraging the transformation matrix attribute of a character, we can easily find the angle by which it is rotated. The angle is used in a separate change on Chromium. For more information, see https://chromium-review.googlesource.com/c/chromium/src/+/1718989 Bug: chromium:985604 Change-Id: Ifc2e46f0e1eeca8f1e10218f0d1b8ff9fcef3d29 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/58233 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Add tests to show FPDFText_GetLooseCharBox() bug with rotated text Use rotated_text.pdf, where text is rotated by multiples of 45 degrees, and a newly added rotated_text_90.pdf, to show FPDFText_GetLooseCharBox() returns unexpected results compared to FPDFText_GetCharBox(). Bug: 42270642 Change-Id: Ie9b2211e9eaf0b4d18aa6b59b675ca13a24d4238 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/127994 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Thomas Sepez <tsepez@google.com> Commit-Queue: Lei Zhang <thestig@chromium.org> | 1 年前 | |
Add tests to show FPDFText_GetLooseCharBox() bug with rotated text Use rotated_text.pdf, where text is rotated by multiples of 45 degrees, and a newly added rotated_text_90.pdf, to show FPDFText_GetLooseCharBox() returns unexpected results compared to FPDFText_GetCharBox(). Bug: 42270642 Change-Id: Ie9b2211e9eaf0b4d18aa6b59b675ca13a24d4238 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/127994 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Thomas Sepez <tsepez@google.com> Commit-Queue: Lei Zhang <thestig@chromium.org> | 1 年前 | |
Add FPDFSignatureObj_GetSubFilter() API This follows the same pattern as FPDFSignatureObj_GetByteRange(), so the client has to call this function twice, but allocation of the buffer happens outside pdfium. The buffer format is documented to be NUL-terminated ASCII, since the PDF reference gives examples on how the SubFilter should be named, and all of them are ASCII, so probably UTF-8 or UTF-16 would be an overkill here. Change-Id: I3a9b360f219578745ea501cbdfb39a117ca5f2bc Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/71970 Commit-Queue: Miklos V <vmiklos@collabora.co.uk> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 5 年前 | |
Add FPDFSignatureObj_GetSubFilter() API This follows the same pattern as FPDFSignatureObj_GetByteRange(), so the client has to call this function twice, but allocation of the buffer happens outside pdfium. The buffer format is documented to be NUL-terminated ASCII, since the PDF reference gives examples on how the SubFilter should be named, and all of them are ASCII, so probably UTF-8 or UTF-16 would be an overkill here. Change-Id: I3a9b360f219578745ea501cbdfb39a117ca5f2bc Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/71970 Commit-Queue: Miklos V <vmiklos@collabora.co.uk> Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 5 年前 | |
Add FPDFSignatureObj_GetReason() API This follows the same pattern as FPDFSignatureObj_GetSubFilter(), so the client has to call this function twice, but allocation of the buffer happens outside pdfium. The string is user input, so work with UTF-16LE. Change-Id: Ib8359b1f9e04c64d3a2dd082b4a34b2d25268eef Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/72310 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 5 年前 | |
Add FPDFSignatureObj_GetReason() API This follows the same pattern as FPDFSignatureObj_GetSubFilter(), so the client has to call this function twice, but allocation of the buffer happens outside pdfium. The string is user input, so work with UTF-16LE. Change-Id: Ib8359b1f9e04c64d3a2dd082b4a34b2d25268eef Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/72310 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 5 年前 | |
Create FPDF_Thumbnail API and refactor raw stream retrieval FPDF_Thumbnail API contains: - FPDFPage_GetRawThumbnailDataFromPage() - FPDFPage_GetDecodedThumbnailDataFromPage() - FPDFPage_GetThumbnailAsBitmapFromPage() These allow getting the stream data for a thumbnail from a page and also retrieving a thumbnail as a bitmap. Also adds three new commands to pdfium_test: --save-thumbs --save-thumbs-dec --save-thumbs-raw Bug: pdfium:1312 Change-Id: I8363ef52651986fb6bf959b596448f58c3c8b86c Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/55390 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Create FPDF_Thumbnail API and refactor raw stream retrieval FPDF_Thumbnail API contains: - FPDFPage_GetRawThumbnailDataFromPage() - FPDFPage_GetDecodedThumbnailDataFromPage() - FPDFPage_GetThumbnailAsBitmapFromPage() These allow getting the stream data for a thumbnail from a page and also retrieving a thumbnail as a bitmap. Also adds three new commands to pdfium_test: --save-thumbs --save-thumbs-dec --save-thumbs-raw Bug: pdfium:1312 Change-Id: I8363ef52651986fb6bf959b596448f58c3c8b86c Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/55390 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Add a <medium> to simple_xfa.{in,pdf}. Otherwise the PDF has no page dimensions and cannot be rendered. Change-Id: I3a48e28b175aab2803b9697ca94a05fd45f6b8cf Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68472 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 6 年前 | |
Fix a /Parent reference in xfa_pages_8_0.fragment. Then regenerate all the affected PDFs. Change-Id: I54f605a0e5b5a021463fc3a13fcbba51e94a03f3 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/69251 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Support non-standard trailers in fixup_pdf_template.py An existing challenge is checking in PDFs with custom trailers with an accompanying .in file. Add a {{trailersize}} token handle in the script to maintain some automation in the trailer generation. {{trailersize}} will still generate the generic trailer: trailer << /Root 1 0 R /Size N >> With {{trailersize}}, input files can have custom trailers like: trailer << /Info 2 0 R /Prev 3 0 R /Root 4 0 R {{trailersize}} >> At the same time, the developer will not have to worry about counting the number of objects in the PDF. Use {{trailersize}} in testing/resources/ files with non-standard trailers. Bug: pdfium:1495 Change-Id: If86d4ab2069c21d609f3241b5f375bb8d135924d Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/67332 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> | 6 年前 | |
Fill m_ContentStream field in CPDF_PageObject. From the comment of CPDF_PageObject::GetContentStream(): """ Get what content stream the object was parsed from in its page. This number is the index of the content stream in the "Contents" array, or 0 if there is a single content stream. If the object is newly created, -1 is returned. If the object is spread among more than one content stream, this is the index of the last one. """ Bug: pdfium:1051 Change-Id: I9f7804af4f263dda0422e9542e025e3320ff7c31 Reviewed-on: https://pdfium-review.googlesource.com/34250 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 7 年前 | |
Add FPDF_StructElement_GetActualText Get the actual text for a given structure element. Change-Id: If2767b12099a21fbe7c0abcb89c307cb4fe59b02 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/90431 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Add FPDF_StructElement_GetActualText Get the actual text for a given structure element. Change-Id: If2767b12099a21fbe7c0abcb89c307cb4fe59b02 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/90431 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Make FPDF_StructElement_GetTitle() handle UTF-16BE correctly. Modify tagged_alt_text.pdf and its source file to add a title with UTF-16BE encoding. Then enhance FPDFStructTreeEmbedderTest to read out the value. To make the test pass, get the title from its dictionary as Unicode text instead of a ByteString. Also change CPDF_StructElement to stop storing the title, and get the value from the dictionary directly in its GetTitle() method as needed. Along the way, further make the code more consistent by removing checks that assume CPDF_StructElement::GetDict() can return nullptr. BUG=pdfium:1298 Change-Id: I8fc89b88315181dc4770c9cc24b4aa292b54d068 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/54570 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Make FPDF_StructElement_GetTitle() handle UTF-16BE correctly. Modify tagged_alt_text.pdf and its source file to add a title with UTF-16BE encoding. Then enhance FPDFStructTreeEmbedderTest to read out the value. To make the test pass, get the title from its dictionary as Unicode text instead of a ByteString. Also change CPDF_StructElement to stop storing the title, and get the value from the dictionary directly in its GetTitle() method as needed. Along the way, further make the code more consistent by removing checks that assume CPDF_StructElement::GetDict() can return nullptr. BUG=pdfium:1298 Change-Id: I8fc89b88315181dc4770c9cc24b4aa292b54d068 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/54570 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Add new APIs to get marked content id FPDF_StructElement_GetMarkedContentID() provides access to the MCID in a struct element. It assumes /K in a struct element dictionary is a number. This may be a case sometimes, but /K can also be an array with mixed types. See ISO 32000-1:2008, section 14.7.6 for example. Adding FPDF_StructElement_GetMarkedContentIdCount() and FPDF_StructElement_GetMarkedContentIdAtIndex() to address this issue. This change supersedes FPDF_StructElement_GetMarkedContentID(). It provides a mechanism to access MCID at an index while supporting the case where struct element dictionary is a number. After this change, FPDF_StructElement_GetMarkedContentID() becomes redundant and should be deprecated. Change-Id: Icecd39fe3ea788e7f85851c2b7eb89453d083b2f Bug: pdfium:1773 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/90611 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Add new APIs to get marked content id FPDF_StructElement_GetMarkedContentID() provides access to the MCID in a struct element. It assumes /K in a struct element dictionary is a number. This may be a case sometimes, but /K can also be an array with mixed types. See ISO 32000-1:2008, section 14.7.6 for example. Adding FPDF_StructElement_GetMarkedContentIdCount() and FPDF_StructElement_GetMarkedContentIdAtIndex() to address this issue. This change supersedes FPDF_StructElement_GetMarkedContentID(). It provides a mechanism to access MCID at an index while supporting the case where struct element dictionary is a number. After this change, FPDF_StructElement_GetMarkedContentID() becomes redundant and should be deprecated. Change-Id: Icecd39fe3ea788e7f85851c2b7eb89453d083b2f Bug: pdfium:1773 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/90611 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Implement FPDF_StructElement_GetChildMarkedContentID Similarly to FPDF_StructElement_GetChildAtIndex, it retrieves child's content id if the child is a page/stream. Change-Id: I8f4f65e02e01e47b5af0b52968279d910402a376 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/112790 Commit-Queue: Lei Zhang <thestig@chromium.org> Auto-Submit: Dmitry Panteleev <dpantele@google.com> Reviewed-by: Lei Zhang <thestig@chromium.org> | 2 年前 | |
Implement FPDF_StructElement_GetChildMarkedContentID Similarly to FPDF_StructElement_GetChildAtIndex, it retrieves child's content id if the child is a page/stream. Change-Id: I8f4f65e02e01e47b5af0b52968279d910402a376 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/112790 Commit-Queue: Lei Zhang <thestig@chromium.org> Auto-Submit: Dmitry Panteleev <dpantele@google.com> Reviewed-by: Lei Zhang <thestig@chromium.org> | 2 年前 | |
Add a FPDFStructTreeEmbedderTest for MCR and OBJR element types. Provide test coverage and illustrate issues with the existing StructTree code, where they cannot retrieve inline objects. The test PDF is derived from a HTML file with the following content: <body> <a name="top"> <p>hello world</p> <p><a href="#top">link to top</a> </body> The HTML is converted to a tagged PDF using Chromium's headless mode with the following flags, with the assumption that Chromium's tagged PDF generator code works properly: --print-to-pdf --export-tagged-pdf --print-to-pdf-no-header The output PDF from Chromium is then minimized to produce the tagged_mcr_objr.in and tagged_mcr_objr.pdf. Bug: pdfium:672,pdfium:1297 Change-Id: I0ba6e9a9a1bba57acf1ed052d4bec631e67d7677 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68990 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 6 年前 | |
Add a FPDFStructTreeEmbedderTest for MCR and OBJR element types. Provide test coverage and illustrate issues with the existing StructTree code, where they cannot retrieve inline objects. The test PDF is derived from a HTML file with the following content: <body> <a name="top"> <p>hello world</p> <p><a href="#top">link to top</a> </body> The HTML is converted to a tagged PDF using Chromium's headless mode with the following flags, with the assumption that Chromium's tagged PDF generator code works properly: --print-to-pdf --export-tagged-pdf --print-to-pdf-no-header The output PDF from Chromium is then minimized to produce the tagged_mcr_objr.in and tagged_mcr_objr.pdf. Bug: pdfium:672,pdfium:1297 Change-Id: I0ba6e9a9a1bba57acf1ed052d4bec631e67d7677 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/68990 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 6 年前 | |
Add a null check on return value of CPDF_StructTree::AddPageNode(). This CL Adds a null check for |pParentElement| before usage inside AddPageNode(). This ensures that the code handles the scenario when AddPageNode() returns nullptr if depth is greater than kStructTreeMaxRecursion(= 32). This CL also includes a test tagged PDF with deeply nested tags(nested depth > 33). The file is used to validate if struct tree is loaded for this file. Bug: pdfium:1480 Change-Id: I66c561d6708f8d89a0616eb7adef8459ae952662 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/66110 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Mansi Awasthi <maawas@microsoft.com> | 6 年前 | |
Add a null check on return value of CPDF_StructTree::AddPageNode(). This CL Adds a null check for |pParentElement| before usage inside AddPageNode(). This ensures that the code handles the scenario when AddPageNode() returns nullptr if depth is greater than kStructTreeMaxRecursion(= 32). This CL also includes a test tagged PDF with deeply nested tags(nested depth > 33). The file is used to validate if struct tree is loaded for this file. Bug: pdfium:1480 Change-Id: I66c561d6708f8d89a0616eb7adef8459ae952662 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/66110 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Mansi Awasthi <maawas@microsoft.com> | 6 年前 | |
[fpdf_structtree] Support references for attribute list/number PDF software such as Adobe Acrobat Pro sometimes uses references for attribute lists (instead of array or dictionary). Similarly, attributes themselves (e.g. "ColSpan" for a TD or TH cell) sometimes use references as well. Change-Id: I1bd8f56348ba48d84b72179c86db688304660682 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/110850 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Ilaï Deutel <idtl@google.com> | 2 年前 | |
[fpdf_structtree] Support references for attribute list/number PDF software such as Adobe Acrobat Pro sometimes uses references for attribute lists (instead of array or dictionary). Similarly, attributes themselves (e.g. "ColSpan" for a TD or TH cell) sometimes use references as well. Change-Id: I1bd8f56348ba48d84b72179c86db688304660682 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/110850 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Ilaï Deutel <idtl@google.com> | 2 年前 | |
Add an element with an invalid /Type to tagged_table_bad_elem.pdf. Struct elements should either have a proper /Type or no /Type at all. Modify tagged_table_bad_elem.pdf with more /Type variations in its struct elements to demonstrate this. Note that Acrobat Reader will show the bad struct element from this PDF, so no changes are being made to skip the parsing of that element. Change-Id: Ib560a6d9376f4226df6ac0813e6a082a0b0fa4b1 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/90571 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Add an element with an invalid /Type to tagged_table_bad_elem.pdf. Struct elements should either have a proper /Type or no /Type at all. Modify tagged_table_bad_elem.pdf with more /Type variations in its struct elements to demonstrate this. Note that Acrobat Reader will show the bad struct element from this PDF, so no changes are being made to skip the parsing of that element. Change-Id: Ib560a6d9376f4226df6ac0813e6a082a0b0fa4b1 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/90571 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 4 年前 | |
Prevent dangling pointer in CPDF_StructTree::AddPageNode() CPDF_StructTree should only call SetParent() for an element if calling UpdateKidIfElement() on the parent for the element succeeds. Add an embedder test to demonstrate this, using a deliberately bad copy of tagged_table.pdf. Bug: chromium:1443100 Change-Id: Id0164943307258b47afc26b1f358c119e47f7a07 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/107592 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 3 年前 | |
Prevent dangling pointer in CPDF_StructTree::AddPageNode() CPDF_StructTree should only call SetParent() for an element if calling UpdateKidIfElement() on the parent for the element succeeds. Add an embedder test to demonstrate this, using a deliberately bad copy of tagged_table.pdf. Bug: chromium:1443100 Change-Id: Id0164943307258b47afc26b1f358c119e47f7a07 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/107592 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 3 年前 | |
PDF a11y: new API for fill and stroke colors The text fill and stroke colors are now exposed by FPDFText_GetFillColor() and FPDFText_GetStrokeColor(). Each API takes separated parameters for R, G, B and A values. Bug: chromium:985604 Change-Id: Ibb9990eba303b818674f0e61b30f74e779a9f156 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/60110 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
PDF a11y: new API for fill and stroke colors The text fill and stroke colors are now exposed by FPDFText_GetFillColor() and FPDFText_GetStrokeColor(). Each API takes separated parameters for R, G, B and A values. Bug: chromium:985604 Change-Id: Ibb9990eba303b818674f0e61b30f74e779a9f156 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/60110 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Add FPDFText_GetFontName() API This follows the same pattern as DefaultGetFaceName(), so the client has to call this function twice, but allocation of the string buffer happens outside pdfium. Change-Id: I06b7dcd00aca9b9b94799dad3f139617d7f5451e Reviewed-on: https://pdfium-review.googlesource.com/38870 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> | 7 年前 | |
Teach fixup_pdf_template.py to automatically calculate stream length. BUG=pdfium:1008 Change-Id: I5136d57bd401d44b56ac19e5cfb52702afa32200 Reviewed-on: https://pdfium-review.googlesource.com/26651 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> | 8 年前 | |
Fix the Size trailer entry in hand written PDFs. Change-Id: Ib84cc570c2ffaf9fdd49d32bc12c7e6197e130c1 Reviewed-on: https://pdfium-review.googlesource.com/6850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Add FPDFAnnot_GetFontColor API This is similar to FPDFAnnot_GetFontSize() and allows getting the font/text color of an annotation widget. Change-Id: I7ec83a5eef8277073154b14288e271b0fed0ba59 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/120750 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Miklos V <miklos.vajna@collabora.com> Reviewed-by: Thomas Sepez <tsepez@google.com> | 2 年前 | |
Add FPDFAnnot_GetFontColor API This is similar to FPDFAnnot_GetFontSize() and allows getting the font/text color of an annotation widget. Change-Id: I7ec83a5eef8277073154b14288e271b0fed0ba59 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/120750 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Miklos V <miklos.vajna@collabora.com> Reviewed-by: Thomas Sepez <tsepez@google.com> | 2 年前 | |
Test all of the cases of typing into an edit box Previously there were no tests that cover non-XFA multi-line text fields in PDF forms. These tests show some buggy behavior. Specifically: this covers CPWL_Edit::OnCharInternal in the case of just typing not shortcut keys. Additionally: cleaned up variable name style in the test fixture and added ASSERT_NO_FATAL_FAILURE so the ASSERTS in the helper function actually stop test execution. Bug: 446727801 Change-Id: I331ccd61252316d843e1f3215a980a3a8b5904ff Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/136991 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: April Kallmeyer <ask@chromium.org> | 9 个月前 | |
Test all of the cases of typing into an edit box Previously there were no tests that cover non-XFA multi-line text fields in PDF forms. These tests show some buggy behavior. Specifically: this covers CPWL_Edit::OnCharInternal in the case of just typing not shortcut keys. Additionally: cleaned up variable name style in the test fixture and added ASSERT_NO_FATAL_FAILURE so the ASSERTS in the helper function actually stop test execution. Bug: 446727801 Change-Id: I331ccd61252316d843e1f3215a980a3a8b5904ff Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/136991 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: April Kallmeyer <ask@chromium.org> | 9 个月前 | |
Adding password form flag for text fields in fpdf_annot.h This CL adds FPDF_FORMFLAG_TEXT_PASSWORD flag in fpdf_annot.h. This flag can be retrieved for an interactive form annotation using FPDFAnnot_GetFormFieldFlags API. The CL also includes tests to validate if this flag is retrieved correctly for both password and non password text fields. Bug: pdfium:1464 Change-Id: I5d86c6a3b94a8eb68d8b3aedc89f7c8c58e83d49 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/65390 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Adding password form flag for text fields in fpdf_annot.h This CL adds FPDF_FORMFLAG_TEXT_PASSWORD flag in fpdf_annot.h. This flag can be retrieved for an interactive form annotation using FPDFAnnot_GetFormFieldFlags API. The CL also includes tests to validate if this flag is retrieved correctly for both password and non password text fields. Bug: pdfium:1464 Change-Id: I5d86c6a3b94a8eb68d8b3aedc89f7c8c58e83d49 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/65390 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 6 年前 | |
GetFontSize for Variable Text Annotations. Part of feature work to make Pdfium more usable by mobile platforms that wish to render comboboxes and textfields using custom displays. Will return Tf font size for the annotation if applicable. This is obtained from CPDFSDK_Widget because it is not guaranteed to be set on CPDF_FormField which only sets font information if DR entry is present. R=thestig@chromium.org Bug: b/130297350 Change-Id: Iba866bb47cad78e2aa16343ae8d055887714e6f6 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/53051 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Ryan Smith <rycsmith@google.com> | 7 年前 | |
GetFontSize for Variable Text Annotations. Part of feature work to make Pdfium more usable by mobile platforms that wish to render comboboxes and textfields using custom displays. Will return Tf font size for the annotation if applicable. This is obtained from CPDFSDK_Widget because it is not guaranteed to be set on CPDF_FormField which only sets font information if DR entry is present. R=thestig@chromium.org Bug: b/130297350 Change-Id: Iba866bb47cad78e2aa16343ae8d055887714e6f6 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/53051 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Ryan Smith <rycsmith@google.com> | 7 年前 | |
Support non-standard trailers in fixup_pdf_template.py An existing challenge is checking in PDFs with custom trailers with an accompanying .in file. Add a {{trailersize}} token handle in the script to maintain some automation in the trailer generation. {{trailersize}} will still generate the generic trailer: trailer << /Root 1 0 R /Size N >> With {{trailersize}}, input files can have custom trailers like: trailer << /Info 2 0 R /Prev 3 0 R /Root 4 0 R {{trailersize}} >> At the same time, the developer will not have to worry about counting the number of objects in the PDF. Use {{trailersize}} in testing/resources/ files with non-standard trailers. Bug: pdfium:1495 Change-Id: If86d4ab2069c21d609f3241b5f375bb8d135924d Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/67332 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> | 6 年前 | |
Create FPDFPageObjMark_GetParamStringValue(). Bug: pdfium:1037 Change-Id: I05f992d2a4ee5a11b5c57ec51107c4b00011809c Reviewed-on: https://pdfium-review.googlesource.com/31190 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> | 8 年前 | |
Support non-standard trailers in fixup_pdf_template.py An existing challenge is checking in PDFs with custom trailers with an accompanying .in file. Add a {{trailersize}} token handle in the script to maintain some automation in the trailer generation. {{trailersize}} will still generate the generic trailer: trailer << /Root 1 0 R /Size N >> With {{trailersize}}, input files can have custom trailers like: trailer << /Info 2 0 R /Prev 3 0 R /Root 4 0 R {{trailersize}} >> At the same time, the developer will not have to worry about counting the number of objects in the PDF. Use {{trailersize}} in testing/resources/ files with non-standard trailers. Bug: pdfium:1495 Change-Id: If86d4ab2069c21d609f3241b5f375bb8d135924d Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/67332 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> | 6 年前 | |
Add test for reading marked content with an indirect dict. Bug: pdfium:1118 Change-Id: I2e9adaae64cba5b3915c19f3c99743cddbe58736 Reviewed-on: https://pdfium-review.googlesource.com/37371 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> | 7 年前 | |
Add FPDFText_GetTextRenderMode() API This allows deciding if FPDFPageObj_GetFillColor() or FPDFPageObj_GetStrokeColor() should be used to get the effective color of a text object. Change-Id: Ic6e99a9eb8512b164756da8b5fcd8cd7771271ae Reviewed-on: https://pdfium-review.googlesource.com/36750 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org> | 7 年前 | |
Create FPDF_Thumbnail API and refactor raw stream retrieval FPDF_Thumbnail API contains: - FPDFPage_GetRawThumbnailDataFromPage() - FPDFPage_GetDecodedThumbnailDataFromPage() - FPDFPage_GetThumbnailAsBitmapFromPage() These allow getting the stream data for a thumbnail from a page and also retrieving a thumbnail as a bitmap. Also adds three new commands to pdfium_test: --save-thumbs --save-thumbs-dec --save-thumbs-raw Bug: pdfium:1312 Change-Id: I8363ef52651986fb6bf959b596448f58c3c8b86c Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/55390 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Create FPDF_Thumbnail API and refactor raw stream retrieval FPDF_Thumbnail API contains: - FPDFPage_GetRawThumbnailDataFromPage() - FPDFPage_GetDecodedThumbnailDataFromPage() - FPDFPage_GetThumbnailAsBitmapFromPage() These allow getting the stream data for a thumbnail from a page and also retrieving a thumbnail as a bitmap. Also adds three new commands to pdfium_test: --save-thumbs --save-thumbs-dec --save-thumbs-raw Bug: pdfium:1312 Change-Id: I8363ef52651986fb6bf959b596448f58c3c8b86c Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/55390 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Add a test PDF with a filter-less thumbnail image. Add a test PDF where the thumbnail image has no filters. Since the content stream has a raw bitmap, deliberately make it: a) Use only ASCII characters, so fixup_pdf_template.py does not mangle it. b) One long line, as CR/LF characters will be interpreted as pixel data. The image is red on the top half and blue on the bottom half. It will be used in https://pdfium-review.googlesource.com/55390 Bug: pdfium:1312 TBR=tsepez@chromium.org Change-Id: I8336aa677f18c3a1fca501ac5ea2f60b4ecd38eb Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/56930 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Add a test PDF with a filter-less thumbnail image. Add a test PDF where the thumbnail image has no filters. Since the content stream has a raw bitmap, deliberately make it: a) Use only ASCII characters, so fixup_pdf_template.py does not mangle it. b) One long line, as CR/LF characters will be interpreted as pixel data. The image is red on the top half and blue on the bottom half. It will be used in https://pdfium-review.googlesource.com/55390 Bug: pdfium:1312 TBR=tsepez@chromium.org Change-Id: I8336aa677f18c3a1fca501ac5ea2f60b4ecd38eb Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/56930 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Merge to XFA: Fix null crash in CheckTrailer. This includes: fa370ac Fix test naming in previous commit. e0bbe4a Fix null crash in CheckTrailer. TBR=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/870173002 | 11 年前 | |
Merge to XFA: Fix segv in CPDF_DataAvail::CheckRoot() Original Review URL: https://codereview.chromium.org/895933003 BUG=454695 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/901013003 | 11 年前 | |
FPDF_GetTrailerEnds: make this not depend on whitespace PDF-1.7 calls out no bytes other than whitespace when specifying what can occur between endstream and endobj, so whitespace needs to be handled. When CPDF_SyntaxParser::ReadStream() reads the stream, it reads 'endobj', and then resets the position back to the end of 'endstream'. This mechanism is disabled in case there is whitespace between the tokens and the newline, see the end of the function. This results in reporting no trailer ends, as the parsing fails, as the next token is expected to be 'endobj', but it's the ID of the next object instead. Fix the problem by handling whitespace in CPDF_SyntaxParser::ReadStream() where it was looking for \ntoken\n, not allowing whitespace between the token and the following newline. Change-Id: I7048e8d081af04af3dd08d957212c885b7982b5e Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/76850 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 5 年前 | |
FPDF_GetTrailerEnds: make this not depend on whitespace PDF-1.7 calls out no bytes other than whitespace when specifying what can occur between endstream and endobj, so whitespace needs to be handled. When CPDF_SyntaxParser::ReadStream() reads the stream, it reads 'endobj', and then resets the position back to the end of 'endstream'. This mechanism is disabled in case there is whitespace between the tokens and the newline, see the end of the function. This results in reporting no trailer ends, as the parsing fails, as the next token is expected to be 'endobj', but it's the ID of the next object instead. Fix the problem by handling whitespace in CPDF_SyntaxParser::ReadStream() where it was looking for \ntoken\n, not allowing whitespace between the token and the following newline. Change-Id: I7048e8d081af04af3dd08d957212c885b7982b5e Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/76850 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 5 年前 | |
Merge to XFA: Fix null crash in CheckTrailer. This includes: fa370ac Fix test naming in previous commit. e0bbe4a Fix null crash in CheckTrailer. TBR=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/870173002 | 11 年前 | |
Merge to XFA: Fix segv in CPDF_DataAvail::CheckRoot() Original Review URL: https://codereview.chromium.org/895933003 BUG=454695 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/901013003 | 11 年前 | |
Add FPDF_GetSignatureCount() API This is the first step towards exposing enough information about digital signatures so that client code (not pdfium itself) can evaluate if they are valid or not. Change-Id: I9b913521bd700bfadd8ca02f5c6fe49f7b63e31e Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/70830 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 5 年前 | |
Add FPDF_GetSignatureCount() API This is the first step towards exposing enough information about digital signatures so that client code (not pdfium itself) can evaluate if they are valid or not. Change-Id: I9b913521bd700bfadd8ca02f5c6fe49f7b63e31e Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/70830 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 5 年前 | |
Fix the Size trailer entry in hand written PDFs. Change-Id: Ib84cc570c2ffaf9fdd49d32bc12c7e6197e130c1 Reviewed-on: https://pdfium-review.googlesource.com/6850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Fix the Size trailer entry in hand written PDFs. Change-Id: Ib84cc570c2ffaf9fdd49d32bc12c7e6197e130c1 Reviewed-on: https://pdfium-review.googlesource.com/6850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Create embeddertests for other kinds of actions. Change-Id: Ia4619be65e2ab8ee4bf19ba9608c1cc94594ba89 Reviewed-on: https://pdfium-review.googlesource.com/c/43812 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Create embeddertests for other kinds of actions. Change-Id: Ia4619be65e2ab8ee4bf19ba9608c1cc94594ba89 Reviewed-on: https://pdfium-review.googlesource.com/c/43812 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Add a test case to demonstate an issue with FPDFAction_GetURIPath(). The FPDFAction_GetFilePath() documentation claims the return value is 7-bit ASCII, but this test case shows that is not always true. Bug: chromium:1323491 Change-Id: I934618bd111b9ccb566ac1e395175548211670a0 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/94531 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 4 年前 | |
Add a test case to demonstate an issue with FPDFAction_GetURIPath(). The FPDFAction_GetFilePath() documentation claims the return value is 7-bit ASCII, but this test case shows that is not always true. Bug: chromium:1323491 Change-Id: I934618bd111b9ccb566ac1e395175548211670a0 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/94531 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 4 年前 | |
Fix the Size trailer entry in hand written PDFs. Change-Id: Ib84cc570c2ffaf9fdd49d32bc12c7e6197e130c1 Reviewed-on: https://pdfium-review.googlesource.com/6850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Fix the Size trailer entry in hand written PDFs. Change-Id: Ib84cc570c2ffaf9fdd49d32bc12c7e6197e130c1 Reviewed-on: https://pdfium-review.googlesource.com/6850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Add support for UTF-8 text strings https://pdfa.org/understanding-utf-8-in-pdf-2-0/ has a good overview of this, so I don't need to write it up. The post also has a screenshot of Chromium's PDF viewer not supporting UTF-8 text strings. This patch rectifies that :) Fixed: pdfium:2101 Change-Id: Idabe8fe523c13c6879f83413806690490d3242c9 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/113830 Reviewed-by: Lei Zhang <thestig@chromium.org> Auto-Submit: Nico Weber <thakis@chromium.org> Commit-Queue: Nico Weber <thakis@chromium.org> | 2 年前 | |
Add support for UTF-8 text strings https://pdfa.org/understanding-utf-8-in-pdf-2-0/ has a good overview of this, so I don't need to write it up. The post also has a screenshot of Chromium's PDF viewer not supporting UTF-8 text strings. This patch rectifies that :) Fixed: pdfium:2101 Change-Id: Idabe8fe523c13c6879f83413806690490d3242c9 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/113830 Reviewed-by: Lei Zhang <thestig@chromium.org> Auto-Submit: Nico Weber <thakis@chromium.org> Commit-Queue: Nico Weber <thakis@chromium.org> | 2 年前 | |
Implement PDF version handling from catalog dictionary Add support for reading PDF version from the Version entry in the catalog dictionary. The catalog version takes precedence over the file header version. Bug: 409579362 Change-Id: I581e01a2ce79fd68126696a6ccbe45046f767bb4 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/130850 Auto-Submit: Helmut Januschka <helmut@januschka.com> Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> | 1 年前 | |
Implement PDF version handling from catalog dictionary Add support for reading PDF version from the Version entry in the catalog dictionary. The catalog version takes precedence over the file header version. Bug: 409579362 Change-Id: I581e01a2ce79fd68126696a6ccbe45046f767bb4 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/130850 Auto-Submit: Helmut Januschka <helmut@januschka.com> Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> | 1 年前 | |
New API to retrieve a character's loose bounds This change adds a new API FPDFText_GetLooseCharBox that retrieves the "loose" bounds of a character. I.e., the returned bounds will cover the entire possible extent of the character (given its width). The height of the box will always be the same as the font size. The width will equal the entire "advance" of the character. Compare with FPDFText_GetCharBox, which returns a "tight" box around the actual curves that make up the glyph. This API will be used to make the PDF a11y line-breaking heuristics more reliable, so that, e.g., lines are treated the same way (mathematically) even if they don't have any ascenders or descenders. Change-Id: I2860f12865b6c81e90cb2621fd8adac1ab5f2530 Bug: chromium:985604 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/59971 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
New API to retrieve a character's loose bounds This change adds a new API FPDFText_GetLooseCharBox that retrieves the "loose" bounds of a character. I.e., the returned bounds will cover the entire possible extent of the character (given its width). The height of the box will always be the same as the font size. The width will equal the entire "advance" of the character. Compare with FPDFText_GetCharBox, which returns a "tight" box around the actual curves that make up the glyph. This API will be used to make the PDF a11y line-breaking heuristics more reliable, so that, e.g., lines are treated the same way (mathematically) even if they don't have any ascenders or descenders. Change-Id: I2860f12865b6c81e90cb2621fd8adac1ab5f2530 Bug: chromium:985604 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/59971 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Restrict the object types that FPDF_CopyViewerPreferences() copies. Prevent FPDF_CopyViewerPreferences() from copying bad data. In the malformed PDF in the bug, the /ViewerPreferences pointed to the catalog, so FPDF_CopyViewerPreferences() tried to copy the entire (large) PDF without using references. Bug: chromium:1404202 Change-Id: Ife065c8bbeafee808d5402dba9dfb07bd4bcd269 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/103131 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 3 年前 | |
Restrict the object types that FPDF_CopyViewerPreferences() copies. Prevent FPDF_CopyViewerPreferences() from copying bad data. In the malformed PDF in the bug, the /ViewerPreferences pointed to the catalog, so FPDF_CopyViewerPreferences() tried to copy the entire (large) PDF without using references. Bug: chromium:1404202 Change-Id: Ife065c8bbeafee808d5402dba9dfb07bd4bcd269 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/103131 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 3 年前 | |
Fix the Size trailer entry in hand written PDFs. Change-Id: Ib84cc570c2ffaf9fdd49d32bc12c7e6197e130c1 Reviewed-on: https://pdfium-review.googlesource.com/6850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Add some basic tests for FPDF_VIEWERREF_GetPrintPageRange(). Hand edit viewer_ref.pdf to have a page range and more pages. Fix an invalid stream length in the file as well. Fix tests that depended on viewer_ref.pdf having only 1 page. Change-Id: I95d5cbf1f592d1c51f11d9ab5b26abf2f23ed598 Reviewed-on: https://pdfium-review.googlesource.com/32172 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 8 年前 | |
Fix the Size trailer entry in hand written PDFs. Change-Id: Ib84cc570c2ffaf9fdd49d32bc12c7e6197e130c1 Reviewed-on: https://pdfium-review.googlesource.com/6850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Fix the Size trailer entry in hand written PDFs. Change-Id: Ib84cc570c2ffaf9fdd49d32bc12c7e6197e130c1 Reviewed-on: https://pdfium-review.googlesource.com/6850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Fix the Size trailer entry in hand written PDFs. Change-Id: Ib84cc570c2ffaf9fdd49d32bc12c7e6197e130c1 Reviewed-on: https://pdfium-review.googlesource.com/6850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Fix the Size trailer entry in hand written PDFs. Change-Id: Ib84cc570c2ffaf9fdd49d32bc12c7e6197e130c1 Reviewed-on: https://pdfium-review.googlesource.com/6850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Fix error in testing/resources/xfa_catalog_1_0.fragment. In the catalog, /Pages should refer to an indirect object, not an array of objects. Regenerate PDFs as needed, and fix errors in the templates. Change-Id: I9930ef3ba697fddda6ea18b7df72b6c256d59874 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/51352 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Process XFA config by inclusion in place of hard coded strings Change-Id: I3dac79c12a5a482ab69420b68d7383efba646d81 Reviewed-on: https://pdfium-review.googlesource.com/c/45475 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Process XFA config by inclusion in place of hard coded strings Change-Id: I3dac79c12a5a482ab69420b68d7383efba646d81 Reviewed-on: https://pdfium-review.googlesource.com/c/45475 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Process XFA locale by inclusion rather than hard-coded string. Change-Id: Id55dbb8857ee770b67e9d0a9d5f983e4230e91af Reviewed-on: https://pdfium-review.googlesource.com/c/45474 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Process XFA locale by inclusion rather than hard-coded string. Change-Id: Id55dbb8857ee770b67e9d0a9d5f983e4230e91af Reviewed-on: https://pdfium-review.googlesource.com/c/45474 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> | 7 年前 | |
Process XFA preamble by inclusion rather than hard-coded strings Change-Id: I44d58ce553712face3377ae24d93576a29954c4c Reviewed-on: https://pdfium-review.googlesource.com/c/45490 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Fix a crash in DataMerge_UpdateBindingRelations(). CXFA_Document::DataMerge_UpdateBindingRelations() expects a valid node argument. Check all the callers and add checks to those that do not have them. For testing, add an alternative to xfa_object_2_0.fragment that makes it easier to write all the XML in a single object. BUG=pdfium:1258 Change-Id: I7182bcb5e714af812d97d2e6534c9b2a4e8b53b4 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/51775 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Fix a /Parent reference in xfa_pages_8_0.fragment. Then regenerate all the affected PDFs. Change-Id: I54f605a0e5b5a021463fc3a13fcbba51e94a03f3 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/69251 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> | 6 年前 | |
Process XFA preamble by inclusion rather than hard-coded strings Change-Id: I44d58ce553712face3377ae24d93576a29954c4c Reviewed-on: https://pdfium-review.googlesource.com/c/45490 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Process XFA preamble by inclusion rather than hard-coded strings Change-Id: I44d58ce553712face3377ae24d93576a29954c4c Reviewed-on: https://pdfium-review.googlesource.com/c/45490 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Process XFA preamble by inclusion rather than hard-coded strings Change-Id: I44d58ce553712face3377ae24d93576a29954c4c Reviewed-on: https://pdfium-review.googlesource.com/c/45490 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Process XFA preamble by inclusion rather than hard-coded strings Change-Id: I44d58ce553712face3377ae24d93576a29954c4c Reviewed-on: https://pdfium-review.googlesource.com/c/45490 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> | 7 年前 | |
Fix the Size trailer entry in hand written PDFs. Change-Id: Ib84cc570c2ffaf9fdd49d32bc12c7e6197e130c1 Reviewed-on: https://pdfium-review.googlesource.com/6850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 | |
Fix the Size trailer entry in hand written PDFs. Change-Id: Ib84cc570c2ffaf9fdd49d32bc12c7e6197e130c1 Reviewed-on: https://pdfium-review.googlesource.com/6850 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> | 8 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 6 年前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 7 个月前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 11 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 8 年前 | ||
| 7 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 9 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 5 年前 | ||
| 11 年前 | ||
| 11 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 7 年前 | ||
| 6 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 7 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 10 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 7 年前 | ||
| 6 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 10 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 11 个月前 | ||
| 11 个月前 | ||
| 11 年前 | ||
| 11 年前 | ||
| 11 年前 | ||
| 11 年前 | ||
| 11 年前 | ||
| 11 年前 | ||
| 11 年前 | ||
| 10 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 10 年前 | ||
| 9 年前 | ||
| 9 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 7 年前 | ||
| 10 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 9 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 9 年前 | ||
| 9 年前 | ||
| 9 年前 | ||
| 9 年前 | ||
| 9 年前 | ||
| 9 年前 | ||
| 9 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 9 年前 | ||
| 9 年前 | ||
| 9 年前 | ||
| 9 年前 | ||
| 9 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 9 年前 | ||
| 9 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 8 年前 | ||
| 9 年前 | ||
| 9 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 8 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 10 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 11 个月前 | ||
| 11 个月前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 8 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 8 年前 | ||
| 7 年前 | ||
| 9 年前 | ||
| 7 年前 | ||
| 6 年前 | ||
| 7 年前 | ||
| 6 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 10 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 5 年前 | ||
| 6 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 9 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 9 个月前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 7 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 7 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 6 年前 | ||
| 8 年前 | ||
| 6 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 11 年前 | ||
| 11 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 11 年前 | ||
| 11 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 6 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 7 年前 | ||
| 8 年前 | ||
| 8 年前 |