News for hackers. Stuff that matters.
Re:Show HN: HTML visualization of a PDF file's internal stru... by est on Monday February 10, 2025 @09:19AM (#43000571)
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.
Re:Show HN: HTML visualization of a PDF file's internal stru... by mdaniel on Monday February 10, 2025 @10:43AM (#43001567)
Be careful, "any" is a strong word in this context. Interestingly enough, I actually use PDF as the "hello world" for kicking the tires on any such file format descriptor I find because PDF is such a crazypants specification. Thus, if the descriptor language is able to accurately capture the layout of a PDF, it's obviously well thought out.

I haven't had a lot of luck thus far, except ones which allow escaping out of declarative mode over into "and then run this code"

Re:Show HN: HTML visualization of a PDF file's internal stru... by MontagFTB on Monday February 10, 2025 @09:58AM (#43001037)
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 stru... by ddulaney on Monday February 10, 2025 @09:36AM (#43000769)
https://kaitai.io/ maybe?

It looks perfectly nice for its role, but I didn’t use it for my last project because I need serialization as well.

Re:Show HN: HTML visualization of a PDF file's internal stru... by elliottcarlson on Monday February 10, 2025 @06:00PM (#43006414)
Kaitai is very useful for reverse engineering a binary file that you have some assumptions of. I've used it for save file reverse engineering and then creating a read/write library for it. It should be usable for PDF Metadata.