pdf-lib VS qpdf

Compare pdf-lib vs qpdf and see what are their differences.

qpdf

QPDF: A content-preserving PDF document transformer (by qpdf)
Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
pdf-lib qpdf
23 18
6,158 2,958
- 3.4%
0.0 9.6
2 months ago 5 days ago
TypeScript C++
MIT License Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

pdf-lib

Posts with mentions or reviews of pdf-lib. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-11.

qpdf

Posts with mentions or reviews of qpdf. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-20.
  • 🔍Underrated Open Source Projects You Should Know About 🧠
    9 projects | dev.to | 20 Mar 2024
    QPDF is a CLI tool that performs content-preserving transformations on PDF files. We have another tool for managing files!
  • I wanna design UI/Ux for open source!
    7 projects | /r/opensource | 11 Jan 2023
  • qpdf.el: A transient Emacs wrapper for qpdf
    4 projects | /r/emacs | 15 Aug 2022
    Hi, this is my first Emacs package! It provides a transient wrapper for the qpdf command-line tool aimed especially at users of pdf-tools or at least DocView. With it one can, for example, remove/reorder/split/rotate pages of a pdf file, merge pdf files, remove annotations, and apply a range of transformations to a pdf file. See the qpdf documentation.
  • The New Ghostscript PDF Interpreter
    4 projects | news.ycombinator.com | 31 Jul 2022
    There are some here, as test files in the qpdf library: https://github.com/qpdf/qpdf/tree/main/qpdf/qtest/qpdf

    (I wrote a low-level PDF parser and ran it over the PDF files that happened to be present on my laptop—just regular ones—and ran into some files that (some) PDF viewers open but even qpdf doesn't. I say "even" because qpdf is really good IMO.)

  • Ask HN: Why is the PDF format so inaccessible?
    8 projects | news.ycombinator.com | 4 May 2022
    If you're comfortable handling the (typo)graphical aspects of the PDF yourself and have the ability to consume a C++ library, I've had good experiences using the Apache-licensed qpdf[1] library to handle the low-level structural aspects of the PDF standard. It's particularly convenient when your application requires structure-preserving integration of existing PDF content.

    Simple example applications, each completed in 2–3 days, both in C#, using C++/CLI to integrate libqpdf:

    1. Overlaying fixed-format text on pre-existing blank PDF form pages, ensuring the content of each distinct form page is embedded exactly once, and that all necessary assets (fonts, images, etc.) from the blank form PDF pages are included in the output PDF.

    2. Losslessly combining a sequence of PDF, TIFF, and JPEG images into a single PDF with bookmarks pointing to the first page of each source file and existing image compression maintained where possible. In this application, only the source TIFFs were anything other than arbitrary (i.e., the TIFFs were more-or-less baseline images coming from a small number of scanning systems, but the JPEGs and PDFs came from all sorts of different applications).

    [1] https://github.com/qpdf/qpdf

  • Quick macOS terminal command to batch remove user password from PDF
    2 projects | /r/MacTerminal | 5 Feb 2022
    I was looking for a way on macOS to batch remove the user password from a bunch of PDF files that had the same password. I found the easiest way was to use qpdf with the following command:
  • Recovering redacted information from pixelated videos
    7 projects | news.ycombinator.com | 25 Jan 2022
    Not off the shelf but here are some tools. I have no experience with them.

    Wolf binarization - I think it makes the text more clear before OCR.

    https://github.com/chriswolfvision/local_adaptive_binarizati...

    This thing OCRs the pdf using Tesseract OCR

    https://github.com/ocrmypdf/OCRmyPDF/

    Two other pdf tools

    https://github.com/qpdf/qpdf

    https://github.com/pikepdf/pikepdf

  • paperless-ng error raspberry pi4
    3 projects | /r/selfhosted | 8 Dec 2021
    sudo apt install libjpeg-dev curl -OL https://github.com/qpdf/qpdf/releases/download/release-qpdf-10.3.2/qpdf-10.3.2.tar.gz tar -xf qpdf-10.3.2.tar.gz cd ./qpdf-10.3.2 ./configure; make; sudo make install sudo ldconfig pip3 install --user pikepdf # --> This should work now!
  • PostScript Language Reference [pdf]
    4 projects | news.ycombinator.com | 18 Apr 2021
    I think you're describing stream compression, which appears to be utterly ubiquitous to the point that the knobs to turn it off have either technically bitrotted or faded well below our collective awareness threshold.

    After poking around a bit I noticed ps2pdf supports a "CompressPages" option (https://web.mit.edu/ghostscript/www/Ps2pdf.htm), which might be what you're looking for.

    Alternatively you might use something like `qpdf --stream-data=uncompress input.pdf output.pdf`.

    qpdf (info: http://qpdf.sourceforge.net/, https://github.com/qpdf/qpdf) seems to be a good recommendation to add to the "mentally index the entire man page" list for anyone interested in PDF in general.

  • Extract Data from PDF
    3 projects | /r/golang | 11 Feb 2021
    UPDATE: We tried repairing the pdf in question and lo and behold, we got a result. As a tool for the repair we used qpdf (https://github.com/qpdf/qpdf/releases), after that the ledongthuc/pdf library had no hassle reading the data.

What are some alternatives?

When comparing pdf-lib and qpdf you can also consider the following projects:

PDFKit - A JavaScript PDF generation library for Node and the browser

pdfcpu - A PDF processor written in Go.

puppeteer - Node.js API for Chrome

PyPDF4 - A utility to read and write PDFs with Python

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

PDF.js - PDF Reader in JavaScript

markdown-preview-enhanced - One of the 'BEST' markdown preview extensions for Atom editor!

OpenPDF - OpenPDF is a free Java library for creating and editing PDF files, with a LGPL and MPL open source license. OpenPDF is based on a fork of iText. We welcome contributions from other developers. Please feel free to submit pull-requests and bugreports to this GitHub repository.

labelmake - labelmake has moved and now available at pdfme / https://github.com/pdfme/pdfme

docx - Easily generate and modify .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.

react-pdf - 📄 Create PDF files using React

svg2pdf.js - A javascript-only SVG to PDF conversion utility that runs in the browser. Brought to you by yWorks - the diagramming experts