|author||Tom Sepez <firstname.lastname@example.org>||Fri Mar 29 23:42:10 2019 +0000|
|committer||Chromium commit bot <email@example.com>||Fri Mar 29 23:42:10 2019 +0000|
Use vector of uint8_t in XFA_Base64Decode(). Preferable to malloc() and pointer arithmetic. Pass const-ref bytestring rather than pointer while at it. Change-Id: Ic19d0f9fb3a66724ff1e64573887d7f7d1234b02 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/52656 Reviewed-by: Lei Zhang <firstname.lastname@example.org> Commit-Queue: Tom Sepez <email@example.com>
Get the Chromium depot_tools via the instructions. This provides the gclient utility needed below and many other tools needed for PDFium development.
Also install Python, Subversion, and Git and make sure they're in your path.
PDFium uses the same build tool as Chromium:
Please refer to Chromium's Visual Studio set up for requirements and instructions on build environment configuration.
set DEPOT_TOOLS_WIN_TOOLCHAIN=0, or set that variable in your global environment.
Compilation is done through Ninja, not Visual Studio.
x64”. On Windows, “
x86” is also supported. GN parameter “
target_cpu = "x86"” can be used to override the default value. If you specify Android build, the default CPU architecture will be “
It is expected that there are still some places lurking in the code which will not function properly on big-endian architectures. Bugs and/or patches are welcome, however providing this support is not a priority at this time.
download_from_google_storage --config and follow the authentication instructions. Note that you must authenticate with your @google.com credentials. Enter “0” if asked for a project-id.
depot_tools\win_toolchain\vs_files\<hash>, and windbg can be found in
gclient config as each directory can only house a single gclient configuration.
Additional build dependencies need to be installed by running the following from the
Configuration is done by executing
gn args <directory> to configure the build. This will launch an editor in which you can set the following arguments. By convention,
<directory> should be named
out/foo, and some tools / test support code only works if one follows this convention. A typical
<directory> name is
For sample applications like
pdfium_test to build, one must set
pdf_is_standalone = true.
To use the Skia backend, one must set
use_cxx11 = false which will build the entire project with C++14.
<directory>/args.gn, and GN will automatically use the new arguments to generate build files. Should your files fail to generate, please double-check that you have set use_sysroot as indicated above.
ninja -C <directory> pdfium_test You can build the entire product (which includes a few unit tests) by running:
ninja -C <directory> pdfium_all.
The pdfium_test program supports reading, parsing, and rasterizing the pages of a .pdf file to .ppm or .png output image files (Windows supports two other formats). For example:
<directory>/pdfium_test --ppm path/to/myfile.pdf. Note that this will write output images to
pdfium_test --help to see all the options.
There are currently several test suites that can be run:
testing directory can fail due to font differences on the various platforms. These tests are reliable on the bots. If you see failures, it can be a good idea to run the tests on the tip-of-tree checkout to see if the same failures appear.
The public/ directory contains header files for the APIs available for use by embedders of PDFium. We endeavor to keep these as stable as possible.
Outside of the public/ directory, code may change at any time, and embedders should not directly call these routines.
Code coverage reports for PDFium can be generated in Linux development environments. Details can be found here.
Chromium provides code coverage reports for PDFium here. PDFium is located in
third_party/pdfium in Chromium‘s source code. This includes code coverage from PDFium’s fuzzers.
Valgrind and other profiling tools do not work correctly with the standard build setup that PDFium uses. You will need to add
args.gn to get symbols to correctly appear.
The current health of the source tree can be found here.
There are several mailing lists that are setup:
Note, the Reviews and Bugs lists are typically read-only.
For contributing code, we will follow Chromium's process as much as possible. The main exceptions are: