Document Security
·
10 min read

Embedded Files and PDF Portfolios: What Travels Inside

PDFs can carry other files inside them. How portfolios and attachments work, why they matter for confidentiality, and how to check before sharing.

A notebook, pen and phone on an orange surface
On this page (16 sections)▼

TL;DR: A PDF can carry other files inside it, as attachments or as a portfolio that wraps a whole collection. Those files travel wherever the PDF goes, so check what is embedded before you share, understand how archival profiles treat attachments, and choose a simpler format when you do not need the extras.

A PDF is sometimes a container

Most people think of a PDF as a document with pages. The format is more flexible than that. It can hold annotations, form fields, metadata and, importantly, other files. A spreadsheet can be attached to a report, a set of source documents can be bundled into one wrapper and an archive file can be embedded in an unrelated-looking PDF. That flexibility is useful, and it is also a way for information to travel without anyone noticing.

This guide explains what embedded files and portfolios are, why they matter for confidentiality and how to check for them. It draws on the Library of Congress descriptions of the PDF family, PDF/A and PDF 2.0 and on Microsoft's notes about hidden data, and it is general information, not security-engineering advice. It belongs to the cluster introduced in the PDF security guide.

What the Library of Congress says

A smartphone with a blank screen on a white surface

The Library of Congress describes a PDF portfolio as the common name for a portable collection defined in the PDF specifications: a collection of PDF files or other files as attachments within a PDF wrapper. See its description of the PDF family. The same page describes the PDF family as a set of formats designed for exchanging and viewing documents independent of the environments in which they were created.

For archival profiles, the Library's description of the PDF/A family explains that PDF/A-2 allowed the embedding of PDF/A-compliant attachments and that PDF/A-3 added a single and highly significant feature, permitting the embedding of a file or files in any format. It notes that the intent expressed by many proponents is that embedded files not be considered part of the archival payload, but that use cases are emerging where embedded files would likely warrant preservation by archival institutions. See the PDF/A family description.

The PDF 2.0 description adds another use of embedding: custom security handlers are supported by permitting an encrypted file that uses a mechanism not part of the standard to be embedded in an unencrypted wrapper document, with the wrapper giving guidance on how to decrypt the payload. The takeaway is that PDFs can nest files in several legitimate ways.

Why embedded content matters for confidentiality

Embedded files are easy to forget. A person may attach a source workbook to a PDF to help reviewers, forget that it is there and then send the PDF to a wider audience. Anyone who opens the PDF's attachments panel can extract the workbook, including hidden sheets and formulas. A portfolio may contain several documents that were meant for different recipients. A PDF exported from a tool that adds attachments by default may carry files you did not choose.

There is also a security angle for incoming files. A PDF with attachments is a convenient wrapper for something unexpected. CISA's guidance on email attachments warns that attackers have great freedom because almost any type of file can be attached to an email; embedded files extend that idea inside the document. See the checklist in suspicious PDF attachments, which applies to the PDF as a whole and to anything inside it.

How to check what a PDF contains

A coral notebook on a textured wall

Use a routine that looks at the container, not just the pages.

  1. Open the attachments panel in your reader. Most major readers have a panel that lists embedded files. If it lists anything, note names, sizes and dates.
  2. Check whether the file is a portfolio. A portfolio opens in a different layout, showing a list of component files.
  3. Look at the file size. A short document with a large size may contain embedded content or large images.
  4. Review properties and metadata for oddities. The article on removing PDF metadata safely explains what to look for.
  5. Use a tool that lists embedded objects if you work with sensitive files regularly. A command-line tool for PDFs can list attachments; use the same tool each time and record its version.

Do this on a copy, and treat any unexpected attachment as a finding to investigate rather than something to open casually.

Prevent unwanted attachments at the source

The best approach is to avoid creating them. When you export from Office or another application, check the export options and avoid embedding source files unless needed. Microsoft's guidance explains that exporting a PDF lets you choose items such as document properties and structure tags; review every option each time. The guide on inspecting Office files before PDF export includes a routine for the source file. If a workflow needs attachments, document why and who approved it.

If a PDF is the product of merging several documents, check each component first. The existing guide on merging protected PDFs safely explains how merging can combine settings and contents in surprising ways. When you compress or optimize a file, check whether the tool removed or retained embedded content; see compressing protected PDFs safely.

Share portfolios deliberately

A tablet and a phone on a wooden table

A PDF portfolio can be a neat way to deliver a set of documents. If you use one, list its contents in the covering message and check that each component is meant for each recipient. Consider whether separate files with separate controls would be safer. A recipient who receives a portfolio gets every component; you cannot give one person access to one part of it unless you create separate files.

For confidential material, a managed room or a link-based folder with per-user permissions is usually better than a portfolio, because you can set access by file, see who opened what and revoke access. The guide on sharing a PDF as a link describes the controls.

