Skip to content

marcocpt/pdfium-binaries

 
 

Repository files navigation

Total number of downloads Build

Pre-compiled binaries of PDFium

This project hosts pre-compiled binaries of the PDFium library.

See Releases page to download binaries.

Download links

Here are the download links for latest release:

OS Arch PDFium PDFium with V8 and XFA
Windows x86 pdfium-win-x86.zip (2 MB) Unavailable (buildtime > 2h)
x64 pdfium-win-x64.zip (2 MB) Unavailable (buildtime > 2h)
Linux x64 pdfium-linux.tgz (6 MB) pdfium-linux-v8.tgz (37 MB)
ARM pdfium-linux-arm.tgz (5 MB) -
ARM64 pdfium-linux-arm64.tgz (5 MB) -
macOS x64 pdfium-mac-x64.tgz (6 MB) pdfium-mac-x64-v8.tgz (42 MB)
ARM64 pdfium-mac-arm64.tgz (6 MB) -
Android x86 pdfium-android-x86.tgz -
x64 pdfium-android-x64.tgz -
ARM pdfium-android-arm.tgz -
ARM64 pdfium-android-arm64.tgz -

How to use PDFium in a CMake project

  1. Unzip one of more variants in a folder (eg C:\Libraries\pdfium)

  2. Set the environment variable PDFium_DIR to this folder (eg C:\Libraries\pdfium)

  3. In your CMakeLists.txt, add

     find_package(PDFium)
    
  4. Then link you executable with PDFium:

     target_link_libraries(my_exe pdfium)
    
  5. On Windows, make sure that pdfium.dll can be found by your executable.

How to use JavaScript V8 enabled binaries

If you are using the V8 enabled binaries additional initialization is required. In your code before using PDFium you have to call FPDF_InitEmbeddedLibraries() from the additional header fpdf_libs.h which is only available in V8 enabled binaries.

The archive will contain a res folder which you have to distribute with your application. On macOS you should include this in your application bundle for other platforms place it where your application binary will find it.

See the following example for usage:

    #include "fpdf_libs.h"

    ...

    // Determine the path to files in the res folder from the archive
    const char* resPath = "<path to the res folder>";

    // Initialize V8 and other embedded libraries
    FPDF_InitEmbeddedLibraries(resPath);

    // Make use of PDFium
    FPDF_InitLibrary();
    FPDF_DestroyLibrary();

How to create macOS universal binary

To create a universial macOS binary containing both Intel and ARM code download both CPU versions and use the mac_create_universal.sh script to create a universal archive.


This project isn't affilated with Google nor Foxit.

About

📰 Binary distribution of PDFium

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 78.7%
  • CMake 20.4%
  • C 0.9%