pdfdetach(1)

πŸ“¦
version 26.10.0 Β· 2 versions
  • 26.10.0 Β· alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 4.06 Β· nixpkgs unstable
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ NAME ✨

okay bestie, meet pdfdetach(1) πŸ’– it's a General Commands Manual page, and it's the pdfdetach tool for pulling embedded files (attachments) out of a Portable Document Format (PDF) file. It's version 3.03 and it's giving very organized πŸ“Žβœ¨

🧚 SYNOPSIS 🧚

pdfdetach [options] [PDF-file]

πŸ’… DESCRIPTION πŸ’…

ngl this one is so simple it's iconic 🫢 pdfdetach either lists the embedded files (attachments) hiding inside a PDF, or extracts them for you. that's it, that's the whole vibe πŸ’œ

πŸŽ€ OPTIONS πŸŽ€

Some of these options can also be set with configuration file commands. they're listed in square brackets next to the matching command line option, so keep an eye out for those πŸ‘€

  • -list β€” lowkey the first thing you'll want 🌸 it lists every embedded file in the PDF. the file names get converted to the text encoding picked with the -enc switch.
  • -save number β€” saves the embedded file with that number πŸ¦‹ by default it uses the file name attached to the embedded file (the same one -list shows you). you can rename it with the -o switch.
  • -savefile filename β€” also saves one embedded file, so it's giving the same energy as -save πŸ’– same default file name rule, and you can change it with -o too.
  • -saveall β€” saves every embedded file at once 🌈 it uses the file names from the embedded files (the ones -list prints). by default everything lands in the current directory, but -o can change that.
  • -o path β€” the file name used when saving with -save, or the directory used by -saveall πŸ“
  • -enc encoding-name β€” sets the encoding for text output (aka the embedded file names) ✨ it defaults to "UTF-8" so you're probably already set πŸ’…
  • -opw password β€” the owner password for the PDF πŸ”‘ heads up, giving this one bypasses all security restrictions, so use it responsibly bestie πŸ™ˆ
  • -upw password β€” the user password for the PDF πŸ”
  • -v β€” prints copyright and version info 🧾
  • -h β€” prints usage info πŸ’œ -help and --help do the exact same thing, so pick your fave 🫢

🚦 EXIT CODES 🚦

the Xpdf tools use these exit codes to tell you how things went:

  • 0 β€” no error, we ate πŸ”₯
  • 1 β€” couldn't open a PDF file πŸ’€
  • 2 β€” couldn't open an output file 😭
  • 3 β€” there's a permissions issue with the PDF πŸ”’
  • 99 β€” some other error, no clue what happened 🫠

πŸ‘‘ AUTHOR πŸ‘‘

the pdfinfo software and documentation are copyright 1996-2011 Glyph & Cog, LLC. the legends have been around forever 🌟

🌸 SEE ALSO 🌸


okay that's the whole tea, bestie πŸ’– this page was last updated 15 August 2011, and it's still pdfdetach(1) all the way 🧚✨

πŸ“¦ where this page comes from