| commit | 4aee6bd8dbd0a13c3c6d94cdc8e2b5bc1850aad6 | [log] [tgz] |
|---|---|---|
| author | Victor Hugo Vianna Silva <victorvianna@google.com> | Mon Aug 25 04:16:00 2025 -0700 |
| committer | Pdfium LUCI CQ <pdfium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Aug 25 04:16:00 2025 -0700 |
| tree | 0f67d81c7e210739c5eea8cb8bd470344cd817d2 | |
| parent | 1978f6b7a32a362de3b7f99ec22e3fbb40d1baa9 [diff] |
Roll siso and update its CIPD package These are equivalent. https://chromium.googlesource.com/infra/infra/+/e5fa67c5a456c1ab932f440ddfb195a8a33c235b https://chromium.googlesource.com/build/+/0abd3f6d1e8964ada90abd415abf377cadb024fc So the blamelist is $ git log --oneline 0abd3f6d1e8964ada90abd415abf377cadb024fc..HEAD 1556869 Run `gofmt` in presubmit afe2125 siso: Do not set GetContent() error to the stdout/stderr of action result 2377e92 Revert "siso: fix timeout for cas and capability service" 5a1b388 siso: Make sure it's not a laptop when using Google credhelper 4283503 siso: LayeredCache write-through on Open() 8369e8b Update README for standalone repo and add codesearch link 0000dc9 siso: update version string to v1.4.1 fac028f siso: Change the version to 1.4 d2fea3c Update direct deps and tidy go.mod files 52bc97e Fix incorrectly copied presubmit 40ad9e3 Cut-down PRESUBMIT.py from infra/infra root for build repo d8e95f3 siso: propagate error from data source e123e4d Reland "Reland "siso: retry in flush for slow RBE-CAS"" 76849f1 siso: fix timeout for cas and capability service 4c5284f Revert "Reland "siso: retry in flush for slow RBE-CAS"" 051b8d6 Reland "siso: retry in flush for slow RBE-CAS" 9a56dbd Revert "siso: retry in flush for slow RBE-CAS" c141365 siso: retry in flush for slow RBE-CAS 9ed81e0 siso: fix version for build repo 242fa6a siso: generate proto by protoc 32.0 41521c6 kajiya: remove dependency to go.chromium.org/luci/common/system/signals 8b7d7e5 siso: update version string to v1.3.16 a7cef6a siso: Add exec_timeout step config to override action timeout adb901d siso: Check if Chtimes() fail for missing file f26c971 [siso] Make compressed uploads more robust for non-Google RBE backends bc178ac [siso] Support REAPI execution priority 3297277 siso: don't call ctx.Err() in scandeps Scan too often 6e27993 use protoc-gen-go v1.36.7 42751ff siso: update version string to v1.3.15 db55352 siso: set appropriate timeout for WriteDigestData 76b44cb siso: fix err log for retry 710349b siso: fix spammy "digest is unknown" log 0a0901f siso: fix panic in `siso query targets` 6ac437a siso: allow --remote_jobs when reclient is used 4e9a6e4 siso: cred.New checks reapi service URI ad12290 [go] Run go mod tidy, update toolchain to go 1.24.5 -> 1.24.6 53c59bd gong: use github.com/google/subcommands af5d315 siso: use github.com/google/subcommands 674f906 siso: fix flaky TestRefresh 0be6287 siso: update version string to v1.3.14 edd5e66 siso: add document about filegroups de46322 Prepare for github.com/google/subcommands switch 69a58e2 siso: need to compute digest for regular files 950c6e1 siso: handle scandeps error a4e6ae0 siso: update version string to v1.3.13 89b8252 [Siso] execute: Wrap errors with more context 8367980 siso: fix version 95536bd siso: show credential type 11a3c0c siso: remove go.chromium.org/luci dependency. aa7f96e siso: cache-write continue on error 9643ee7 siso: use luci-auth binary instead of go.chromium.org/luci/auth 5a750e8 revive clang -M deps scanning for scandeps unprocessable inputs 56797b2 siso: cache-write cleanup unused test files c6179d6 siso: cache-write rename nit followups 5d7b562 siso: fix backtrace for siso_build.pprof 0ba1e11 siso: rename local-upload to cache-write followup 37e02e7 siso: remove dependency to go.chromium.org/luci/cipd/version 587d333 siso: fix noctx lint error in reapi/reapi_test.go 3e903df siso: fix noctx lint error after 6799580 merge 257932e siso: update version string to v1.3.12 221fea3 siso: local-upload improve logging 1c41a90 siso: log missing entries once per path 6118b1a siso: fix panic when using use_remote_exec_wrapper a823e16 siso: Replace go.chromium.org/luci/common/retry with a own retry logic 0eebc53 siso: use :inputs label to expand target's inputs 6578b26 siso: cleanup e2e_trustedlocal_test.go dd06dee siso: don't record prev id if step is skipped fc70eb7 siso: add reapi_platform_properties.md 40b4e0d [go] Update to go 1.24.4 -> 1.24.5 715dd23 siso: fix set executables for files in filegroup 3d79412 siso: remove dependency to go.chromium.org/luci/common/system/signals 9d25aab kzipinfo: Add show command to show compilation unit info ead4206 siso: allow `siso fetch` to use non-google RBE c4bff9b [go] Update Go go1.23.11 -> go1.24.5. c546251 kzipinfo: Add ls command to list compilation units c976400 gong: Move Setup into build package d845f34 siso: invalidate dir entry if local is not dir. b2135fb kzipinfo: Initial commit 9828261 siso: fix symlink handling in scandeps d01a9a7 siso: fix symlink handling in hashfs fd6e285 siso: fix symlink dir handling in merkletree 96c0053 siso: fix default value for -C 6897f19 siso: scandeps parse args in @rspfile c876f2e siso: add metrics for local upload feature 84f5f0f siso: local uploading select remotable only 8d496ec siso: scandeps add file for @file. 899d524 Fix whitespace in .../go/src/infra/build. b115478 siso: update version string to v1.3.11 Bug: 440495698 Change-Id: I1e5a1519c9e6bd0f587f864636256403e7c47e0b Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/135150 Commit-Queue: Victor Vianna <victorvianna@google.com> Reviewed-by: Lei Zhang <thestig@chromium.org>
PDFium uses the same build tooling as Chromium. See the platform-specific Chromium build instructions to get started, but replace Chromium's “Get the code” instructions with PDFium's.
The default architecture for Windows, Linux, and Mac is “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 “arm”.
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.
PDFium aims to be compliant with the Chromium policy.
Currently this means Clang. Former MSVC users should consider using clang-cl if needed. Community-contributed patches for gcc will be allowed. No MSVC patches will be taken.
Run: 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.
Once you've done this, the toolchain will be installed automatically for you in the Generate the build files step below.
The toolchain will be in depot_tools\win_toolchain\vs_files\<hash>, and windbg can be found in depot_tools\win_toolchain\vs_files\<hash>\win_sdk\Debuggers.
If you want the IDE for debugging and editing, you will need to install it separately, but this is optional and not needed for building PDFium.
The name of the top-level directory does not matter. In the following example, the directory name is “repo”. This directory must not have been used before by gclient config as each directory can only house a single gclient configuration.
mkdir repo cd repo gclient config --unmanaged https://pdfium.googlesource.com/pdfium.git gclient sync cd pdfium
On Linux, additional build dependencies need to be installed by running the following from the pdfium directory.
./build/install-build-deps.sh
PDFium uses GN to generate the build files and Ninja to execute the build files. Both of these are included with the depot_tools checkout.
PDFium may be built either with or without JavaScript support, and with or without XFA forms support. Both of these features are enabled by default. Also note that the XFA feature requires JavaScript.
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 out/Debug.
use_remoteexec = false # Approved users only. Do necessary setup & authentication first. is_debug = true # Enable debugging features. # Set true to enable experimental Skia backend. pdf_use_skia = false # Set true to enable experimental Fontations backend. pdf_enable_fontations = false pdf_enable_xfa = true # Set false to remove XFA support (implies JS support). pdf_enable_v8 = true # Set false to remove Javascript support. pdf_is_standalone = true # Set for a non-embedded build. is_component_build = false # Disable component build (Though it should work)
For test applications like pdfium_test to build, one must set pdf_is_standalone = true.
By default, the entire project builds with C++20.
By default, PDFium expects to build with a clang compiler that provides additional chrome plugins. To build against a vanilla one lacking these, one must set clang_use_chrome_plugins = false.
When complete the arguments will be stored in <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.
You can build the standalone test program by running: 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 path/to/myfile.pdf.<n>.ppm. Run pdfium_test --help to see all the options.
There are currently several test suites that can be run:
It is possible the tests in the 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.
If your change affects rendering, a pixel test should be added. Simply add a .in or .pdf file in testing/resources/pixel and the pixel runner will pick it up at the next run.
Make sure that your test case doesn't have any copyright issues. It should also be a minimal test case focusing on the bug that renders the same way in many PDF viewers. Try to avoid binary data in streams by using the ASCIIHexDecode simply because it makes the PDF more readable in a text editor.
To try out your new test, you can call the run_pixel_tests.py script:
$ ./testing/tools/run_pixel_tests.py your_new_file.in
To generate the expected image, you can use the make_expected.sh script:
$ ./testing/tools/make_expected.sh your_new_file.pdf
Please make sure to have optipng installed which optimized the file size of the resulting png.
.in files.in files are PDF template files. PDF files contain many byte offsets that have to be kept correct or the file won't be valid. The template makes this easier by replacing the byte offsets with certain keywords.
This saves space and also allows an easy way to reduce the test case to the essentials as you can simply remove everything that is not necessary.
A simple example can be found here.
To transform this into a PDF, you can use the fixup_pdf_template.py tool:
$ ./testing/tools/fixup_pdf_template.py your_file.in
This will create a your_file.pdf in the same directory as your_file.in.
There is no official style guide for the .in file, but a consistent style is preferred simply to help with readability. If possible, object numbers should be consecutive and /Type and /SubType should be on top of a dictionary to make object identification easier.
The public/ directory contains header files for the APIs available for use by embedders of PDFium. The PDFium project endeavors 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.
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.
PDFium uses this bug tracker, but for security bugs, please use Chromium's security bug template.
See the CONTRIBUTING document for more information on contributing to the PDFium project.