[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to delete attachments in PDFs



On Tue, 2025-06-17 at 14:43 -0400, Dan Ritter wrote:
Jerome BENOIT wrote:
Hi Dan, thanks for your reply.

I should precise that the PDF was downloaded.


The poppler-utils package contains:

  * pdfdetach -- lists or extracts embedded files (attachments)
  * pdfseparate -- page extraction tool
  * pdfunite -- document merging tool

Which together may or may not do what you want.

pdftk does a lot of things.

DESCRIPTION
If PDF is electronic paper, then pdftk is an electronic staple-remover,
hole-punch, binder, secret-decoder-ring, and X-Ray-glasses. Pdftk is a
simple tool for doing everyday things with PDF documents. Use it to:

* Merge PDF Documents or Collate PDF Page Scans
* Split PDF Pages into a New Document
* Rotate PDF Documents or Pages
* Decrypt Input as Necessary (Password Required)
* Encrypt Output as Desired
* Fill PDF Forms with X/FDF Data and/or Flatten Forms
* Generate FDF Data Stencils from PDF Forms
* Apply a Background Watermark or a Foreground Stamp
* Report PDF Metrics, Bookmarks and Metadata
* Add/Update PDF Metrics, Bookmarks or Metadata
* Attach Files to PDF Pages or the PDF Document
* Unpack PDF Attachments
* Burst a PDF Document into Single Pages
* Uncompress and Re-Compress Page Streams
* Repair Corrupted PDF (Where Possible)

"Detach" doesn't appear in the list. The "unpack_files" operation copies attachments into separate files. It's not clear whether "burst" does with attached files.



Reply to: