Skip to content

Portable Document Format (PDF)

November 24, 2023
October 27, 2018

Types of PDF - Computerphile - YouTube

Convert document, image, video and audio files online
How to Merge PDF Files in Linux - It's FOSS

不想花錢的進來!如何用免費工具擊潰 PDF 文件的重重防線! - YouTube
PDF 轉檔 https://pdf.new
PDF 壓縮 https://compresspdf.new
PDF 簽署 https://sign.new

Viewers

Free PDF Reader - Sumatra PDF

Poppler PDF rendering library

zathura - pwmt.org

PDFObject: A JavaScript utility for embedding PDFs uses browser's native support

GUI Editors

The 8 Best PDF Editor Apps
11 Best Linux PDF Editors You Can Use in 2022
Best free PDF editor 2022 | TechRadar

Page manipulation:
Split and merge PDF files. Free and open source - PDFsam
PDF Chain Project Page - Welcome
PDF Mix Tool | scarpetta.eu
muriloventuroso/pdftricks: A simple, efficient application for small manipulations in PDF files using Ghostscript.
pdfarranger/pdfarranger: Small python-gtk application, which helps the user to merge or split PDF documents and rotate, crop and rearrange their pages using an interactive and intuitive graphical interface.
junrrein/pdfslicer: A simple application to extract, merge, rotate and reorder pages of PDF documents

Annotation:
Xournal++ - Xournal++
Sejda helps with your PDF tasks
PDFedit - pdf manipulating library, GUI, tools
Okular - The Universal Document Viewer KDE
Master PDF Editor for Linux. Download a free of Master PDF Editor for Linux. watermark if unregistered

Toolkits

11 of the Best Free Linux PDF Tools - LinuxLinks

Ghostscript - Wikiwand
pdftex - Why does PDFSIZEOPT not reduce file size much? - TeX - LaTeX Stack Exchange gs is better

How to convert pdf to image on Linux command line - nixCraft

pdftoppm <input.pdf> <output> -jpeg
pdftoppm <input.pdf> <output> -jpeg
pdftoppm -f <start_page> -l end_page -jpeg

diff-pdf
Sejda SDK - a Java library to edit PDF files

PDF processor api & cli | pdfcpu
pdfcpu/pdfcpu: A PDF processor written in Go.

Coherent PDF Command Line Tools and C/C++/Python/.NET/Java/JavaScript API Community Release non-commercial use

PDFtk

PDFtk - The PDF Toolkit
Manipulating PDFs with the PDF Toolkit | Linux.com | The source for Linux information

# merge PDF
pdftk first.pdf second.pdf cat output merged.pdf
# extract pages
pdftk input.pdf cat 1 5-7 output extract.pdf

STAMPtk - The PDF Stamp Maker
How to Add Headers, Footers, Watermarks and Stamps to PDF

QPDF

QPDF: A Content-Preserving PDF Transformation System
How to view and edit the code of a PDF file - Unix & Linux Stack Exchange

# decompress PDF
qpdf --qdf --object-streams=disable orig.pdf expanded.pdf
# recompress PDF
qpdf expanded.pdf orig2.pdf

pdfsizeopt

pts/pdfsizeopt: PDF file size optimizer Python 2, use Docker image

pdfsizeopt --do-require-image-optimizers=no original.pdf optimized.pdf

#!/bin/sh
exec docker run -v "$PWD:/workdir" -u "$(id -u):$(id -g)" --rm -it ptspts/pdfsizeopt pdfsizeopt "$@"

gs

Ghostscript
Welcome to Ghostscript — Ghostscript documentation
Optimization of the Sizes of PDF Files on Linux | Baeldung on Linux

theeko74/pdfc: Simple python script to compress PDF Python 3, calls gs
aklomp/shrinkpdf: Shrink PDF files with Ghostscript
如何減小掃描的 PDF 文件的文件大小? - Ubuntu 問答

