5 ms·
Mutool – all purpose tool for dealing with PDF files
- nico 2y agoIt would be cool if it could also do “LLM style” operations, like summarizing or extracting key points of the documents
- yapyap 2y agonot really, very out of scope IMO
- pkal 2y agoIf you really have to "mutool draw -F txt somefile.pdf" will extract the text contents, that you can then pipe to a LLM.
- tough 2y agohow will it handle things like tables let me try
- tough 2y agofound this pymupdf4llm w a fast google search https://medium.com/@danushidk507/using-pymupdf4llm-a-practical-guide-for-pdf-extraction-in-llm-rag-environments-63649915abbf https://medium.com/@danushidk507/using-pymupdf4llm-a-practic...
- daft_pink 2y agoI really wish there was a way to view and edit pdf from the terminal vim style.
- dirkt 2y agoYou can decompress the streams with mutool and edit the Postscript-like code in any editor, if you want. (That doesn't help a lot with editing text, of course...)
- layer8 2y agoThe PDF format isn’t really designed for editing. For viewing, there’s pdftotext [0] or ebook-convert [1]. [0] https://manpages.debian.org/poppler-utils/pdftotext.1.html https://manpages.debian.org/poppler-utils/pdftotext.1.html [1] https://manpages.debian.org/calibre/ebook-convert.1.html https://manpages.debian.org/calibre/ebook-convert.1.html
- ttyprintk 2y agoYou’re better off converting to markdown with docling or markupsafe. But, if you’re careful, Qpdf offers an intermediate document format, like pandoc, but pandoc doesn’t read PDF.
- s-emanuilov 2y agoMonkt.com offers an online version (no setup or configuration) for docling. Additionally, it has a few extra extraction methods. It could be tested for conversion to markdown.
- deleted 2y ago[deleted]
- rtcode_io 2y agoIf this is using MuPDF, beware that they are very rude and assume ill will! See https://news.ycombinator.com/item?id=40096211 https://news.ycombinator.com/item?id=40096211
- fn-mote 2y agoThat comment you linked to is yours, and flagged. It reads to me like you are still carrying a grudge about one rude interaction. I read that whole thread and I don't want to see it repeated here.
- fn-mote 2y agoThis is not a very good link to post - it's a manpage. A better link (from the developer's git repository): https://mupdf.readthedocs.io/en/latest/mupdf-command-line.html#mupdf-command-line-mutool https://mupdf.readthedocs.io/en/latest/mupdf-command-line.ht... Source for mutool: https://github.com/ArtifexSoftware/mupdf/blob/master/source/tools/mutool.c https://github.com/ArtifexSoftware/mupdf/blob/master/source/...
- mdaniel 2y agoWhile surfing around their org I found this which has an impressive looking sample: https://github.com/ArtifexSoftware/pdf2docx#sample https://github.com/ArtifexSoftware/pdf2docx#sample Also, strictly speaking their GitHub is labeled as a mirror, although they didn't say "mirror of what" but I believe it's this https://cgit.ghostscript.com/cgi-bin/cgit.cgi/mupdf.git/ https://cgit.ghostscript.com/cgi-bin/cgit.cgi/mupdf.git/
- postepowanieadm 2y agoIt's ok, but some less used features have undocumented regressions.
- nico 2y ago"Ingesting Millions of PDFs and why Gemini 2.0 Changes Everything" https://news.ycombinator.com/item?id=42952605 https://news.ycombinator.com/item?id=42952605