frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: PDFx – a 2D canvas for multiple PDFs, stored inside a single PDF

https://github.com/alexandrosgounis/pdfx/
1•gounisalex•1h ago
I was asked to provide 17 PDF files for my mortgage application. I got tired of opening and closing files, and started looking for ways to process multiple PDFs at once.

I came across Adobe's portfolio spec, but that only renders correctly in Acrobat, every other PDF viewer only displays the cover page of each document. So I asked something simpler: what if I could scroll horizontally to see the pages of one document and then vertically to see more documents? I achieved that via an embedded JSON manifest as a standard PDF file attachment.

This enabled bundling multiple PDFs into a single, backwards-compatible PDF. When opened with a regular viewer (Chrome, Acrobat, Preview), it reads as a long, continuous document. When imported into the react-based app I built (PDFx), it's rendered in a 2D canvas, where each document is displayed as a separate entity.

I would highly appreciate your feedback, please let me know if any other open spec exists that I might have missed.