13

Converting html to a pdf is the worst thing to do ever.

Comments
  • 0
    why not render it with phantom js and render it to a PDF?
  • 1
    Used to think PDF was amazing for documents...then had to get data out of a PDF...don't think anything else needs to be said.
  • 0
    @kanduvisla that looks like it could be very useful, however I am not in a position to suggest new a frame work or process. There are already several places in our web app that generates pdf's from html. Granted they are not including images, which seems to be my downfall.
  • 1
    some day soon, I'm gonna need this thread.
  • 0
    I can recommend mPDF (PHP). Was using DomPDF but that thig has so many undocumented random bugs (Including infinite loops on nested tables...)
  • 1
    Wrap the HTML in an electron app and bundle it up.. Look mom I don't even need Adobe to read it. Just kidding. HTML to PDF sucks.. Wait PDF sucks lol.
  • 0
    in ASP i use abcpdf to build pdf output - you can write html to the document
  • 0
    absolutly, we found PhantomJS working good.
  • 0
    Wkhtmltopdf is the best I've found, but still quirky and even harder when going through Drupal. This took up all last week.
  • 0
    @dkomito that is what I am using, and what other devs have used at work. However none of them are generating pdf's with images which is where everything is exploding for me.
  • 1
    stretch your window to be A4 width. take a picture. save picture to PDF. Looks just like it did on the web :-) tehehe
  • 0
    Adobe Acrobat can do this :/
  • 1
    @ghostlkr hmmm images haven't been a problem for me, but It's not surprising.
  • 0
    @dkomito I am displaying a grid of products in a table, and there is always at least one row on one of the pages that add about 50px or more of padding throwing off the entire page.
  • 0
    @ghostlkr Ah! I experienced a problem with tables adding an extra page. I think table{ table-layout: fixed } helped in one instance, but had to just give-up and use floated divs.
  • 0
    @ghostlkr I think had some success when the table was not the last element as well.
  • 0
    Its really interesting
Add Comment