Convert Figma logo to code with AI

bblanchon logopdfium-binaries

📰 Binary distribution of PDFium

1,021
212
1,021
29

Top Related Projects

50,177

PDF Reader in JavaScript

3,934

qpdf: A content-preserving PDF document transformer

2,329

A Python library for reading and writing PDF, powered by QPDF

7,041

PyMuPDF is a high performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents.

iText for Java represents the next level of SDKs for developers that want to take advantage of the benefits PDF can bring. Equipped with a better document engine, high and low-level programming capabilities and the ability to create, edit and enhance PDF documents, iText can be a boon to nearly every workflow.

Quick Overview

The bblanchon/pdfium-binaries repository provides pre-built binaries of PDFium, Google's open-source PDF rendering engine. It offers easy access to PDFium libraries for various platforms and architectures, simplifying the integration of PDF functionality into applications without the need for complex compilation processes.

Pros

  • Ready-to-use binaries for multiple platforms (Windows, macOS, Linux) and architectures (x86, x64, arm64)
  • Regular updates to keep pace with the latest PDFium releases
  • Simplifies the integration of PDF rendering capabilities into projects
  • Saves time and resources by eliminating the need for manual compilation

Cons

  • Limited to pre-built binaries, which may not be suitable for users requiring custom builds
  • Dependency on third-party builds, which may introduce potential security concerns
  • May not include all possible build configurations or optimizations
  • Limited control over the compilation process and included features

Getting Started

To use the PDFium binaries in your project:

  1. Visit the releases page of the repository.
  2. Download the appropriate binary for your platform and architecture.
  3. Include the downloaded library in your project's build process or runtime environment.
  4. Link against the PDFium library in your application.

For example, in a C++ project using CMake:

# CMakeLists.txt
cmake_minimum_required(VERSION 3.10)
project(MyPDFApp)

# Specify the path to the PDFium library
set(PDFIUM_DIR "/path/to/pdfium")

# Include PDFium headers
include_directories(${PDFIUM_DIR}/include)

# Link against PDFium library
link_directories(${PDFIUM_DIR}/lib)

add_executable(MyPDFApp main.cpp)
target_link_libraries(MyPDFApp pdfium)

Note: The exact integration process may vary depending on your development environment and project setup.

Competitor Comparisons

50,177

PDF Reader in JavaScript

Pros of pdf.js

  • Written in JavaScript, making it easily integrable into web applications
  • Renders PDFs directly in the browser without additional plugins
  • Extensive documentation and active community support

Cons of pdf.js

  • May have slower performance for large or complex PDFs
  • Limited support for some advanced PDF features
  • Relies on browser capabilities, which can vary across different environments

Code Comparison

pdf.js:

PDFJS.getDocument('https://example.com/sample.pdf').then(function(pdf) {
  pdf.getPage(1).then(function(page) {
    var scale = 1.5;
    var viewport = page.getViewport(scale);
    // Render page on canvas
  });
});

pdfium-binaries:

FPDF_DOCUMENT document = FPDF_LoadDocument("sample.pdf", nullptr);
FPDF_PAGE page = FPDF_LoadPage(document, 0);
double width = FPDF_GetPageWidth(page);
double height = FPDF_GetPageHeight(page);
// Render page using native methods

Summary

pdf.js is a JavaScript-based PDF renderer ideal for web applications, offering easy integration and cross-browser compatibility. However, it may have performance limitations for complex PDFs. pdfium-binaries, on the other hand, provides native PDF rendering capabilities with potentially better performance but requires more setup and is less web-friendly. The choice between them depends on the specific requirements of your project, such as target platform, performance needs, and development environment.

3,934

qpdf: A content-preserving PDF document transformer

Pros of qpdf

  • Standalone C++ library for PDF manipulation, offering more flexibility and control
  • Extensive command-line interface for various PDF operations
  • Active development with regular updates and improvements

Cons of qpdf

  • Requires more setup and integration effort compared to pre-built binaries
  • May have a steeper learning curve for developers new to PDF manipulation

Code Comparison

qpdf:

QPDF pdf;
pdf.processFile("input.pdf");
QPDFWriter w(pdf, "output.pdf");
w.setStreamDataMode(qpdf_s_compress);
w.write();

pdfium-binaries:

FPDF_DOCUMENT doc = FPDF_LoadDocument("input.pdf", nullptr);
FPDF_SaveAsCopy(doc, "output.pdf", 0);
FPDF_CloseDocument(doc);

Summary

qpdf is a comprehensive PDF manipulation library, offering more control and features but requiring more setup. pdfium-binaries provides pre-built binaries for easier integration but may offer less flexibility. The choice depends on project requirements and developer expertise.

