Re:Show HN: I am building a new Python library to read/write...
by sdgluck on Friday November 18, 2022 @08:29AM
(#33654288)
In the README for that repository it mentions "schizophrenic files". What is a schizophrenic file, out of interest?
Re:Show HN: I am building a new Python library to read/write...
by quirino on Friday November 18, 2022 @08:48AM
(#33654583)
Not OP. It seems they're files which display different contents depending on the program you open them in.
Here's a CCC talk on it: https://media.ccc.de/v/MRMCD2014_-_6008_-_en_-_grossbaustell...
And the slies from the talk: https://www.slideshare.net/ange4771/schizophrenic-files-v2
Shameless plug: I am one of the maintainers of PolyFile, which, among other things, can produce an interactive HTML hex editor with an annotated syntax tree for dozens of filetypes, including PDF. For PDF, it uses a dynamically instrumented version of the PDFminer parser. It sounds like it might satisfy your use case.
https://github.com/trailofbits/polyfile