Live data from Hacker News

Show HN: HTML visualization of a PDF file's internal structure

github.com

11–20 of 60 posts

Re: Show HN: HTML visualization of a PDF file's internal structure

#13
post #9

Looks nice. Would be better if all of the PDF's bytes where shown. Seems like `endobj` and `xref` are not shown.

Thanks for noticing! You're right, I will fix that very soon.

When opening the following hello world PDF, the trailer isn't shown correctly and both `startxref` and `%%EOF` are missing: https://ghostbin.site/bb7jb

Re: Show HN: HTML visualization of a PDF file's internal structure

#15
post #5

I remember there was a similar project on github allows visualize any type of binary data by a given schema. There was an TCP/IP example IIRC.

HexFiend also has a template syntax for binary data visualization. It’s based on Tcl.

https://github.com/HexFiend/HexFiend/blob/master/templates/T...

Re: Show HN: HTML visualization of a PDF file's internal structure

#16

I’ve been shopping for something that does a per-byte description of the content of visual media formats (jpeg, png, avi, mp4, etc). Anyone know of one?

This sounds like the format specification? What are you looking for that is not a document?

Re: Show HN: HTML visualization of a PDF file's internal structure

#18
Is the UI tooling that does the visualization a library? I really like the UI format, would love to use this for breaking down and debugging video byte streams too.

EDIT: Oh it's actually reasonably simple, great use of CSS! https://github.com/desgeeko/pdfsyntax/blob/main/docs/simple_...

Re: Show HN: HTML visualization of a PDF file's internal structure

#19

I’ve been shopping for something that does a per-byte description of the content of visual media formats (jpeg, png, avi, mp4, etc). Anyone know of one?

Really impressed this site is still running. They'll have what you want https://formats.kaitai.io/

Re: Show HN: HTML visualization of a PDF file's internal structure

#20
If you're interested in manipulating PDFs, I've found QPDF [0] to be a useful tool. Its "QDF mode" lays out the objects in a form where you can directly edit them, and it can automatically fix up the xref table afterwards. It can also convert to and from a JSON format that you can manipulate with your own scripts.

[0] https://github.com/qpdf/qpdf, https://qpdf.readthedocs.io/en/stable/

Post reply on HN