2,329

A Python library for reading and writing PDF, powered by QPDF

Pros of pikepdf

  • High-level Python library for reading, manipulating, and writing PDF files
  • Extensive documentation and active community support
  • Supports a wide range of PDF operations, including merging, splitting, and encryption

Cons of pikepdf

  • Requires Python knowledge and environment setup
  • May have a steeper learning curve for beginners compared to pre-compiled binaries
  • Performance might be slower for certain operations compared to native C++ implementations

Code comparison

pikepdf:

import pikepdf

pdf = pikepdf.Pdf.open("input.pdf")
pdf.save("output.pdf")

pdfium-binaries:

FPDF_DOCUMENT doc = FPDF_LoadDocument("input.pdf", nullptr);
FPDF_SaveAsCopy(doc, "output.pdf", 0);
FPDF_CloseDocument(doc);

Summary

pikepdf offers a more user-friendly Python interface for PDF manipulation, with extensive features and documentation. pdfium-binaries provides pre-compiled binaries of PDFium, offering potentially faster performance but requiring more low-level programming knowledge. The choice between the two depends on the specific project requirements, programming language preference, and the level of PDF manipulation needed.

7,041

PyMuPDF is a high performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents.

Pros of PyMuPDF

  • Comprehensive PDF manipulation capabilities, including text extraction, rendering, and editing
  • Extensive documentation and active community support
  • Cross-platform compatibility with Python bindings

Cons of PyMuPDF

  • Larger library size compared to pdfium-binaries
  • May have a steeper learning curve for beginners
  • Potentially slower performance for certain operations

Code Comparison

PyMuPDF:

import fitz
doc = fitz.open("example.pdf")
page = doc[0]
text = page.get_text()

pdfium-binaries:

FPDF_DOCUMENT doc = FPDF_LoadDocument("example.pdf", nullptr);
FPDF_PAGE page = FPDF_LoadPage(doc, 0);
// Additional code required for text extraction

PyMuPDF offers a more straightforward API for common PDF operations, while pdfium-binaries provides lower-level access to PDF functionality. PyMuPDF is better suited for Python developers looking for a comprehensive PDF library, whereas pdfium-binaries is ideal for projects requiring fine-grained control and custom implementations in C/C++.

iText for Java represents the next level of SDKs for developers that want to take advantage of the benefits PDF can bring. Equipped with a better document engine, high and low-level programming capabilities and the ability to create, edit and enhance PDF documents, iText can be a boon to nearly every workflow.

Pros of itext-java

  • Comprehensive Java-based PDF library with extensive features for creating, manipulating, and processing PDF documents
  • Active development and regular updates, with a large community and commercial support options
  • Well-documented API with numerous examples and tutorials available

Cons of itext-java

  • Commercial license required for many use cases, which can be costly for some projects
  • Steeper learning curve due to its extensive feature set and API complexity
  • Larger footprint and potential performance overhead compared to native bindings

Code Comparison

itext-java:

PdfDocument pdf = new PdfDocument(new PdfWriter("output.pdf"));
Document document = new Document(pdf);
document.add(new Paragraph("Hello, World!"));
document.close();

pdfium-binaries:

FPDF_DOCUMENT doc = FPDF_CreateNewDocument();
FPDF_PAGE page = FPDFPage_New(doc, 0, 595, 842);
FPDF_PAGEOBJECT text = FPDFPageObj_CreateTextObj(doc, "Arial", 12.0f);
FPDFText_SetText(text, "Hello, World!");
FPDFPage_InsertObject(page, text);
FPDF_SaveAsCopy(doc, "output.pdf", NULL);

Note: pdfium-binaries provides C/C++ bindings, so the code comparison is not directly equivalent. The itext-java example is in Java, while the pdfium-binaries example is in C++.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

PDFium binaries

Pre-compiled binaries of PDFium

Patches Total downloads

Latest release Nuget Conda

This project hosts pre-compiled binaries of the PDFium library, an open-source library for PDF manipulation and rendering.

Builds have been triggered automatically every Monday since 2017.

Disclaimer: This project isn't affiliated with Google or Foxit.

Download

Here are the download links for latest release:

