HackerTrans
TopNewTrendsCommentsPastAskShowJobs

desgeeko

no profile record

Submissions

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

github.com
2 points·by desgeeko·letzten Monat·0 comments

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

github.com
451 points·by desgeeko·letztes Jahr·57 comments

[untitled]

1 points·by desgeeko·vor 2 Jahren·0 comments

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

pdfsyntax.dev
1 points·by desgeeko·vor 2 Jahren·0 comments

A Quick Introduction to PDF Syntax

pdfsyntax.dev
4 points·by desgeeko·vor 3 Jahren·0 comments

comments

desgeeko
·letztes Jahr·discuss
Thank you very much!
desgeeko
·letztes Jahr·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
·letztes Jahr·discuss
Yes, I value simplicity and the interactivity offered by basic HTML and CSS is sufficient for my use case :)
desgeeko
·letztes Jahr·discuss
Thanks for noticing! You're right, I will fix that very soon.
desgeeko
·vor 2 Jahren·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
·vor 2 Jahren·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
·vor 3 Jahren·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