podofo

C++17 library for reading, writing, and modifying PDFs: full-featured low-level Unicode text extraction (with CJK support), text drawing with automatic CID encoding and font subsetting, incremental-update saving, PAdES-B digital signing (RSA/ECDSA, async), and PDF/A and PDF/UA compliance preservation when adding annotations or form fields. Does not yet render PDF content, and text shaping/kerning is limited.

Sample Results

Real output from running this tool against a sample PDF, as part of PDFog's open-source PDF tooling benchmark.

Input: sample-brochure.pdf

Loading PDF…

pdfinfo

podofopdfinfo "sample-brochure.pdf" >"sample-brochure--podofo-cpp--pdfinfo.txt"

Output: sample-brochure--podofo-cpp--pdfinfo.txt

Document Info
-------------
	File: pdf-inputs/sample-brochure.pdf
	PDF Version: 1.4
	Page Count: 1
	Page Size: 595 x 842 pts

	Fast Web View Enabled: No
	Tagged: No
	Encrypted: No
	Printing Allowed: Yes
	Modification Allowed: Yes
	Copy&Paste Allowed: Yes
	Add/Modify Annotations Allowed: Yes
	Fill&Sign Allowed: Yes
	Accessibility Allowed: Yes
	Document Assembly Allowed: Yes
	High Quality Print Allowed: Yes

Classic Metadata
----------------
	Author: 
	Creator: 
	Subject: 
	Title: Real Estate Example Page
	Keywords: 
	Trapped: 

Page Info
---------
Page Count: 1
Page 0:
->Internal Number:1
->Object Number:3 0 R
	MediaBox: [ 0.000000 0.000000 595.000000 842.000000 ]
	Rotation: 0
	# of Annotations: 2

	Annotation 0
		Type: 1
		Contents: 
		Title: 
		Flags: 0
		Rect: [ 46.346500 739.000300 167.846500 752.406600 ]
		Open: false
		Link Target: 1

	Annotation 1
		Type: 1
		Contents: 
		Title: 
		Flags: 0
		Rect: [ 46.346500 741.543300 167.846500 806.043300 ]
		Open: false
		Link Target: 1
Outlines
--------
>221 Queen Street, Melbourne VIC 3000	Destination: Page #1
Names
-----
		None Found

txtextract

podofotxtextract "sample-brochure.pdf" >"sample-brochure--podofo-cpp--txtextract.txt"

Output: sample-brochure--podofo-cpp--txtextract.txt

(558.298,551.846) $1,000,000 
(31.525,92.500) 221 Queen Street, Melbourne VIC 3000 
(31.525,92.500) apartment 
(31.525,92.500) 2 
(31.525,92.500) 1 
(31.525,92.500) 1 
(105.195,93.823) Prince Cascading 
(105.195,93.823) 1234-5678 
(105.195,93.823) Additional Information 
(105.195,93.823) Land Size 
(105.195,93.823) House Size 
(105.195,93.823) Map Ref. 
(105.195,93.823) Energy Rating 
(105.195,93.823) Council Rates 
(105.195,93.823) Water Rates 
(105.195,93.823) 1171m2 
(105.195,93.823) - 
(105.195,93.823) - 
(105.195,93.823) - 
(105.195,93.823) - 
(105.195,93.823) - 
(105.195,93.823) WARM BEAUTIFUL APARTMENT 
(105.195,93.823) Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc turpis ante, fermentum ac 
(105.195,93.823) cursus vitae, tempus vel ipsum. Proin justo lorem, mattis sed pharetra ac, vehicula 
(105.195,93.823) tincidunt sem. Mauris est leo, scelerisque at gravida vel, interdum quis felis. Nullam 
(105.195,93.823) nibh magna, consectetur eu aliquet ac, sollicitudin eget nisl. Praesent nibh tellus, 
(105.195,93.823) elementum ut scelerisque a, pretium eget libero. Morbi sodales tincidunt turpis et 
(105.195,93.823) sagittis. Aenean sed dictum nisi. 
(105.195,93.823) Phasellus quis metus lectus. Donec varius pellentesque purus, et ornare enim 
(105.195,93.823) pellentesque sed. Morbi quam augue, pulvinar sit amet mollis in, euismod porta orci. 
(105.195,93.823) Quisque rutrum egestas enim ac viverra. Mauris blandit tristique feugiat. Ut molestie 
(105.195,93.823) molestie turpis sed elementum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
(105.195,93.823) Maecenas in nunc odio. Nunc sagittis, mi ut ornare pellentesque, orci augue dapibus 
(105.195,93.823) est, vel rutrum elit orci vel augue.