How to Extract Comments and Attachments from a PDF
Published by PDFToolz · Updated · Technical references listed below
To extract comments from a PDF, open it in a tool that reads the comment layer and export the list as a CSV, Markdown or JSON file, or use Export All To Data File or Create Comment Summary in Adobe Acrobat. To extract attachments, open the attachments list and save each embedded file, or pull every file out at once into a ZIP. PDFToolz does both for free in your browser, without Acrobat.
Comments and attachments are stored in different parts of a PDF, so they need different tools. This guide explains where each one lives, how to export PDF comments to Excel, how to summarize comments in Acrobat, how to extract embedded files and portfolio attachments, and why some PDFs show nothing to extract.
Where comments and attachments live in a PDF
Comments are annotations. A sticky note, highlight, text box, drawing or stamp is a separate object attached to a page, with its own author, date, color and text. The page content underneath doesn't change, which is why comments can be listed, exported or removed without touching the page.
Attachments are whole files stored inside the PDF. They sit in one of two places. The document's embedded files list, which Acrobat shows in its Attachments panel, holds files attached to the document as a whole. A file attachment annotation pins a file to a spot on a page, shown as a paper clip or pin icon. The PDF standard defines both, so a tool that checks only one place can miss files.
- A highlight stores the shaded area, not the words under it.
- A reply is an annotation that points to the comment it answers.
- An embedded file keeps its original bytes and name, and often a date and a description.
- A PDF portfolio is a PDF built around a set of embedded files.
How to export comments from a PDF for free
PDFToolz Extract PDF Comments reads every annotation in the file and writes one entry per comment. Each entry has the page, type, author, date, note text, color, the comment it replies to and its review status. For highlights, underlines and strikethroughs it also recovers the words under the mark by matching the marked area against the page text.
The PDF is read in your browser on Windows, Mac, iPhone or Android. Nothing is uploaded and you don't need an account.
- Open Extract PDF Comments and select the PDF.
- Check the list. Comments appear by page, with replies indented under the comment they answer. The screen shows the first 200 comments, and the export always has all of them.
- Pick CSV for Excel or Google Sheets, Markdown for notes and tickets, or JSON for scripts.
- Press Export comments, then Download. The file is named after the PDF with -comments added, such as contract-comments.csv.
Export PDF comments to Excel or Google Sheets
Choose CSV. The file is UTF-8 with a byte order mark, so Excel shows accents and non-Latin text correctly when you double-click it. In Google Sheets, open File, choose Import and upload the CSV. Line breaks inside a comment stay inside one cell.
Sort by Page to work through the document in order or by Author to split the work between reviewers. Filter the Status column to find comments nobody has accepted or rejected yet. A comment that starts like a formula, such as =SUM(A1) or @name, gets a leading apostrophe, so Excel shows it as text and doesn't run it.
| Column | What it holds |
|---|---|
| Number | The comment's position in the list |
| Page | The page the comment sits on |
| Type | A plain name such as Note, Highlight, Drawing or Stamp |
| Author | The name the PDF app saved with the comment |
| Date | When the comment was last changed, as the file wrote it |
| Comment | The note text |
| Marked text | The words under a highlight, underline or strikethrough |
| Reply to | The number of the comment this one answers |
| Status | The latest review status, such as Accepted or Rejected |
| Color | The comment color as a hex code, such as #ffff00 |
How to export or summarize comments in Acrobat
Acrobat keeps its comment exports in the options menu of the comments list. Export All To Data File saves the comments as an FDF or XFDF file. That file holds only the comments, and you or another reviewer can import it into the same PDF with Import Data File. Export Selected To Data File does the same for the comments you select. You can't open an FDF or XFDF file on its own, so the format suits moving comments between copies of a PDF, not reading them in a spreadsheet.
Create Comment Summary builds a new PDF that lists the comments. You choose a layout, a sort order, a page range and whether to include all comments or only the ones currently shown. Acrobat opens the summary as a separate PDF, ready to save or print.
- Open the PDF in Acrobat and open the comments list.
- Open the options menu at the top of the list.
- To export, choose Export All To Data File and pick FDF or XFDF as the file type.
- To summarize, choose Create Comment Summary, set the layout, sort order and pages, then create the summary and save it as a PDF.
Ways to extract PDF comments compared
Pick the method by what you do next with the comments. A spreadsheet needs CSV. A printed review pack needs a summary PDF. Moving comments into another copy needs FDF or XFDF.
| Method | Output | Best for | What you need |
|---|---|---|---|
| PDFToolz Extract PDF Comments | CSV, Markdown or JSON file | Spreadsheets, task lists and scripts | A web browser |
| Acrobat, Export All To Data File | FDF or XFDF data file | Importing comments into another copy of the PDF | Adobe Acrobat |
| Acrobat, Create Comment Summary | A new PDF that lists the comments | Printed review packs | Adobe Acrobat |
| Copy and paste by hand | Whatever you paste into | A handful of comments | Any PDF viewer |
How to extract attachments from a PDF
PDFToolz Extract PDF Attachments lists every embedded file with its name, type, size, the date it was last changed and where it sits, in the attachments panel or on a page. Files come out as the exact bytes that were embedded, so a spreadsheet stays the same spreadsheet. A file listed in both places is saved once.
This is also how you get the XML data out of a ZUGFeRD or Factur-X e-invoice. The invoice data is an embedded XML file, often named factur-x.xml or zugferd-invoice.xml, and you save it like any other attachment.
- Open Extract PDF Attachments and select the PDF.
- Check the list of embedded files and any description saved with each one.
- Press Save next to one file, or press Extract attachments to get them all. One file downloads as itself, and two or more come in a ZIP named after the PDF.
- On iPhone and iPad the files go to Downloads in the Files app. On Android, Windows and Mac they go to your Downloads folder.
Save PDF attachments in Adobe Acrobat
In Acrobat on Windows, select Menu, then View, Show/Hide, Side panels and Attachments. On a Mac, the path starts at View. The panel lists every file attached to the document. Right-click a file to open it or save it to a folder.
Acrobat and Acrobat Reader refuse to open attachment types they treat as a risk, such as programs. Since the August 2018 release, the blocked list also covers macro-enabled Office files such as .xlsm, .docm and .pptm. If you trust the PDF and need one of those files, Extract PDF Attachments saves it without opening or running it. Scan it with your antivirus before you open it.
Extract files from a PDF portfolio
A PDF portfolio, also called a PDF package, wraps several files into one PDF. Each file keeps its own format, so one portfolio can hold PDFs, spreadsheets, emails and images. In Acrobat, select a file in the portfolio and use Extract From Portfolio to save it to a folder.
Portfolio files are stored as embedded files, so Extract PDF Attachments lists them too. It doesn't recreate portfolio folders, and every file goes into one folder of the ZIP. A viewer that doesn't support portfolios shows only the cover page. Extract PDF Attachments reads the embedded files directly, so it also works on a phone.
Why a PDF shows nothing to extract
An empty result usually means the marks or files you see are not stored the way the tool looks for them.
- The comments were flattened or printed into the page. They are now page content, so no tool can list them as comments.
- The PDF is a scan of a marked-up paper copy. Pen marks and sticky notes are pixels in the image.
- The Marked text column is empty for a highlight. The page is a scan with no text layer, so there are no words to match. The note itself still exports.
- Links and form fields are annotations in the file format, but they are not comments, so the comment export leaves them out.
- An attachment only points to a file on another computer. The PDF holds a path and no data, so there is nothing to save.
- Pictures on a page are page content, not attachments. Save them with Extract Images instead.
- The PDF asks for a password to open. Remove it with Unlock PDF first, using the password you know.
Clean up the PDF after you extract
Once the comments are in a spreadsheet, you may want a clean copy of the PDF to send on. Remove Annotations deletes every comment, highlight, drawing, stamp and pinned file in one pass and leaves the page content untouched. You choose whether links and form fields stay.
To strip embedded files from the attachments panel along with other hidden data, use Sanitize PDF. Keep the original if you might need the comments or files again.
Key takeaways
- ✓Comments are annotations on each page, and attachments are whole files stored inside the PDF.
- ✓PDFToolz Extract PDF Comments exports every comment to CSV, Markdown or JSON, with the words under each highlight.
- ✓Acrobat exports comments as FDF or XFDF and builds a printable summary with Create Comment Summary.
- ✓PDFToolz Extract PDF Attachments saves embedded files, paper clip files and portfolio files unchanged, singly or as a ZIP.
- ✓Flattened, printed or scanned comments are part of the page and can't be extracted as comments.
Tools for the job
Frequently asked questions
How do I export comments from a PDF?
Open the PDF in PDFToolz Extract PDF Comments, pick CSV, Markdown or JSON and press Export comments. Every note, highlight and reply is saved with its page, author and date. In Acrobat, use Export All To Data File or Create Comment Summary from the options menu of the comments list.
How do I export PDF comments to Excel?
Export the comments as CSV with Extract PDF Comments and open the file in Excel. Each comment is one row, with columns for page, type, author, date, comment, marked text, reply, status and color.
How do I summarize comments in Adobe Acrobat?
Open the comments list, open its options menu and choose Create Comment Summary. Pick a layout, sort order and page range, then create the summary. Acrobat opens it as a new PDF you can save or print.
How do I extract embedded files from a PDF?
Open the PDF in PDFToolz Extract PDF Attachments and press Extract attachments. One file downloads as itself and several come in a ZIP. In Acrobat, open the Attachments panel and save each file from there.
How do I get files out of a PDF portfolio?
In Acrobat, select a file in the portfolio and use Extract From Portfolio. Without Acrobat, open the portfolio in Extract PDF Attachments. It lists the files inside and saves them all in one ZIP, without the portfolio's folders.
Why can't Acrobat open an attachment in my PDF?
Acrobat blocks attachment types it treats as a risk, including macro-enabled Office files such as .xlsm and .docm since the August 2018 release. Extract PDF Attachments saves the file without opening it. Scan it with your antivirus before you open it.
Can I extract comments and attachments from a PDF without Acrobat?
Yes. Extract PDF Comments and Extract PDF Attachments run in a web browser on Windows, Mac, iPhone, iPad and Android. They are free, need no account and read the PDF on your device without uploading it.
Related terms
Sources and further reading
- Importing and exporting comments from Adobe Acrobat Help
- Print comments from Adobe Acrobat Help
- Open attachments in PDFs in Adobe Acrobat from Adobe Acrobat Help
- Working with component files in a PDF Portfolio from Adobe Acrobat Help
- Unable to open macro-enabled Microsoft Office files attached to a PDF from Adobe Acrobat Help
- Sponsored standards, including ISO 32000-2 (PDF 2.0) from PDF Association
Browse all PDF guides, look up a term in the PDF glossary, or head back to the PDFToolz toolkit.