1. Download the software.
You may have already downloaded and unzipped the Xpdf tools while watching the
first video in the Xpdf series, but if you haven't, then visit the
Xpdf website. Click the Download link and then click the pre-compiled Windows binary ZIP archive to download the utilities for Windows.
2. Locate the documentation folder for the Xpdf utilities.
Go to the folder where you unzipped the downloaded ZIP file and find the <doc> folder.
3. Read the documentation for the PDFdetach tool.
Go into the <doc> folder and find the plain text file called <pdfdetach.txt>.
Open it with any text editor, such as Notepad, and read it. This is the documentation for the PDFdetach tool.
4. Set up a test folder.
Create a test folder.
Copy <pdfdetach.exe> from the unzipped <bin32> folder into your test folder.
Copy a sample PDF file that has attachments into your test folder (in the video and the screenshots below, the file is called test.pdf, which is a PDF file created from my EE article,
Windows 10 uses YOUR computer to help distribute itself, but with some attachments added to it).
5. Set up a command prompt for testing.
Open a command prompt window.
Navigate to your test folder.
Issue a DIR command in the command prompt to be sure that only two files are in it - the PDFdetach executable and the sample PDF file.
6. View and extract attachments in the test file using Adobe Acrobat or any PDF reader/viewer.
The exact technique depends on what PDF product you use, but, for example, in Adobe Acrobat and Adobe Reader, click the paper clip icon to open the Attachments pane, Select All of the attachments, then click the Save Attachment icon. The purpose of this step is simply to validate the existence of attachments in the test PDF file.
7. Issue DIR command to show that the files were extracted.
Run a DIR command to confirm that the files were extracted, but then delete them in preparation for using PDFdetach.
8. Run PDFdetach with the -list option.
Issue this command:
pdfdetach -list test.pdf
This will show a list of all the attachments in your test PDF file.
9. Run PDFdetach with the -saveall option.
Issue this command:
pdfdetach -saveall test.pdf
This will detach all the attachments in your test PDF file and save each one in a separate file. Issue a DIR command to show that PDFdetach was successful.
![Step9]()
That's it! If you find this video to be helpful, please click the
thumbs-up icon below. Thank you for watching!