Archives and attachments

If you keep documents for the long term, decide how to treat attachments. Under PDF/A-1, attachments are not permitted; under PDF/A-2 they must themselves be PDF/A-compliant; under PDF/A-3 they can be any format. The more freedom the profile gives, the more important it is to record what is inside. The guide on PDF/A for archiving explains the profiles and the trade-offs. Add a step to your archiving routine: list attachments, record them in the catalog and decide whether they are part of the record.

Encryption and embedded files

Encryption interacts with attachments in two ways. First, according to the qpdf documentation, in a PDF file only strings and streams are encrypted, and embedded files are streams, so encryption protects them as part of the file, though the standard allows separate handling for embedded files in the newer encryption scheme. Second, because an encrypted file's attachments are accessible to anyone who can open the file, password protection does not limit access to individual attachments. If you need to separate who sees which attachment, use separate files.

For more on how encryption works, see the explainer on PDF encryption and the glossary.

A hypothetical example

This scenario is invented to illustrate the risk. An analyst prepares a PDF report for a client and attaches the underlying workbook so that the client's staff can follow the calculations. She forgets that the workbook contains a hidden sheet of internal cost assumptions. The client forwards the PDF to a supplier for comment. The supplier opens the attachments panel and finds the workbook. After the incident, the analyst's firm adds two steps to its release checklist: open the attachments panel on every PDF and, for any attached workbook, run the same inspection routine used for spreadsheets. Where a workbook must be shared, it goes as a separate file with its own controls.

Common mistakes

  • Forgetting that attachments travel with the PDF.
  • Attaching source files that contain hidden data.
  • Sending a portfolio when different recipients should see different parts.
  • Assuming a password limits access to individual attachments.
  • Not checking merged or compressed files for embedded content.
  • Treating PDF/A-3 files as if they could not contain arbitrary files.

A checklist for sending a PDF with attachments

If you must send a PDF that contains attachments, confirm that each attachment is intended for this recipient, has been inspected for hidden data, is named clearly and is listed in your covering message. Record the file names and versions. Test the PDF in a second reader to confirm that the attachments panel shows what you expect, and that no extra items appear.

Embedded content you did not add

Sometimes embedded content arrives from a tool or a colleague rather than from you. Scanning software may attach a text file, a form tool may embed data, and a merge may carry attachments from source files. When you receive a PDF from someone else and plan to forward it, apply the same checks. Treat attachments you did not add with suspicion, and ask the sender what they are. If the sender cannot explain them, do not forward the file.

What to tell recipients

When you deliberately include attachments, tell recipients how to find them and what they contain. Many people never open the attachments panel and will miss the information. For confidentiality, remind them that attachments travel with the PDF, and that forwarding the PDF forwards them as well. Clear instructions prevent both missed content and accidental disclosure.

Questions to ask a vendor or colleague

If a tool produces PDFs for you, ask whether it adds attachments or embedded data by default, whether that can be turned off and whether it records what it embedded. Ask the same of a colleague who sends you files: what is inside, and why? Clear answers prevent surprises, and unclear answers are a reason to check the file yourself before it goes further.

Official references

The Library of Congress PDF/A-1 format description lists the constraints that make an archival file self-contained, including the ban on encryption. CISA's page on using caution with email attachments explains why attachments are risky and what to do about unsolicited ones.

Frequently asked questions

The Library of Congress describes it as a collection of PDF files or other files as attachments within a PDF wrapper.

Open the attachments panel in your reader and check the file size, or use a tool that lists embedded objects.

PDF/A-2 allows PDF/A-compliant attachments and PDF/A-3 permits files in any format, according to the Library of Congress.

No. Anyone who can open the PDF can generally reach its attachments. Use separate files if access should differ.

Only if the recipient needs it and you have inspected it. Otherwise share it separately under its own controls.

Yes. They can carry unexpected content, so treat attachments in incoming PDFs with the same caution as any attachment.

Keep reading: PDF security

Sources and editorial disclosure

The pages below were opened and read on November 22 and 23, 2026 for the factual statements attributed to them. Agency guidance, standards descriptions and tool documentation change, so check the current text before relying on a version number, a setting or a recommendation.

VDR Directory is published by the SendNow team. This guide is general information about protecting documents, not legal or security-engineering advice; your counsel, security lead and the software you use decide what applies to your situation. Scenarios marked as hypothetical are invented for illustration and are not drawn from real clients or transactions. Stock photos illustrate the topic and do not show real files, systems or accounts.

More on PDF security

Encryption, passwords, hidden data, safe sharing, backups and disposal for confidential PDF files.

View all →
Ben Wallace

About the Author: Ben Wallace

Ben Wallace is an SEO analyst with hands-on experience in virtual data rooms and sales enablement. He writes about how data rooms are used, how document sharing supports sales teams, and how to compare providers.