Skip to content
Marc Jones edited this page Dec 30, 2025 · 4 revisions

PdfEditor Wiki

Welcome to the PdfEditor project wiki. This documentation covers the PDF file format internals, implementation details, and lessons learned during development.

171 pages of documentation including complete PDF 1.7 and PDF 2.0 specifications


Quick Navigation

Looking for... Go to...
PDF text operators (Tj, TJ) PDF-Spec-09-Text-Objects or PDF20-Spec-09-Text-Objects
Content stream structure PDF-Spec-07-Content-Streams or PDF-Content-Streams
Coordinate systems PDF-Coordinate-Systems
How redaction works Redaction-Engine
GUI application GUI-Application
CLI tool usage CLI-Tool
Third-party PDF libraries PDF-Libraries
Complete operator list PDF-Spec-Annex-A or PDF20-Spec-Annex-A

PDF Specifications

PDF 2.0 (ISO 32000-2:2020) - Current Standard

83 wiki pages - Complete specification with navigation

Resource Description
PDF20-Spec-Index Main index - Start here for PDF 2.0
PDF20-Spec-Glossary Quick concept reference with cross-links

Key Chapters for Redaction:

Chapter Topic Key Sections
Chapter 7 Syntax PDF20-Spec-07-Content-Streams, PDF20-Spec-07-Objects
Chapter 8 Graphics PDF20-Spec-08-Graphics-State, PDF20-Spec-08-Coordinate
Chapter 9 Text PDF20-Spec-09-Text-Objects, PDF20-Spec-09-Text-State

What's New in PDF 2.0: AES-256 encryption, geospatial features, enhanced Tagged PDF, PAdES signatures


PDF 1.7 (ISO 32000-1:2008) - Legacy Standard

69 wiki pages - Complete specification with navigation

Resource Description
PDF-Spec-Index Main index - Start here for PDF 1.7
PDF-Spec-Glossary Quick concept reference with cross-links

Key Chapters for Redaction:

Chapter Topic Key Sections
Chapter 7 Syntax PDF-Spec-07-Content-Streams, PDF-Spec-07-Objects
Chapter 8 Graphics PDF-Spec-08-Graphics-State, PDF-Spec-08-Path-Construction
Chapter 9 Text PDF-Spec-09-Text-Objects, PDF-Spec-09-Text-State

PDF Concepts (Project-Specific)

These pages explain PDF concepts in the context of our implementation:

Page Description
PDF-Text-Operators How text is rendered in PDFs (Tj, TJ, ', ")
PDF-Coordinate-Systems Understanding PDF vs screen coordinate systems
PDF-Font-Types-and-Encodings Font types, encodings, and character mapping
PDF-Content-Streams Structure of content streams and operator parsing

Project Documentation

Core Implementation

Page Description
Project-Architecture MVVM structure, service layer, design patterns
GUI-Application Desktop GUI - features, layout, workflow
Redaction-Engine How TRUE glyph-level redaction works
Redaction-Library-Implementation Modular redaction library with operator status
PDF-Libraries PdfPig, PDFsharp, PDFtoImage - how we use them

Tools & Automation

Page Description
CLI-Tool Command-line tool (pdfer) documentation
GUI-Automation Roslyn C# scripting for automation

Testing

Page Description
Testing-Strategies Test infrastructure, utilities, best practices
Testing-and-Development-Tools pdftotext, veraPDF, and other tools
veraPDF-Test-Corpus PDF/A test suite information
Atomic-Testing-with-veraPDF-Corpus Using corpus for focused testing
Progressive-Testing-Strategy Incremental testing approach

Lessons Learned

Page Description
Coordinate-Conversion-Challenges Solving coordinate system mismatches
Scrambled-Content-Stream-Problem Why text appears out of order in PDFs

Quick Reference

Text Showing Operators

Operator Purpose Example
Tj Show string (Hello) Tj
TJ Show array with kerning [(H) -10 (ello)] TJ
' Newline + show (Hello) '
" Set spacing + newline + show 0 0 (Hello) "

Coordinate Systems

System Origin Y Direction Used By
PDF Bottom-left Up PDF content streams
Avalonia Top-left Down UI rendering
Image Top-left Down Rendered bitmaps

Conversion: AvaloniaY = PageHeight - PdfY

CLI Commands

pdfer redact input.pdf output.pdf --text "SENSITIVE"
pdfer search input.pdf --text "KEYWORD"
pdfer verify output.pdf --text "SENSITIVE"
pdfer info input.pdf

External References

Primary Sources

Source Description
PDF Association Industry consortium maintaining PDF standards
ISO 32000-2:2020 Official PDF 2.0 specification
Adobe PDF Reference Adobe's reference documentation
PDF Cheat Sheets Quick reference for operators

Libraries We Use

Library Purpose
PdfPig Text extraction
PDFsharp PDF manipulation

Version History

Date Change Author
2024-12-30 Added PDF 2.0 Specification (83 pages) Claude + Marc
2024-12-30 Added PDF 1.7 Specification (69 pages) Claude + Marc
2024-12-29 Added CLI-Tool and GUI-Automation pages Claude + Marc
2024-12-29 Updated all pages for v1.4.0 (glyph-level redaction) Claude + Marc
2024-12-24 Added testing documentation Claude + Marc
2024-12-22 Initial wiki creation Claude + Marc

This wiki is maintained alongside the codebase. When implementations change, update the corresponding wiki pages.

Clone this wiki locally