This project hosts pre-compiled binaries of the PDFium library, an open-source library for PDF manipulation and rendering.
Builds are triggered manually, if needed
Disclaimer: This project isn't affiliated with Google or Foxit.
Here are the download links for latest release:
OS | CPU | PDFium |
---|---|---|
Windows | x64 | pdfium-win-x64.tgz |
See the Releases page to download older versions of PDFium.
Please find the documentation of the PDFium API on developers.foxit.com.
-
Unzip the dpwnloaded package in a folder (e.g.,
C:\Libraries\pdfium
) -
Set the environment variable
PDFium_DIR
to this folder (egC:\Libraries\pdfium
) -
In your
CMakeLists.txt
, addfind_package(PDFium)
-
Then link your executable with PDFium:
target_link_libraries(my_exe pdfium)
-
On Windows, make sure that
pdfium.dll
can be found by your executable (copy it on the same folder, or put in on thePATH
).
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();
The following project use (or recommend using) our PDFium builds:
- dart_pdf, PDF creation module for dart/flutter
- Flutter native_pdf_renderer, Flutter Plugin to render PDF pages as images
- PDFium RS, a Rust wrapper around PDFium
- PDFiumCore, .NET Standard P/Invoke bindings for PDFium
- PyPDFium2, Python bindings to PDFium
- wxPDFView, wxWidgets components to display PDF content
Did we miss a project? Please open a PR!