OS Env CPU PDFium PDFium V8
Android arm pdfium-android-arm.tgz pdfium-v8-android-arm.tgz
arm64 pdfium-android-arm64.tgz pdfium-v8-android-arm64.tgz
x64 pdfium-android-x64.tgz pdfium-v8-android-x64.tgz
x86 pdfium-android-x86.tgz pdfium-v8-android-x86.tgz
iOS catalyst arm64 pdfium-ios-catalyst-arm64.tgz pdfium-v8-ios-catalyst-arm64.tgz
x64 pdfium-ios-catalyst-x64.tgz pdfium-v8-ios-catalyst-x64.tgz
device arm64 pdfium-ios-device-arm64.tgz pdfium-v8-ios-device-arm64.tgz
simulator arm64 pdfium-ios-simulator-arm64.tgz pdfium-v8-ios-simulator-arm64.tgz
x64 pdfium-ios-simulator-x64.tgz pdfium-v8-ios-simulator-x64.tgz
Linux glibc arm pdfium-linux-arm.tgz pdfium-v8-linux-arm.tgz
arm64 pdfium-linux-arm64.tgz pdfium-v8-linux-arm64.tgz
x64 pdfium-linux-x64.tgz pdfium-v8-linux-x64.tgz
x86 pdfium-linux-x86.tgz pdfium-v8-linux-x86.tgz
musl arm64 pdfium-linux-musl-arm64.tgz failing (#192)
x64 pdfium-linux-musl-x64.tgz failing (#191)
x86 pdfium-linux-musl-x86.tgz failing (#193)
macOS arm64 pdfium-mac-arm64.tgz pdfium-v8-mac-arm64.tgz
x64 pdfium-mac-x64.tgz pdfium-v8-mac-x64.tgz
univ pdfium-mac-univ.tgz pdfium-v8-mac-univ.tgz
Windows arm64 pdfium-win-arm64.tgz pdfium-v8-win-arm64.tgz
x64 pdfium-win-x64.tgz pdfium-v8-win-x64.tgz
x86 pdfium-win-x86.tgz pdfium-v8-win-x86.tgz
WebAssembly1 pdfium-wasm.tgz not supported

1: WebAssembly build is experimental; please provide feedback.

See the Releases page to download older versions of PDFium.

NuGet Packages

The following NuGet packages are available:

OS PDFium PDFium V8
All (meta package) bblanchon.PDFium bblanchon.PDFiumV8
Android bblanchon.PDFium.Android bblanchon.PDFiumV8.Android
iOS bblanchon.PDFium.iOS bblanchon.PDFiumV8.iOS
Linux bblanchon.PDFium.Linux bblanchon.PDFiumV8.Linux
macOS bblanchon.PDFium.macOS bblanchon.PDFiumV8.macOS
Windows bblanchon.PDFium.Win32 bblanchon.PDFiumV8.Win32
WebAssembly1 bblanchon.PDFium.WebAssembly not supported

1: WebAssembly build is experimental; please provide feedback.

HELP WANTED!
I can provide packages for your favorite package manager, but I need help from someone who knows the format. Contact me via GitHub issues if you want to help.

Documentation

PDFium API documentation

Please find the documentation of the PDFium API on developers.foxit.com.

How to use PDFium in a CMake project

  1. Unzip the downloaded package in a folder (e.g., C:\Libraries\pdfium)

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

  3. In your CMakeLists.txt, add

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

     target_link_libraries(my_exe pdfium)
    
  5. On Windows, make sure that pdfium.dll can be found by your executable (copy it on the same folder, or put it on the PATH).

Related projects

The following projects use (or recommend using) our PDFium builds:

NameLanguageDescription
dart_pdfDartPDF creation module for dart/flutter
DtronixPdfC#PDF viewer and editor toolset
go-pdfiumGoGo wrapper around PDFium with helper functions for various methods like image rendering and text extraction
libvipsCA performant image processing library
PDFium RSRustRust wrapper around PDFium
pdfium-vfpVFPPDF Viewer component for Visual FoxPro
PDFiumCoreC#.NET Standard P/Invoke bindings for PDFium
PdfiumLibPascalAn interface to libpdfium for Delphi
PdfLibCoreC#A fast PDF editing and reading library for modern .NET Core applications
PDFtoImageC#.NET library to render PDF content into images
PDFtoZPLC#A .NET library to convert PDF files (and bitmaps) into Zebra Programming Language code
PDFxDartFlutter Render & show PDF documents on Web, MacOs 10.11+, Android 5.0+, iOS and Windows
PyPDFium2PythonPython bindings to PDFium
SpacedriveRust/TSCross-platform file manager, powered by a virtual distributed filesystem
wxPDFViewC++wxWidgets components to display PDF content

Did we miss a project? Please open a PR!

Contributors

Username Contributions
Benoit Blanchon @bblanchon Main contributor
Christoffer Green @ChristofferGreen Linux ARM build
Jeroen Bobbeldijk @jerbob92 Musl build
WebAssembly build
mara004 @mara004 Conda packages
Frequent help with many aspects of the project
David Sungaila @sungaila NuGet packages
Tobias Taschner @TcT2k macOS build
V8 build