0

I want to convert html response to pdf file using JAVA. But the problem is that the HTML page contains some JSON part which creates a problem and throws an error while converting it to pdf. So, I want some possible solution in java to convert a mixture of HTML and JSON into a pdf file. Any help will be appreciated.

I have tried java library htmltopdf converter but it's throwing an error due to JSON value in HTML.

Somil Garg
  • 474
  • 4
  • 12
  • please consider adding exactly what you have done and the errors you got – yukashima huksay Oct 19 '19 at 11:14
  • It could be worth looking at [apache fop](https://stackoverflow.com/questions/41728428/can-apache-fop-be-used-to-convert-an-arbitary-html-to-pdf), you might get the desired result, but it won't come for free, you'd have to hand-wire html/json-> fop xml mappings. – Curiosa Globunznik Oct 19 '19 at 11:23
  • Kind of curious what that JSON part looks like. You should post a sample of the HTML you are trying to process. – Archimedes Trajano Oct 19 '19 at 18:38

0 Answers0