Skip to content

PDFium - Compile instructions and tools for all supported platforms

License

Notifications You must be signed in to change notification settings

pdf-ist-internal/pdfium-lib

 
 

Repository files navigation

PDFium Library

PDFium - iOS PDFium - macOS PDFium - Android PDFium - WASM

This project compile PDFium to all supported platforms. Current project compiles to:

  • iOS device (armv7, arm64)
  • iOS simulator (x86_64)
  • Android (armv7, armv8, x86, x86_64)
  • macOS (x86_64, arm64)
  • Linux
  • Windows
  • WASM (web assembly)

Web demo

You can test pdfium on web browser here:

https://pdfviewer.github.io/?title=Demo%20PDF%20with%201MB&url=https://file-examples-com.github.io/uploads/2017/10/file-example_PDF_1MB.pdf

Requirements

  1. ninja (brew install ninja)
  2. python
  3. pip

Obs: Only python version 3 is supported

How to compile (general)

  1. Get the source:
    git clone https://github.com/prsolucoes/pdfium-lib.git
    cd pdfium-lib

  2. Install pip requirements:
    pip3 install -r requirements.txt

  3. Get Google Depot Tools:
    python3 make.py run build-depot-tools
    export PATH=$PATH:$PWD/build/depot-tools

Obs:

  • The file make.py need be executed with python version 3.
  • These steps you only need make one time.
  • If you change pdfium git commit revision on file modules/config.py only execute step 4.

How to compile for iOS

Check tutorial here: Build for iOS

How to compile for macOS (with Apple Silicon - M1)

Check tutorial here: Build for macOS

How to compile for Android

Check tutorial here: Build for Android

How to compile for WASM

Check tutorial here: Build for WASM

Prebuilt binary

Access releases page to download prebuilt binaries:

https://github.com/paulo-coutinho/pdfium-lib/releases

How to include files and extend pdfium

Check tutorial here: How to include files

About

PDFium - Compile instructions and tools for all supported platforms

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 63.2%
  • HTML 28.2%
  • Dockerfile 5.0%
  • JavaScript 1.8%
  • C++ 1.8%