Age | Commit message (Collapse) | Author |
|
The xfa/fde/css code has no other links into xfa/. This CL moves the css
code to core/fxcrt/css and sets to only build when pdf_enable_xfa is
enabled.
Change-Id: Iefd208e1f83a28b80b567c574e841e87bce310be
Reviewed-on: https://pdfium-review.googlesource.com/9251
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Run from the pdfium root:
$ testing/tools/safetynet_compare.py testing
This compares the current branch with and without local changes.
$ testing/tools/safetynet_compare.py testing/corpus --branch-before x
This compares the current branch + local changes against branch x.
It runs only the corpus tests.
$ testing/tools/safetynet_compare.py testing --branch-before x
--branch-after y --build-dir=~/output_compare
This compares branch x and branch y. x and y can be revision hashes.
The callgrind.out files of cases with significant changes will be
created in ~/output_compare.
$ testing/tools/safetynet_compare.py -h
Print all options.
Change-Id: I43aaf5fe890745db611fb3bc00a656ef799fdfef
Reviewed-on: https://pdfium-review.googlesource.com/7390
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
1. Added --save-images flag in pdfium_test to save embedded images using
FPDFImageObj_GetBitmap() API and the bitmap-to-png conversion tool.
* Added support for bitmaps of other common color spaces in the
bitmap-to-png conversion tool.
Bug=pdfium:677
Change-Id: Ide29f51021695af0a1afb5205355f4b78b918d35
Reviewed-on: https://pdfium-review.googlesource.com/9710
Commit-Queue: Jane Liu <janeliulwq@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Added FPDFImageObj_GetBitmap() that returns the bitmap of an image
object, and a FPDFBitmap_GetFormat() that returns the format of a
bitmap.
* Fixed a small bitmap conversion bug in cfx_dibsource.cpp.
* Enabled EmbedderTest::CompareBitmap() to support different formats
of bitmaps.
* Added an embedder test and a test PDF file with images of many
different formats.
Bug=pdfium:677
Change-Id: I6a72f9d969cf5f3577db9400ca33197c213622ed
Reviewed-on: https://pdfium-review.googlesource.com/9690
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
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>
|
|
This method replaces the selected text in a user-editable form text
area with another text string (which can be empty or non-empty). If
there is no selected text, FORM_ReplaceSelection() will append the
replacement text after the current caret position.
BUG=chromium:59266
Change-Id: I76448ef757d107888c33ebd5656457ebac93b952
Reviewed-on: https://pdfium-review.googlesource.com/8812
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Diana Gage <drgage@google.com>
|
|
This CL fixes FPDF_RenderPageBitmapWithMatrix and improves tests.
Bug: pdfium:837
Change-Id: I98f90b667cc9a50fb0e915b8a758603488b44d40
Reviewed-on: https://pdfium-review.googlesource.com/9010
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Run test XFA-Only, since that's where the issue occurs, and the
textual output is different for non-xfa. Fix a few lifetime issue
in pdfium_test.cc unearthed by this test (doc must outlive pages
now held in formfill info).
Bug: 735912
Change-Id: Icc9e6a967c32ece67d897117896c973bb16a1515
Reviewed-on: https://pdfium-review.googlesource.com/8510
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
- Move several blocks out of RenderPdf().
- Add an anonymous namespace.
- Check fwrite() results.
- Fix nits.
Change-Id: Ief0ddd5e49455d68b92d40674294dc9134adf86c
Reviewed-on: https://pdfium-review.googlesource.com/8650
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Jane Liu <janeliulwq@google.com>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I35423437015ad9057ed862ab630c9a2f403a8e1f
Reviewed-on: https://pdfium-review.googlesource.com/8710
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This is a script that measures the performance of pdfium when loading
and rendering a single pdf file. Supported profilers for now are
callgrind (default) and perfstat.
It will be used by the compare script, which will compare measurements
this script takes.
Change-Id: I9c78ec879a7f4839e60f217d5dd8ee35b1e9a051
Reviewed-on: https://pdfium-review.googlesource.com/7354
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Given an interactive form annotation, this method returns its annotation
flags. The flags returned are dependent upon the "Ff" field, and are
specific to interactive form annotations, such as
FPDF_FORMFLAG_MULTILINE, FPDF_FORMFLAG_COMBO, FPDF_FORMFLAG_EDIT, and
others.
To test this method more thoroughly, text_form_multiple.pdf has been
added, which is similar to text_form.pdf, but includes a read-only text
field.
BUG=chromium:59266
Change-Id: Ie66046de273f69a1be6f04a433351ebaa271f60c
Reviewed-on: https://pdfium-review.googlesource.com/7851
Commit-Queue: Diana Gage <drgage@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Since there is no guarantee of termination if the StringC was
extracted from a snippet of another string. Make it more obvious
that things like
strlen(str.unterminated_c_str())
might be a bad idea.
Change-Id: I7832248ed89ebbddf5c0bcd402aac7d40ec2adc2
Reviewed-on: https://pdfium-review.googlesource.com/8170
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
1. Added --save-attachments flag in pdfium_test to save embedded
attachments using fpdf_attachment APIs.
Bug=pdfium:174
Change-Id: I62f09aeb0ab1431f6e127da389518878a7214423
Reviewed-on: https://pdfium-review.googlesource.com/7990
Commit-Queue: Jane Liu <janeliulwq@google.com>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
When Chrome renders PDF pages it uses the progressive renderer. The one
shot renderer is used to render print preview pages. This CL changes
pdfium_test to use the progressive renderer by default to better match
Chrome. This also adds a --render-oneshot flag which will use the
non-progressive renderer.
Bug: chromium:736695
Change-Id: If79333ae10a0ed1c9bce1290caad8d531e6709aa
Reviewed-on: https://pdfium-review.googlesource.com/8130
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Re-work the previous fix to be even more particular
about the input.
Bug: chromium:740166
Change-Id: I6bea3b6a6dd320a83f830b07afd52951be7d1b63
Reviewed-on: https://pdfium-review.googlesource.com/7691
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL allows TestSaved to open password-protected and linearized
documents properly. It also adds a test with one such document.
BUG= pdfium:787
Change-Id: Ie0da7f290711505fb208794afdc737c36e84dd3c
Reviewed-on: https://pdfium-review.googlesource.com/7034
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL fixes and invalid WRITE triggered by calling util.printf. We need to
verify that the integer format will be less then 260 characters.
Bug: chromium:740166
Change-Id: I1c9047101780582da5f39088568727e2c8b4c2d2
Reviewed-on: https://pdfium-review.googlesource.com/7630
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
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>
|
|
This CL switches void* to CLcmsCmm*, simplifies the ownership and
destruction of CLcmsCmm, and reduces unnecessary function calling in
fx_codec_icc.cpp.
Change-Id: Ifdbf59dcdaede497d1684b161dd066726cf08ee3
Reviewed-on: https://pdfium-review.googlesource.com/7590
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Bug: chromium:738919
Change-Id: I2ea99a47f45e2e68650bd1fa9ad7554d8df79874
Reviewed-on: https://pdfium-review.googlesource.com/7351
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
These tests pass under normal PDFium bug fail when Skia Paths is
enabled.
Bug: chromium:736695
Change-Id: I7e3e789ae25857060dd45940c313f5383c548d2c
Reviewed-on: https://pdfium-review.googlesource.com/7450
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Cary Clark <caryclark@google.com>
|
|
This CL adds helper methods for EmbedderTest to save. This means that
TestSaver is no longer needed and all the methods it uses are moved to
the EmbedderTest.
Change-Id: I740f29699bfd8c6b570cb1fd85e7aab9bc1d3f6f
Reviewed-on: https://pdfium-review.googlesource.com/7171
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
For the external buffer use case, use a CFDE_CSSExtTextBuf instead. With
the split, both text buffer implementations are simpler now. As a
result, it becomes obvious where it never fails. Adjust callers
accordingly.
Change-Id: I7b53d36593172487b8c939e6a55af2437ea4ee5a
Reviewed-on: https://pdfium-review.googlesource.com/6932
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
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>
|
|
Remove handling of arbitrary function calls, and only allow supported
function calls. Issues with the lexer being overly permissive led to
large blobs of javascript being dropped into the output. Specifically
driver code was assuming that anything marked as a function would just
be an identifier that could be inserted into the javascript, but the
lexer marks things like ()()() as a function, which would lead to the
following JS being inserted as an identifier.
This change is intended to be a patch for the specific issue that was
being seen from the fuzzer test, and further work will be needed to
make the lexer more strict.
BUG=724913
TEST=Ran fuzzer test case. Ran unittests,embeddertests,corpustests.
Change-Id: Ib7d9239bf6fece853bea0f4915ee4ad72d3cd290
Reviewed-on: https://pdfium-review.googlesource.com/7032
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
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>
|
|
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>
|
|
Change-Id: I957199b63f6049a586b8de2688501f5ae3449964
Reviewed-on: https://pdfium-review.googlesource.com/7038
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
It was not matching file names with characters like '-' and '&'.
Also suppressed tests that are now matched by the regex and were not
run.
Change-Id: I70c0c8bebf4726748574a9e3ab17db64f1033a13
Reviewed-on: https://pdfium-review.googlesource.com/6835
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ief7bd0f2d0f4edbcb7331b0e78c01b86a9dc0621
Reviewed-on: https://pdfium-review.googlesource.com/7031
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Also showing stats on number of failures, successes, suppressions,
etc.
Change-Id: Id12faf504ea8d6b1c343d7a8b412d03dc787ca3a
Reviewed-on: https://pdfium-review.googlesource.com/6834
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
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>
|
|
This CL adds a presubmit check for png files so that they are in the form
_expected{,_mac,_win}.pdf.BLA.png and updates the corpus test repository hash.
Change-Id: I5397a091b77a339eba7d370b291b7a6e61754744
Reviewed-on: https://pdfium-review.googlesource.com/6951
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Change-Id: I23fe37139ed06a7e09f6a39ea833a6a984add49e
Reviewed-on: https://pdfium-review.googlesource.com/6913
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This is unused except for being a pathway for indirect deps.
Change-Id: I717290235ccbc59429ad24231033382958e2a086
Reviewed-on: https://pdfium-review.googlesource.com/6910
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug: pdfium:781
Change-Id: I51c5ed9e582376f11f75f7512f36c33720e71bac
Reviewed-on: https://pdfium-review.googlesource.com/6890
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
It is not actually a sample program to demonstrate how to use PDFium
APIs. It is more of a test utility program.
Remove header include dependency from samples/ to core/, to set a good
example.
Change-Id: Idd5d567c82314bcf0e4a7bec8a3210e7d57226ee
Reviewed-on: https://pdfium-review.googlesource.com/6871
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Since cpdfsdk_widget.cpp already generates it, we can expect that
FPDF_GenerateAP will not be called. That implementation does not
work with widgets with a shared field.
Bug: chromium:733528
Change-Id: Ia436b4e8bc87ca86b67a02cf7301ac2328339128
Reviewed-on: https://pdfium-review.googlesource.com/6752
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: Id558c36d10501ce488717045bbf00bfed32e4b92
Reviewed-on: https://pdfium-review.googlesource.com/6870
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
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>
|
|
At least one nonnull entry needs to be in OCGs for it to be considered
present. See "OCGs" in table 4.49 in the PDF 1.7 spec.
Bug: pdfium:491.
Change-Id: I7eae65ba1fabff9cf1d5cea50d059a04814a3fec
Reviewed-on: https://pdfium-review.googlesource.com/6751
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The test should be reenabled by this change. Also updated the
expected .png, as it's slightly displaced since it was run a year ago.
Change-Id: I2e7003f8b353212804d3fd7af08c41476351f575
Reviewed-on: https://pdfium-review.googlesource.com/6813
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
There are three comboboxes:
1) Normal combobox with pre-selected value.
2) User editable combobox.
3) Read-only combobox, which is actually invisible.
Change-Id: I6bc7955459a11bf043ace7002393c2d7ee8471e9
Reviewed-on: https://pdfium-review.googlesource.com/6770
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Currently, in embedder tests, pages can only be rendered with no flags
specified. With the addition of annotation APIs and corresponding
embedder tests, it is helpful to add a test method to allow flags to be
passed in when rendering pages in embedder tests.
This CL adds such a method.
Bug=pdfium:737
Change-Id: I277831cb2e228154e9a65b078a241b8e61220664
Reviewed-on: https://pdfium-review.googlesource.com/6711
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
Change-Id: I1b31217c756620873f59527768464aec02a82900
Reviewed-on: https://pdfium-review.googlesource.com/6677
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=chromium:733245
Change-Id: Ic9347e2cc245831c0b71fac1d531c33c5646ab3f
Reviewed-on: https://pdfium-review.googlesource.com/6671
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
It's possible to create a stream of length 0 in a PDF document.
Currently the code will early exit and return a nullptr. This causes
issues when you want to print the given PDF as the FPDF_ImportPages code
ends up only generating up to the zero length object.
This CL allows creating streams with length 0 and updates the PDF saving
code to output a blank stream.
Bug: chromium:732380
Change-Id: I44182ba4aaac7c51284b002ba01bbc34b6bcf9e0
Reviewed-on: https://pdfium-review.googlesource.com/6490
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL adds tests for the date parsing and formatting code in
CFGAS_FormatString.
Change-Id: I9989cdd1b3f92c90d46ee2c3f7838fe1de255be2
Reviewed-on: https://pdfium-review.googlesource.com/6178
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
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>
|