News for hackers. Stuff that matters.
Re:Apache PDFBox – A Java PDF Library by tmd83 on Monday March 21, 2016 @01:33PM (#11329911)
Anyone has a solution to make pdf from html thats hosted. The java library flyingsaucer is stuck at css 2.1 and not much maintained. I have been meaning to check wkhtmltopdf which will need launching a process but might be the best bet for such work. Anyone has better experience in doing something similar?
Re:Apache PDFBox – A Java PDF Library by noir_lord on Monday March 21, 2016 @03:03PM (#11330812)
I used wkhtmltopdf on a project, custom built a version of bootstrap from the less files purely for outputting via wkhtmltopdf, it worked really well and produced some nice looking PDF's.

https://youtu.be/TC_uv_AD808?t=1m31s all the PDF's in that video where generated, that was an early alpha of the product.

Re:Apache PDFBox – A Java PDF Library by silvestrov on Monday March 21, 2016 @02:02PM (#11330197)
http://www.princexml.com is very good for complex multipage documents but unfortunately it's very expensive.
Re:Apache PDFBox – A Java PDF Library by a3camero on Monday March 21, 2016 @02:32PM (#11330529)
I implemented this over the weekend using a small VM instance from Google Cloud + PDFBox 2. I set up Apache, wrote a quick PHP script that takes in the URL of the PDF to be converted, downloads it, converts it to HTML with PDFBox and then prints the HTML. I then linked this small piece into a bigger system that uses the converted HTML.
Re:Apache PDFBox – A Java PDF Library by aviraldg on Monday March 21, 2016 @01:47PM (#11330035)
wkhtmltopdf works quite well, I've used it before. A bit of a hassle to get it compiling though.
Re:Apache PDFBox – A Java PDF Library by rpedela on Monday March 21, 2016 @02:13PM (#11330306)
I have also had great success with wkhtmltopdf. There are pre-built binaries available too: http://wkhtmltopdf.org/downloads.html
Re:Apache PDFBox – A Java PDF Library by burraboc on Monday March 21, 2016 @02:23PM (#11330418)
I've used phantomjs through the command line for generating pdfs from html using the screen capture functionality (http://phantomjs.org/screen-capture.html).
Re:Apache PDFBox – A Java PDF Library by novaleaf on Monday March 21, 2016 @03:31PM (#11331105)
phantomjscloud.com, there's a html-to-pdf example on the front page.

disclaimer: i wrote it