jjwilly16 / node-pdftk

A wrapper for PDF Toolkit with streams and promises.
MIT License
141 stars 34 forks source link

Does pdftk use iText java lib #31

Closed shaleen-sharma closed 4 years ago

shaleen-sharma commented 5 years ago

Hi, This is not an issue but a question. I was getting an exception using pdftk v 2.02 and the stacktrace has reference to the iText lib author Lowagie.

Unhandled Java Exception in create_output():
java.lang.ArrayIndexOutOfBoundsException: 0
at pdftk.com.lowagie.text.pdf.DocumentFont.fillEncoding(pdftk)

On googling I found Lowagie himself commenting that pdftk is using an obsolete version of iText lib. My question is, is the pdftk version 2 still using iText lib as I got the above exception with pdftk version 2? If yes, which version of iText is being used in the current version of pdftk?

Thanks Shaleen

jjwilly16 commented 5 years ago

I'm not sure, but it looks pretty old. On the PdfTk download page you can download a copy of the source in the 'Build PDFtk Server' section near the bottom of the page and see for yourself.

Are you by chance experimenting with writing streams via stdin? I've seen that error when I was trying to write multiple files to stdin.