[qpdf: Extracting PDF Streams](/forums/diary/qpdf+Extracting+PDF+Streams/31406/)================================================================================* * [](http://www.facebook.com/sharer.php?u=https%3A%2F%2Fisc.sans.edu%2Fforums%2Fdiary%2F31406 ‘Share on Facebook’)* [](http://twitter.com/share?text=qpdf%3A%20Extracting%20PDF%20Streams&url=https%3A%2F%2Fisc.sans.edu%2Fforums%2Fdiary%2F31406&via=SANS_ISC ‘Share on Twitter’) **Published** : 2024-11-02. **Last Updated** : 2024-11-02 13:08:21 UTC **by** [Didier Stevens](/handler_list.html#didier-stevens) (Version: 1) [0 comment(s)](/diary/qpdf+Extracting+PDF+Streams/31406/#comments) In diary entry ‘[Analyzing PDF Streams](https://isc.sans.edu/diary/Analyzing+PDF+Streams/30908)’ I answer a question asked by a student of Xavier: ‘how can you export all streams of a PDF?’. I explained how to do this with my [pdf-parser.py](https://blog.didierstevens.com/programs/pdf-tools/) tool.I recently found another method, using the open-source tool [qpdf](https://github.com/qpdf/qpdf). Since version 11, you can extract streams with qpdf.If you want the contents of the streams inside a single JSON object (BASE64 encoded), use this command:> qpdf.exe –json –json-stream-data=inline exampl.pdfAnd if you want the contents of the streams in separate files (filename prefix ‘stream’), use this command:> qpdf.exe –json –json-stream-data=file –json-stream-prefix=stream exampl.pdfDidier Stevens Senior handler [blog.DidierStevens.com](http://blog.DidierStevens.com) Keywords:[0 comment(s)](/diary/qpdf+Extracting+PDF+Streams/31406/#comments)
Related Tags:
NAICS: 923 – Administration Of Human Resource Programs
NAICS: 541 – Professional
Scientific
Technical Services
NAICS: 518 – Computing Infrastructure Providers
Data Processing
Web Hosting
Related Services
NAICS: 92 – Public Administration
NAICS: 51 – Information
Blog: SANS Internet Storm Center
Associated Indicators: