4

first time here posting, though I have benefited many times from other postings on stackoverflow. I am the principal developer of Jmol, which I have recently ported to JavaScript/HTML5. The Jmol applet interfaces with another applet, JSpecView, which in its current form as a Java applet utilizes a slimmed down version of itext.1.4.5.jar to create PDF files of spectra.

I am interested in converting iTtext Java code to JavaScript so that a JavaScript version of the JSpecView applet can create PDF files directly.

Q: Has this already been accomplished?

Q: JSpecView is an Open-Source project licensed under LGPL. All our source code is available. Is this a problem?

Bob Hanson Principal Developer, Jmol/JSmol

István
  • 5,057
  • 10
  • 38
  • 67
user2220862
  • 41
  • 1
  • 3

1 Answers1

2

A: I don't think such a port has been done before. But why would you not use an existing JavaScript pdf library? Or what is wrong with doing the PDF generation on the server side? Why would you do more work than is necessary? I've done a quick google on JS PDF libraries and found:

http://jspdf.com/

https://github.com/mozilla/pdf.js

And the following stackoverflow question:

Generating PDF files with Javascript

A: I think it shouldn't be a problem porting it to JavaScript as you'd be porting to the same license (of course, if you're using a version of iText before the license switch to AGPL), but IANAL.

Community
  • 1
  • 1
Michaël Demey
  • 1,567
  • 10
  • 18
  • Excellent idea! Thank you. Yes, no need to convert Java to JavaScript if it is already available in JavaScript. – user2220862 Mar 31 '13 at 03:40