Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
gettalong
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
1.
▲
by
gettalong
2mo ago
Zero-trust architecture is a bit of a misnomer: When you use a browser based tool you are always at risk that the data gets out. So indeed you have to trust the site you are using which invalidates the zero-trust claim. By just using a loca
2.
▲
by
gettalong
3mo ago
Why is it that everyone now duplicates/vibe-codes PDF tool websites? It seems that there is one new each week for about half a year now with none providing any outstanding features over the others.
3.
▲
by
gettalong
3mo ago
If it can only be viewed with your web application, it won't be useful for the general public.
4.
▲
by
gettalong
3mo ago
PDF already has the notion of portable collections (PDF 2.0 section 12.3.5). As far as I can determine this is very similar to what you do except that your pdfx format won't be supported by (major) PDF viewers/libraries.
5.
▲
by
gettalong
3mo ago
I usually use pdfpc ( https://pdfpc.github.io/ ) for this which works like a charm. No internet access needed, content stays on the computer.
6.
▲
by
gettalong
8mo ago
Regarding "Important Notice on Third-Party Components": You are including AGPL components in your project which itself is AGPL. Even if you distribute your part of the code under the commercial license, the components make - depen
7.
▲
by
gettalong
8mo ago
In case you don't know it: PyHanko provides a full and up-to-date implementation for digital signatures in PDF, including time stamping. https://github.com/MatthiasValvekens/pyHanko
8.
▲
by
gettalong
2y ago
Yes, creating a binary and calling that would circumvent the AGPL. But then everything will be more complex and slower. Also, doing this extra work and developing the binary is probably more expensive than just buying a commercial license.
9.
▲
by
gettalong
2y ago
I'm not a lawyer but I think you mistaken in this regard. One indication for this is that otherwise some major companies would have problems. For example, the GPL FAQ has the following part in the FAQ item title "What is the diffe
10.
▲
by
gettalong
2y ago
The library is dual-licensed as AGPL plus a commercial license. So everything is in the open and can be tested and tried out under the AGPL. Once the library is used in a commercial context, you nearly always need to buy the commercial lice
11.
▲
by
gettalong
2y ago
Thanks and corrected!
12.
▲
by
gettalong
2y ago
Thanks! I agree that laying out PDFs could be made easier by using a declarative mechanism instead of coding. However, I'm still not sure what the best way would be to do that. Using HTML/CSS for this and doing it right would enta
13.
▲
by
gettalong
2y ago
You can get a long way with only implementing the most basic things of the PDF specification, like section 7. And even there you don't need everything. For example, there is no need to implement the CCITTFaxDecode, JBIG2Decode, DCTDeco
14.
▲
by
gettalong
2y ago
Many PDF viewers and library do not fully follow the PDF standard or have subtle bugs. This leads to problems later on. My guess is this all started many years ago when Adobe Reader was the standard PDF reader and it was (and still is) very
15.
▲
by
gettalong
3y ago
Thanks - that helps!
16.
▲
by
gettalong
3y ago
Thanks for your answer! I imagined you would be using PrinceXML behind the scenes since that is probably the gold standard in HTML+CSS rendering. The only open source alternative I know of is WeasyPrint at https://weasyprint.org&
17.
▲
by
gettalong
3y ago
What are you using to generate the PDFs? Are you doing something like PrinceXML (or weasyprint) which directly convert HTML+CSS to PDF? Or are you converting HTML+CSS to something else? Are there any demo pages where it is possible to view
18.
▲
by
gettalong
3y ago
It may be a valid HTML and JPEG (didn't check) but it is definitely not a valid PDF file. For example, it is missing the version identifiers in the PDF header, there is no cross-reference table and there is no PDF file trailer.
19.
▲
by
gettalong
3y ago
There is no reason to abandon PDF. As was already stated the main purpose of a PDF is viewing something as the author has intended, it should not be dynamic like a website. And editing is possible but not the intended use-case (and therefor
20.
▲
by
gettalong
3y ago
It seems that the news hasn't spread far yet but due to sponsorships by various big PDF related companies the ISO standard for PDF 2.0 is freely available, see https://www.pdfa-inc.org/product/iso-32000-2-pdf-2-0-b
21.
▲
by
gettalong
3y ago
If you need a state of the art CLI tool for signing PDFs that supports the latest standards (think ones from 2023), I can recommend pyHanko ( https://github.com/MatthiasValvekens/pyHanko/ ).
22.
▲
by
gettalong
3y ago
So I uploaded one of my standard test files for compression and it actually expanded the file size from 52K to 93K while making the images blurry.
23.
▲
by
gettalong
3y ago
Fair point :) And yes, some PDFs use weird ways to represent the spacing between words.
24.
▲
by
gettalong
3y ago
So, I don't think that the first two parts, converting the PDF page to an image to get the text, is necessary. One could just use the basic information in a PDF content stream to get the bounding box for each character. The resulting i
25.
▲
by
gettalong
3y ago
The content of a PDF file is not like the content of, say, an HTML or ODT file. With the latter you use plain text with formatting instructions and the application needs to do all the layouting stuff, like glyph positioning (which is alread
26.
▲
by
gettalong
4y ago
Yes, I know but thought it would be simpler to just say Shopify. Sorry for the inaccuracy.
27.
▲
by
gettalong
4y ago
Yes, it is slower but not that slow, e.g https://hexapdf.gettalong.org/documentation/benchmarks/optim...
28.
▲
by
gettalong
4y ago
Yes, there was a bit of a drop off in performance but only when YJIT is not used. With YJIT there are performance gain. Also note that YJIT in 3.1 was still experimental and more proof-of-concept. Only with the 3.2 release was it now deemed
29.
▲
by
gettalong
4y ago
Yes, COW was implemented a few versions ago and the garbage collector also supports it to avoid unnecessary copying.
30.
▲
by
gettalong
4y ago
As others have already written, there are many slightly invalid PDF files out there in the wild that many readers can display mostly fine and which your library should also be able to handle. If you can, grab yourself a copy of the most rec
More ›