what's a good tool to check if a pdf is not tampered with eg. as a tool to check before loading a pdf from a public bucket to your backend application?
Show HN: IPA, a GUI for exploring inner details of PDFs
21–30 of 52 posts
Re: Show HN: IPA, a GUI for exploring inner details of PDFs
#22This is cool! Here are some other similar(?) tools, for seeing the inner contents of a PDF file (the raw objects etc), but I haven't compared them to this tool here: - https://pdf.hyzyla.dev/ - https://github.com/itext/i7j-rups (java -jar ~/Downloads/itext-rups-7.2.5.jar) - https://github.com/desgeeko/pdfsyntax (python3 -m pdfsyntax inspect foo.pdf > output.html) - https://github.com/trailofbits/polyfile (polyfile --…
Re: Show HN: IPA, a GUI for exploring inner details of PDFs
#23This is cool! Here are some other similar(?) tools, for seeing the inner contents of a PDF file (the raw objects etc), but I haven't compared them to this tool here: - https://pdf.hyzyla.dev/ - https://github.com/itext/i7j-rups (java -jar ~/Downloads/itext-rups-7.2.5.jar) - https://github.com/desgeeko/pdfsyntax (python3 -m pdfsyntax inspect foo.pdf > output.html) - https://github.com/trailofbits/polyfile (polyfile --…
The HTML output is like a pretty print where you can read view objects and follow links to other objects.
Since I have added a new command (disasm) that is CLI oriented and displays a greppable summary of the structure. Here is an explanation: https://github.com/desgeeko/pdfsyntax/blob/main/docs/disasse...
Re: Show HN: IPA, a GUI for exploring inner details of PDFs
#24Does anyone have any recommendations for a good tool that allows both programmatic inspection and modification of PDF primitives. For example, let's say someone wants to iterate through every embedded image in a PDF and apply some form of signal processing to the images in-place, then re-save the PDF?
Depending on your transformation use case, you may write an incremental update with only a few bytes at the end of the original file instead of rewriting it entirely. To my knowledge this feature of the PDF specification is often overlooked and not a lot of libraries implements it.
It is a work in progress and I have not developed functions for images yet, though.
Re: Show HN: IPA, a GUI for exploring inner details of PDFs
#25Re: Show HN: IPA, a GUI for exploring inner details of PDFs
#26This looks nice, and I didn't know about eGUI which looks like it runs on the web. Very interesting. https://www.egui.rs/
Re: Show HN: IPA, a GUI for exploring inner details of PDFs
#27I recently wanted to edit out a huge background image repeating on almost every page of a PDF and found out there's no obvious way to do it. Would appreciate any tool suggestions!
Re: Show HN: IPA, a GUI for exploring inner details of PDFs
#28This is cool! Here are some other similar(?) tools, for seeing the inner contents of a PDF file (the raw objects etc), but I haven't compared them to this tool here: - https://pdf.hyzyla.dev/ - https://github.com/itext/i7j-rups (java -jar ~/Downloads/itext-rups-7.2.5.jar) - https://github.com/desgeeko/pdfsyntax (python3 -m pdfsyntax inspect foo.pdf > output.html) - https://github.com/trailofbits/polyfile (polyfile --…
mutool clean -d in.pdf out.pdf
At that point you’ll realise that a PDF is mostly just a list of objects and that those objects can reference each other. After that you’ll journey through the spec understanding what each type of object does and what the fields in it control. The graphics stream itself is just a stack based co-ordinates drawing system that’s easy to follow too.By way of an example. Here's an object that represents a Page. You can see the dimensions in the MediaBox. The contents themselves are contained at object "9 0 obj" ("9 0 R" is the pointer to it):
2 0 obj
>
endobj
Meanwhile "9 0 obj" has the drawing instructions. They seem a little weird at first glance but you see the values ".23999999 0 0 -.23999999 0 792" each get pushed on the stack and then "cm" pops them to interpret them as the transformation matrix. 9 0 obj
>
stream
.23999999 0 0 -.23999999 0 792 cm
q
0 0 2551 3301 re
...
The depth and detail of all of the different possible things that can be represented in a PDF is insane. But understanding the structure above is all you need to begin your journey!EDIT The rest of your journey is contained in this epic document: https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandard...
Re: Show HN: IPA, a GUI for exploring inner details of PDFs
#29This is cool! Here are some other similar(?) tools, for seeing the inner contents of a PDF file (the raw objects etc), but I haven't compared them to this tool here: - https://pdf.hyzyla.dev/ - https://github.com/itext/i7j-rups (java -jar ~/Downloads/itext-rups-7.2.5.jar) - https://github.com/desgeeko/pdfsyntax (python3 -m pdfsyntax inspect foo.pdf > output.html) - https://github.com/trailofbits/polyfile (polyfile --…
Mutool is the one I suggest to people. The easiest way to understand a PDF is to decompress it and then just read the contents. mutool clean -d in.pdf out.pdf At that point you’ll realise that a PDF is mostly just a list of objects and that those objects can reference each other. After that you’ll journey through the spec understanding what each type of object does and what the fields in it control. The graphics stre…
My tool can do exactly the same (viewing internal structure, exporting objects, and see the uncompressed raw content for stream) with a graphical interface and without all this kind of flags (which one of the reasons I started to design this project with egui), but thanks for posting yours too.
Re: Show HN: IPA, a GUI for exploring inner details of PDFs
#30This is cool! Here are some other similar(?) tools, for seeing the inner contents of a PDF file (the raw objects etc), but I haven't compared them to this tool here: - https://pdf.hyzyla.dev/ - https://github.com/itext/i7j-rups (java -jar ~/Downloads/itext-rups-7.2.5.jar) - https://github.com/desgeeko/pdfsyntax (python3 -m pdfsyntax inspect foo.pdf > output.html) - https://github.com/trailofbits/polyfile (polyfile --…