javamelody icon indicating copy to clipboard operation
javamelody copied to clipboard

Replaced itext with openpdf

Open mpe85 opened this issue 5 years ago • 7 comments

mpe85 avatar Oct 02 '19 22:10 mpe85

Excellent!

andreasrosdal avatar Oct 03 '19 09:10 andreasrosdal

I had a quick look at the PDFs produced by TestPdfReport and all look good at first glance.

mpe85 avatar Oct 03 '19 11:10 mpe85

Note to myself: if this PR is merged with openpdf 1.3.11, compatibility between javamelody and itext 2.1.7 is currently broken because of https://github.com/LibrePDF/OpenPDF/issues/274 for applications still using itext: java.lang.NoSuchMethodError: com.lowagie.text.Paragraph.add(Lcom/lowagie/text/Element;)Z

evernat avatar Oct 06 '19 00:10 evernat

I've just included JavaMelody in our build and also included openPDF in Version 1.3.26 (because of iText licence issues) and PDF creation works well. So i think if updated to latest openPDF version this may be merged, what do you think?

soenkekueper avatar Dec 29 '21 10:12 soenkekueper

@soenkekueper This PR can't be merged:

  1. The remarks above are not answered.
  2. In particular my last remark above should be noted: this PR breaks the compatibility with iText 2.1.7. This breaking change is a bad thing for forward compatibility from monitored applications having a previous javamelody version and the iText dependency and also for new monitored applications which may have the iText dependency for other reason than javamelody. As a consequence, such a breaking change would either block or slow down the recommended usage of openpdf with javamelody by default.
  3. As long as openpdf is not largely dominant compared to iText 2.1.7, I think javamelody should keep compatibility with iText 2.1.7 by default and be compatible with openpdf as long as it is possible. The other way round would already be broken when done like in this PR.

evernat avatar Dec 29 '21 21:12 evernat

I would argue that OpenPDF is already more popular compared to iText 2.1.7, when developers are choosing between iText and OpenPDF today when upgrading library version.

  • OpenPDF has security fixes compared to iText 2.1.7.
  • OpenPDF still has the LGPL license, which iText >= 5 doesn't.

So I would recommend replacing iText 2.1.7 with the latest OpenPDF version.

andreasrosdal avatar Dec 30 '21 02:12 andreasrosdal

@evernat Thanks for your reply. I agree on that, keeping backward compatibility is, in general, an good idea. As long as we can use JavaMelody with latest openPDF, its okay for me.

I came across this, because we want to use JavaMelody in our applications that also run on IBM z/OS, and i've raised an PR at openPDF (LibrePDF/OpenPDF#642), because created pdfs aren't readable. So i thought this might be usedfull for other users too.

soenkekueper avatar Dec 30 '21 07:12 soenkekueper

PR replaced by #1182 so closing this one

evernat avatar Dec 21 '23 23:12 evernat