HackerTrans
TopNewTrendsCommentsPastAskShowJobs

desgeeko

no profile record

Submissions

Show HN: Montmark – A lightweight, fast pure-Python Markdown parser

github.com
2 points·by desgeeko·mese scorso·0 comments

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

github.com
451 points·by desgeeko·anno scorso·57 comments

[untitled]

1 points·by desgeeko·2 anni fa·0 comments

Show HN: PDFSyntax, a Python library to inspect and transform PDF files

pdfsyntax.dev
1 points·by desgeeko·2 anni fa·0 comments

A Quick Introduction to PDF Syntax

pdfsyntax.dev
4 points·by desgeeko·3 anni fa·0 comments

comments

desgeeko
·anno scorso·discuss
Thank you very much!
desgeeko
·anno scorso·discuss
Correct, PDFSyntax implements everything at the lowest level. You can ignore the HTML visualization and use it as an API to access PDF objects. Why? Because I started a very small tool as a week-end project and I got hooked reading the PDF Specification so it is becoming a general purpose PDF library for Python. I am not familiar with other libraries but I have the impression that mine implements things that are often overlooked in others, like incremental updates.
desgeeko
·anno scorso·discuss
Yes, I value simplicity and the interactivity offered by basic HTML and CSS is sufficient for my use case :)
desgeeko
·anno scorso·discuss
Thanks for noticing! You're right, I will fix that very soon.
desgeeko
·2 anni fa·discuss
My tool (PDFSyntax[1], mentioned in this thread) is a Python library that is able to both inspect and transform PDF files.

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.

[1] https://github.com/desgeeko/pdfsyntax
desgeeko
·2 anni fa·discuss
I am the author of PDFSyntax, thanks for mentioning it!

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...
desgeeko
·3 anni fa·discuss
If you want to continue this journey and learn more about PDF, you can read the anatomy of a file I documented recently: https://pdfsyntax.dev/introduction_pdf_syntax.html