Age | Commit message (Collapse) | Author |
|
Fixed a couple of nits:
- Renaming variables with correct format.
- Add comments regarding the fact that pages are 0-based.
Review-Url: https://codereview.chromium.org/2499143003
|
|
The --pages option is set up to be 0-indexed.
--pages=<number> will render the specific page.
--pages=<number>-<number> will render the range of pages given.
Review-Url: https://codereview.chromium.org/2495333002
|
|
Review-Url: https://codereview.chromium.org/2415663003
|
|
This CL updates CPDFXFA_Document so it never owns the CPDFSDK_Document. The
CPDFSDK_Document is now always owned by the CPDFXFA_Environment. This also
cleans up the strange need to reverse the order of document and form destruction
when using XFA.
Review-Url: https://codereview.chromium.org/2397473006
|
|
Review-Url: https://codereview.chromium.org/2375263002
|
|
This CL aims to follow up on thestig's past-land feedback
receveid on https://codereview.chromium.org/2277063003/#msg15 .
In order to avoid static initializers and global data
declaration, CL adds a data struct named PDFiumTest_FPDF_FORMFILLINFO,
which has FPDF_FORMFILLINFO as the first struct member definition.
This allows the use of reinterpret_cast to/from
PDFiumTest_FPDF_FORMFILLINFO and PDF_FORMFILLINFO.
PDFiumTest_FPDF_FORMFILLINFO also two more struct members,
'loadedPages' and 'formHandle', which were previously global
variables.
Review-Url: https://codereview.chromium.org/2330043002
|
|
Previously, PDFium only supported widget annotations to draw forms. As
we've implemented other annotations, the behavior of
FPDF_RenderPageBitmap_Retail and FPDF_FFLDraw changed. So, this CL
clearly defines what needs to be done in FPDF_RenderPageBitmap_Retail
and FPDF_FFLDraw.
This CL first assumes that PDFium users will always call
FPDF_RenderPageBitmap_Retail and FPDF_FFLDraw to render PDF pages,
because otherwise they are not able to support PDF forms.
FPDF_RenderPageBitmap_Retail should only deal with non-widget
annotations, such as highlight, underline, text, etc. If
FPDF_ANNOT flag is passed, non-widget annotations are drawn. Otherwise,
they are hidden.
FPDF_FFLDraw should only deal with annotations that requires
user-interaction, such as widget annotations and popup annotation. Since
popup annotation is associated with non-widget annotation, they should
not be drawn if the associated annotation is hidden. Thus, if FPDF_ANNOT
flag is passed, popup annotations are drawn. Otherwise, they are hidden.
Widget annotations should be always drawn regardless of FPDF_ANNOT flag
since they need to be always displayed for PDF forms.
Also, roll DEPS for testing/corpus to 8485b30.
BUG=pdfium:594
Review-Url: https://codereview.chromium.org/2323203002
|
|
In [1], the lack of support of pdfium_test to some application
level hooks was felt.
More specifically, the lack of implementation of the hook FFI_GetPage,
called when 'this.getAnnot()' is executed in an Acrobar JS context,
makes it non-trivial to JS texts that manipulate PDF annotations.
[1] https://codereview.chromium.org/2265313002/
Here is the failing call stack in pdfium_test:
0 ::RenderPdf (samples/pdfium_test.cc)
1 ::FORM_DoDocumentOpenAction (fpdfsdk/fpdfformfill.cpp)
2 CPDFSDK_Document::ProcOpenAction (fpdfsdk/fsdk_mgr.cpp)
3 CPDFSDK_ActionHandler::DoAction_DocOpen (fpdfsdk/fsdk_actionhandler.cpp)
<----v8---->
4 Document::getAnnot (fpdfsdk/javascript/Document.cpp)
5 CPDFSDK_Document::GetPageView (fpdfsdk/fsdk_mgr.cpp)
6 CPDFDoc_Environment::FFI_GetPage (fpdfsdk/include/fsdk_mgr.h)
(frame 6 returns nullptr, and getAnnot call in frame 4 bails)
CL extends pdfium_test app with a FFI_GetPage hook implementation.
Basically what FFI_GetPage does is returning a FPDF_PAGE instance.
In case of pdfium_test, FPDF_PAGE instances were only created on demand
when the page was going to get rendered, and then discarded.
Since FFI_GetPage can be called by JS before pages are rendered,
CL moved the page creation code into a helper function, and cached
the FPDF_PAGE instances created in a map, so it does not recreate
them needlessly.
BUG=pdfium:492
Review-Url: https://codereview.chromium.org/2277063003
|
|
TBR=weili@chromium.org
Review-Url: https://codereview.chromium.org/2149773003
|
|
Review-Url: https://codereview.chromium.org/2068563002
|
|
This Cl adds a '--txt' flag to pdfium_test. When provided the text from the
PDF will be extracted and written into page numbered text files. The files are
written in UTF32-LE as that's what FPDFText_GetUnicode() provides.
Review-Url: https://codereview.chromium.org/2060983005
|
|
R=machenbach@chromium.org,thestig@chromium.org
BUG=
Review-Url: https://codereview.chromium.org/2053603002
|
|
BUG=603903
Review-Url: https://codereview.chromium.org/1994113002
|
|
Fix some bit rot with the Skia build; update the gypi
to current and switch a deprecated call for the current
one.
R=tsepez@chromium.org
Review-Url: https://codereview.chromium.org/1958263002
|
|
Passing bad args in pdfium_test -- all void* pointers look alike.
Make output less verbose while we're here. Turn on event sending
mode for corups tests. No effect until .evt files added to corpus.
Review-Url: https://codereview.chromium.org/1946873004
|
|
We add the --send-events flag, which causes pdfium_test to look
for a .evt file with the same base name as the .pdf file being
rendered, and to use its contents to drive calls to FORM_*
APIs.
The .evt file syntax is crude, roughly:
# comments
keycode,65
mousedown,right,300,300 # more comments
mouseup,right,300,300
mousemove,300,300
Review URL: https://codereview.chromium.org/1898993002
|
|
This is a first-cut at supporting bitmaps.
Also added a --skp option to pdfium_test to generate
a Skia picture file. The picture file can be loaded
in Skia's SampleApp, debugger, or skiaserver to
examine the generated picture.
(This also includes fixes suggested in the prior Skia CL.
My apologies for fat-fingers abandoning that one.)
R=dsinclair@chromium.org, tsepez@chromium.org, dsinclair
Review URL: https://codereview.chromium.org/1776313002 .
|
|
This CL fixes and enables:
* readability/namespace
* readability/multiline_string
* readability/multiline_comment
* readability/inheritance
* readability/function
* readability/braces
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1747123002 .
|
|
This CL enables several of the diabled whitelist/* lint checks.
R=thestig@chromium.org, tsepez@chromium.org
Review URL: https://codereview.chromium.org/1730553002 .
|
|
This CL runs a script over the source and updates the include files to be
a full path from the pdfium/ directory.
BUG=pdfium:65
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1707923002 .
|
|
Original Review URL: https://codereview.chromium.org/1654523002 .
(cherry picked from commit 3859258ebe9e81e1f766b57e7f78c786ae4ed495)
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1658753002 .
|
|
Original Review URL: https://codereview.chromium.org/1645413002 .
(cherry picked from commit 6902db5cbaf0afb8f2cb4df325e1a4e7d6acd53f)
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1648793006 .
|
|
Original Review URL: https://codereview.chromium.org/1641693003 .
(cherry picked from commit 66519af52b61ca158044651d0507d47efb364f87)
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1639253008 .
|
|
Review URL: https://codereview.chromium.org/1587023005 .
(cherry picked from commit 041ed75701d1edc15923daf6080224a67b480869)
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1595763002 .
|
|
Orignal Review URL: https://codereview.chromium.org/1563513002 .
(cherry picked from commit aa326bd6b169dc1b5b9b83048c71799799ab34c6)
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1564583004 .
|
|
Original Review URL: https://codereview.chromium.org/1554363002 .
(cherry picked from commit ed34cdf99d5a4b33e57f81f9244a311f6fb86db3)
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1559373002 .
|
|
This reverts commit 054fc955c153eb5c581fd14946848b8b2a77136a.
Additionally, this rolls DEPS for the testing corpus to update test
expectations.
BUG=pdfium:336
TBR=jun_fang@foxitsoftware.com
Review URL: https://codereview.chromium.org/1555833002 .
(cherry picked from commit 5594538fcc96c38db34f336223140cf703e3cca0)
Review URL: https://codereview.chromium.org/1553013002 .
|
|
This first pass is GYP-only, will do GN in the next CL.
R=ochang@chromium.org
Review URL: https://codereview.chromium.org/1480403002 .
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1476683002 .
|
|
That refer to parent directories.
TBR=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1434223002 .
(cherry picked from commit 22bc4227fbbda5a5e9abad2a2c0a98c04fe7f228)
Review URL: https://codereview.chromium.org/1439223003 .
|
|
pdfium_test
BUG=446715
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1410073009 .
Review URL: https://codereview.chromium.org/1413103007 .
|
|
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 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1415803007 .
(cherry picked from commit 5899671184d01b74989d181363066379ef3e4051)
Review URL: https://codereview.chromium.org/1431593007 .
|
|
- In non-standalone builds, use the provided jpeg library.
- Run gn format over all the GN files.
- Also roll DEPS for buildtools to c2f2598.
- And fix XFA's lack of #includes.
BUG=541704
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1425153006 .
(cherry picked from commit 34bb6c58fe60206a08dc0a1f37b7cfe83e8c762c)
Review URL: https://codereview.chromium.org/1434543003 .
|
|
This regressed in commit 794c9b6.
BUG=551248
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1424743006 .
(cherry picked from commit 8cadf995e9a0fec8da19f69edac9d10fccca7eed)
(cherry picked from commit 955930dce7e4b5c764cdd34b134baea4207de523)
Review URL: https://codereview.chromium.org/1416663008 .
|
|
This CL makes the pdfium_test app a little less chatty by removing the print
statements around linearized paths.
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1415333007 .
(cherry picked from commit 0bbb2d855b938c7dda3dd56baf7131b1861ae850)
Review URL: https://codereview.chromium.org/1415373003 .
|
|
Currently if pdfium_test fails to load the document it just says it failed. This
CL adds some extra context by looking at the error set by the load and reporting
it to the user.
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1413923006 .
(cherry picked from commit e6eae266a48cdcfd464f52df68c97183a4f7987a)
Review URL: https://codereview.chromium.org/1423123002 .
|
|
- add FPDFAvail_Destroy(pdf_avail) on the early return path in RenderPdf
TBR=thestig@chromium.org
BUG=pdfium:236
Review URL: https://codereview.chromium.org/1410333007 .
(cherry picked from commit 0223be82e0afcfee7c501ad2754230353bff79ff)
Review URL: https://codereview.chromium.org/1414913003 .
|
|
Original Review URL: https://codereview.chromium.org/1416713002 .
(cherry picked from commit 6d34d056a7188b7ae9800fe3ceb68645e0442879)
Conflicts:
BUILD.gn
samples/BUILD.gn
samples/pdfium_test.cc
samples/samples.gyp
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1413593003 .
|
|
Original Review URL: https://codereview.chromium.org/1395733006 .
(cherry picked from commit f1c713663192368d26031a4caed1f9705f4510af)
Conflicts:
BUILD.gn
fpdfsdk/src/fpdfview.cpp
fpdfsdk/src/javascript/JS_Runtime.cpp
pdfium.gyp
samples/BUILD.gn
samples/samples.gyp
BUG=pdfium:211
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1393833006 .
|
|
New code changes in JS_Runtime.cpp.
(cherry picked from commit 3dedace9623fef6161a8666e53a4ab2b9be61e4c)
Original Review URL: https://codereview.chromium.org/1367033002 .
Also merge to XFA: Run FXJS_V8 embedder tests against a shared isolate,
since the two go together.
(cherry picked from commit 4ea721cb7954898a9722c389dae86c62957352d0)
Original Review URL: https://codereview.chromium.org/1377293004 .
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1381633008 .
|
|
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1362143002 .
(cherry picked from commit c4e940d803113552a146cd059b1ca793a1f72a22)
Review URL: https://codereview.chromium.org/1362953006 .
|
|
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1268323004 .
(cherry picked from commit 9311163b564785a3a3ccdcb09bd3b7d0b2976d1a)
Review URL: https://codereview.chromium.org/1368513002 .
|
|
Fix lint issues / git cl format.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1357423006 .
(cherry picked from commit 155345e2c47188fa65da1603b7f06c986707bb69)
Review URL: https://codereview.chromium.org/1367633004 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1287863002 .
(cherry picked from commit 388a3b0b8d6f75d47978c08299300f121f04884c)
Review URL: https://codereview.chromium.org/1292653002 .
|
|
Origin Review URL:
- https://codereview.chromium.org/1234053003
- https://codereview.chromium.org/1241863004
- https://codereview.chromium.org/1235303003
R=tsepez@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1263963002 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1234323003 .
|
|
Clang warns if there are missing braces around a subobject
initializer. The most common idiom that triggers this is:
STRUCT s = {0};
if the first field of STRUCT is itself a struct. This can
be more simply written as:
STRUCT s = {};
which also prevents the warning from firing.
Other instances of the warning have been fixed by adding
braces where appropriate.
R=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/1213523004.
|
|
The following files needed adjustment beyond a mechanical merge:
fpdfsdk/src/fpdfview.cpp
public/fpdf_formfill.h
samples/pdfium_test.cc
testing/embedder_test.cpp
Original Review URL: https://codereview.chromium.org/1130843003
BUG=pdfium:158
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1137233002
|
|
Original Review URL: https://codereview.chromium.org/1135913002
BUG=pdfium:154
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1136703003
|