pdf - wkhtmltopdf -> Java HttpServlet only white page -


I try to serve HTML pages as PDF using wkthmltopdf, but only as output Get a white PDF page

This is my small snippet inside the doPost method:

  process process = runtime.gettime (). Exec ("c: \\ Program Files \\ wkhtmltopdf \\ bin \\ wkhtmltopdf .exe http://10.80.2.234/details.jsp?99999 -"); BufferedReader Reader = New BufferedReader (New InputStreamReader (process.getInputStream ())); OutputStream Out = resp.getOutputStream (); Resp.setContentType ("application / PDF"); Int bytes; While ((byte = reader.read ())! = -1) {out.write (bytes); } Reader.close (); Out.close ();  

Using : \\ Program Files \\ wkhtmltopdf \\ bin \\ wkhtmltopdf.exe http://10.80.2.234/details.jsp?99999 - & gt; Test.pdf from the command line is working fine.

Thank you in advance for your help.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -