Live data from Hacker News

OpenPDF 1.3.0

github.com

51–60 of 63 posts

Re: OpenPDF 1.3.0

#51
post #36
post #19

Earlier quoted context omitted.

Tangential question: Do you know of a method to render PDFs to HTML canvas other than PDF.js? PDF.js seems too slow for my purposes, though I haven't tested very thoroughly yet. I'm hoping with wasm Skia now available, there might be some other options coming.

how does Skia and pdf work together? I know there is a pdf backend but the way I understand it is that it just outputs pdf instead of an image I recently started playing around with wasm Skia/CanvasKit but I have a hard time wrapping my head around what exactly it is supposed to be used for, as well as Skia in general. For example, Skia allows text rendering and I could naively assume that if I want to build some hig…

PDFium has a Skia backend, where Skia is used to do the actual drawing. Interactivity happens at a higher level.

Re: OpenPDF 1.3.0

#52
post #4

I'm one of the maintainers of OpenPDF. Please give it a try and post your feedback. Also, if you are using iText 1.2.x, it's time to update to OpenPDF, which should be compatible. https://github.com/librepdf/openpdf

Is it possible to digitally sign a PDF with OpenPDF? If yes is there a tutorial somewhere or could you give a hint on how it's done or where to look at the Java API? Thanks in advance!

Re: OpenPDF 1.3.0

#53
post #30

My particular needs for PDF creation are somewhat unusual, so I'm not surprised that Acrobat Pro seems to be the only thing that suits my needs. If anyone knows of a PDF creation library that has good support for the various image compression schemes supported by PDF, I'd love to know about it. Currently I'm using a 10 year old paid version of Acrobat Pro because I'm unwilling to spend another $500 to get a modern co…

It sounds like you are using Windows, but if you happen to be using Linux [1]: ps2pdf LARGE.pdf SMALL.pdf I believe it compresses all of the images independently, instead of converting the entire thing to an image as I believe Imagick does (I could be wrong though). This tool doesn't appear to have any intelligent auto-deskewing though. (On a slightly different note, it's questionable whether you want to do this for…

I think this won't be useful for scanned documents, as the entire page will be one image.

ps2pdf does work on Windows though (or maybe it's pstopdf?), and the Linux version works directly in WSL.

Re: OpenPDF 1.3.0

#54
post #2

Pdf so badly needs a standard open source reference implementation. the problem with java is that it isn’t easy to reuse in other programming environment... something in C, or anything that compiles through LLVM would probably be a better choice i think.

Go has a number of PDF libraries including GoFPDF which is actually really good and very well rounded. These days you can easily build a "C" interface to a shared library implemented in Go.

https://github.com/jung-kurt/gofpdf

Re: OpenPDF 1.3.0

#55
post #53
post #30

Earlier quoted context omitted.

It sounds like you are using Windows, but if you happen to be using Linux [1]: ps2pdf LARGE.pdf SMALL.pdf I believe it compresses all of the images independently, instead of converting the entire thing to an image as I believe Imagick does (I could be wrong though). This tool doesn't appear to have any intelligent auto-deskewing though. (On a slightly different note, it's questionable whether you want to do this for…

I think this won't be useful for scanned documents, as the entire page will be one image. ps2pdf does work on Windows though (or maybe it's pstopdf?), and the Linux version works directly in WSL.

I believe `ps2pdf` is just a front end script for Ghostscript. Even for `ps2pdf` there are a bunch of options settable, most notably are the DPI settings [1]. The point is that I believe it works for images and/or scalar graphics.

As the PS format was designed for printing [2], my guess is that it selects a DPI value suitable for printing. I can't seem to find the source code to back this up though. (Ghostscript has the simple web front-end that doesn't lend itself very well for viewing code in browser [3].)

[1] https://www.biu.ac.il/os_site/documentation/gs/Ps2pdf.htm

[2] https://en.wikipedia.org/wiki/PostScript

[3] http://git.ghostscript.com/?p=ghostpdl.git;a=summary

Re: OpenPDF 1.3.0

#56
post #4

I'm one of the maintainers of OpenPDF. Please give it a try and post your feedback. Also, if you are using iText 1.2.x, it's time to update to OpenPDF, which should be compatible. https://github.com/librepdf/openpdf

Is it possible to digitally sign a PDF with OpenPDF? If yes is there a tutorial somewhere or could you give a hint on how it's done or where to look at the Java API? Thanks in advance!

Here's a PDF signing example: https://github.com/LibrePDF/OpenPDF/wiki/Signing

Re: OpenPDF 1.3.0

#57

Earlier quoted context omitted.

Is it possible to digitally sign a PDF with OpenPDF? If yes is there a tutorial somewhere or could you give a hint on how it's done or where to look at the Java API? Thanks in advance!

Here's a PDF signing example: https://github.com/LibrePDF/OpenPDF/wiki/Signing

Thank you very much!

Re: OpenPDF 1.3.0

#58
post #55
post #53

Earlier quoted context omitted.

I think this won't be useful for scanned documents, as the entire page will be one image. ps2pdf does work on Windows though (or maybe it's pstopdf?), and the Linux version works directly in WSL.

I believe `ps2pdf` is just a front end script for Ghostscript. Even for `ps2pdf` there are a bunch of options settable, most notably are the DPI settings [1]. The point is that I believe it works for images and/or scalar graphics. As the PS format was designed for printing [2], my guess is that it selects a DPI value suitable for printing. I can't seem to find the source code to back this up though. (Ghostscript has…

It will work for images embedded in PostScript, and resample them to different DPI if you ask (I think probably more for on-screen viewing and file size reasons than printing). I would be kind of surprised if it does anything as sophisticated as "B&W or color images interspersed on the page with 1bpp text" though (i.e. analysing full page images, locating and separating text and figure regions, and choosing different encodings for each). DjVu does do some things along those lines, but it's not widely supported like PDF.

Re: OpenPDF 1.3.0

#59
post #33
post #21

Earlier quoted context omitted.

MuPDF supposedly supports forms in the latest version. I’ve never seen it work though.

Alright, so I noticed this before and just tried it again. While I can fill in forms, does anyone know how to save them? The man page says "S", but that doesn't work and I remember this causing issues for me in the past.

If you press "a" to open the annotation side panel, there will be a button to save the PDF file if the document has been modified.

Re: OpenPDF 1.3.0

#60

My particular needs for PDF creation are somewhat unusual, so I'm not surprised that Acrobat Pro seems to be the only thing that suits my needs. If anyone knows of a PDF creation library that has good support for the various image compression schemes supported by PDF, I'd love to know about it. Currently I'm using a 10 year old paid version of Acrobat Pro because I'm unwilling to spend another $500 to get a modern co…

Try BFO pdf . It's paid but they are agood company. I also I love that BFO stands for "Big Faceless Organization" and the CEO answered support emails until like last year.

Starting at $850. Ouch; I'd just buy Acrobat Pro then, because the latter is cheaper. My needs are just for a hobby project (scanning and posting old computer manuals).
Post reply on HN