News for hackers. Stuff that matters.
Re:I built an online PDF management platform using open-sour... by czl_my on Sunday May 12, 2024 @07:04PM (#40338252)
I'd like if there's more details on the open source software used.
Re:I built an online PDF management platform using open-sour... by sanusihassan on Sunday May 12, 2024 @08:37PM (#40338687)
i used open source solutions to built it, like libreoffice, ghostscript, google's tesseract and a bunch of other tools, Google's Tesseract: https://github.com/tesseract-ocr/tesseract
Re:I built an online PDF management platform using open-sour... by beagle3 on Monday May 13, 2024 @02:46AM (#40340397)
I’m surprised everyone is using Tesseract. It was the only game in town 10 years ago, and it’s Ok on cleaned aligned data, but there are a few newer ones like EasyOCR [0] that can deal with much less organized text (albeit more slowly)

[0] https://github.com/JaidedAI/EasyOCR

Re:I built an online PDF management platform using open-sour... by harryf on Monday May 13, 2024 @04:05AM (#40340839)
EasyOCR looks like it's more focused on the mobile use case of extract text from photos. That's a little bit different from extracting text from scanned documents, where document structure is an important aspect, and Tesseract is the devil we know. In the commercial space ABBYY Finereader still dominates - https://en.wikipedia.org/wiki/ABBYY_FineReader

But perhaps I'm wrong...

Re:I built an online PDF management platform using open-sour... by ianhawes on Monday May 13, 2024 @09:14AM (#40342977)
ABBYY does indeed dominate, but Google Document AI is making inroads.
Re:I built an online PDF management platform using open-sour... by racl101 on Monday May 13, 2024 @09:18AM (#40343015)
Careful with the Ghostscript AGPL licensing if you plan to make a commercial product that uses it.
Re:I built an online PDF management platform using open-sour... by coretx on Sunday May 12, 2024 @08:13PM (#40338560)
Same here. No (F)OSS licenses to be found on the page itself. Sus. Perhaps it is simply injecting remote root vulnerabilities into the PDF's.
Re:I built an online PDF management platform using open-sour... by aspenmayer on Sunday May 12, 2024 @08:36PM (#40338684)
I hope those are FOSS remote root PDF vulns!
Re:I built an online PDF management platform using open-sour... by coretx on Sunday May 12, 2024 @10:33PM (#40339298)
If something is turing complete, don't trust/execute it until you have verified where it comes from, who is behind it and what it does.

Here you have what Adobe has to say about PDF's: https://www.adobe.com/acrobat/resources/can-pdfs-contain-vir...

Re:I built an online PDF management platform using open-sour... by sanusihassan on Sunday May 12, 2024 @08:40PM (#40338705)
the web app i.e the front end part is next.js and typescript mostly, the landing page is built using astro.js, and the back end is heavily python, flask and some javascript for web-to-pdf and markdown-to-pdf, the rest is mostly python
Re:I built an online PDF management platform using open-sour... by deathemperor on Monday May 13, 2024 @02:51AM (#40340414)
just curious: what do you use to convert web pages to pdf?
Re:I built an online PDF management platform using open-sour... by cuu508 on Monday May 13, 2024 @03:21AM (#40340569)
Not op, but I've had good experience with WeasyPrint. I use it for generating PDF invoices: I create a HTML invoice from a template, WeasyPrint turns it into a PDF document. It handles CSS, images, custom fonts, etc.

A neat trick to convert HTML to PDF in a browser environment is to open a new browser window, load the HTML in it, and call print() on it, like here: https://stackoverflow.com/a/33890644/5821. May be OK for an internal tool.

Re:I built an online PDF management platform using open-sour... by sanusihassan on Wednesday May 15, 2024 @11:27PM (#40374930)
puppeteer
Re:I built an online PDF management platform using open-sour... by sedro on Sunday May 12, 2024 @08:42PM (#40338717)
The PDF metadata says it's PyPDF2
Re:I built an online PDF management platform using open-sour... by sanusihassan on Sunday May 12, 2024 @08:47PM (#40338747)
i used PyPDF2 to implement some tools, but not all of them.