.pdf file. Unlike a merged PDF where everything is flattened into one document, each file in a portfolio retains its original format: a Word document stays as a Word document, an Excel spreadsheet stays as an Excel spreadsheet, a PDF stays as a PDF. The portfolio provides a navigable wrapper with a customisable cover sheet, while the embedded files can be individually opened, extracted, or printed.
PDF Portfolios are defined in ISO 32000-2:2017 (PDF 2.0) via the /Collection dictionary. They were introduced in PDF 1.7 / Acrobat 8. Legal discovery production sets, financial reporting packages, and technical documentation bundles are the primary use cases.How portfolios differ from merged PDFs
Portfolio structure: the /Collection dictionary
/Collection dictionary in the document catalogue. The key entries:
/Schema — Defines the metadata fields for the embedded files that appear as columns in the portfolio navigator (Filename, Description, Date Modified, Size, etc.). Each schema field has a type (Text, Date, Number) and display properties.
/D (default sort field) — Specifies which schema field is used for default sorting.
/View — Controls the portfolio navigator display mode: /D (detail list), /T (tiled thumbnails), /H (hidden — the portfolio acts as an envelope without a visible navigator).
/Sort — Default sort direction (ascending/descending).
The embedded files themselves are stored as embedded file streams in the PDF's embedded files name tree (/EmbeddedFiles in the /Names dictionary). Each embedded file is a stream object with /Type /EmbeddedFile and attributes including creation date, modification date, MIME type, and a checksum. File attachment annotations reference these embedded file streams.
Navigator / Cover Sheet — The portfolio cover sheet is a standard PDF page (or sequence of pages) that forms the visible content of the portfolio document itself. Users without a portfolio-aware viewer see this cover page. Acrobat displays the portfolio navigator alongside it.Creating and extracting portfolios
pdftk input.pdf attach_files doc1.pdf doc2.xlsx output portfolio.pdf creates a PDF with file attachments (not a full portfolio with /Collection, but suitable for simpler use cases). pdftk portfolio.pdf unpack_files output_directory/ extracts embedded files.
Python with pypdf — pypdf can read embedded files from portfolios: iterate over reader.attachments to access embedded file data. For creating portfolios with a full /Collection structure, lower-level manipulation with pypdf's PDF writer or pikepdf is needed.
PDF/A-3 portfolios — For archival purposes, the embedded files can conform to PDF/A-3 (which allows arbitrary embedded files). The portfolio container itself should be PDF/A-3 compliant if long-term preservation is required. The /AFRelationship entry in each embedded file specification declares whether the file is a source, data, alternative, or supplement to the container PDF. This is the same mechanism used by ZUGFeRD/Factur-X invoice PDFs.