# `-dPDFSETTINGS=` specifies the quality/resolution of the output PDF. You can choose from the following:
# - `-dPDFSETTINGS=/screen` (72 dpi images)
# - `-dPDFSETTINGS=/ebook` (150 dpi images)
# - `-dPDFSETTINGS=/printer` (300 dpi images)
# - `-dPDFSETTINGS=/prepress` (300 dpi images, color preserving)
# - `-dPDFSETTINGS=/default`
gs -quite -dNOPAUSE -dBATCH -dSAFER \
  -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook \
  -dEmbedAllFonts=true -dCompressFonts=true -dSubsetFonts=true \
  -dColorImageDownsampleType=/Bicubic -dColorImageResolution=144 \
  -dGrayImageDownsampleType=/Bicubic -dGrayImageResolution=144 \
  -dMonoImageDownsampleType=/Bicubic -dMonoImageResolution=144 \
  -sOutputFile=optimized.pdf original.pdf

gs -dNOPAUSE -dBATCH -dSAFER \
  -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer \
  -dCompressFonts=true -dSubsetFonts=true -dSubsetFonts=true \
  -dColorImageDownsampleType=/Bicubic -dColorImageResolution=200 \
  -dGrayImageDownsampleType=/Bicubic -dGrayImageResolution=200 \
  -dMonoImageDownsampleType=/Bicubic -dMonoImageResolution=200 \
  -sOutputFile=optimized.pdf -f original.pdf

JavaScript

React-pdf
diegomura/react-pdf: 📄 Create PDF files using React

React-PDF PDF reader component (using PDF.js)
mikecousins/react-pdf-js: A React component to wrap PDF.js

PDF.js Mozilla's lib (1.8MB)
mozilla/pdf.js: PDF Reader in JavaScript
Rendering PDF Files in the Browser with PDF.js | PSPDFKit
How to Create a JavaScript PDF Viewer
How to Build a PDF Viewer With React & PDF.js | PDFTron
Pdf.js is not rendering the large size pdf files · Issue #10236 · mozilla/pdf.js
Frequently Asked Questions · mozilla/pdf.js Wiki
Frequently Asked Questions · mozilla/pdf.js Wiki
PDF.js Rendering Quality the Complete Guide | PDFTron
How Reliable is PDF.js? See Reliability Benchmark | PDFTron
How to Evaluate PDF.js: A Complete PDF.js Guide | PDFTron

javascript - Huge PDF takes time to render while scrolling using pdfviewer.js - Stack Overflow

PDFKit
Generating PDF Files in Node.js with PDFKit

jsPDF - HTML5 PDF Generator | Parallax
RelaxedJS/ReLaXed: Create PDF documents using web technologies

Tea-School.js — Generate a PDF File From HTML And CSS in Node.js

C

Home of PDFsharp and MigraDoc Foundation - PDFsharp & MigraDoc
PDFsharp Overview - PDFsharp & MigraDoc
MigraDoc Overview - PDFsharp & MigraDoc
Main Page - PDFsharp and MigraDoc Wiki

Python

Create and Modify PDF Files in Python – Real Python
Chapter 13 – Working with PDF and Word Documents - Automate the Boring Stuff with Python

pikepdf Documentation QPDF wrapper

PyFPDF
reingart/pyfpdf: Simple PDF generation for Python (FPDF PHP port)
Creating PDFs with PyFPDF and Python - The Mouse Vs. The Python

PyPDF2 Documentation
How to Work With a PDF in Python – Real Python
An Intro to PyPDF2 | The Mouse Vs. The Python

Free and Open source PDF generator library! | pdfme define template and insert data

PDFMiner
pmaupin/pdfrw: pdfrw is a pure Python library that reads and writes PDFs

stapler · PyPI
hellerbarde/stapler: A small utility making use of the pypdf library to provide a (somewhat) lighter alternative to pdftk

WeasyPrint

Home Page - WeasyPrint HTML to PDF in Python
WeasyPrint — WeasyPrint documentation
Samples - WeasyPrint source

WeasyPrint recipe
Creating PDF Reports with Pandas, Jinja and WeasyPrint - Practical Business Python
Python PDF Generation from HTML with WeasyPrint - DEV Community

If <body> is present in input, there will only be one page in output PDF.

WeasyPrint Performance Report

wkhtmltopdf

wkhtmltopdf
wkhtmltopdf/wkhtmltopdf: Convert HTML to PDF using Webkit (QtWebKit)

rockdaboot/invoice-html5-to-pdf: Batch HTML5 to PDF invoice generation on the command line