Skip to content

mattgallagher/CwlPdfLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CwlPdfLib

A standalone Swift package that implements large parts of PDF 1.4 parsing and rendering via CGContext. It's bigger than a simple "toy" parser but it's not really thorough enough for any serious use without substantial additional work. I was just curious to explore how PDF content streams were structured.

The core tokenising and parsing is handwritten Swift, with reference taken from Onyx2D from The Cocotron, Poppler, xpdf and pdfium. Some of the peripheral features I didn't really care about (encryption, font support, colorspaces, images, SMasks) came from some experiments with different agentic LLM models.

About

A simple PDF parser and CGContext renderer.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages