Convert HTML to PDF

Before you say it's a duplicate of another question, please read on.

My development environment is :

  • CodeIgniter
  • Twitter Bootstrap
  • What I need :

  • To be able to convert a piece of HTML code (or a complete webpage for that matter), exactly as it appears as a PDF.
  • Hints :

  • I know about domPDF (a common solution, with a helper already available for CodeIgniter users), and I've used it in the past; the thing is it does NOT support real conversion (if I have to convert all my bootstrap css to tables, then it's close to useless).
  • I'm thinking of using some terminal utility (triggered via ajax?), like wkHtmlToPdf

  • What would you suggest?


    I have successfully used wkHtmltoPdf in the past to convert HTML pages to PDF. One thing of caution however is to check and if necessary strip out javascript in the HTML pages, because from time to time, I have found that sometimes they screw up the rendered PDF. Do not worry about pre-written CI helpers, you can easily integrate wkHtmltoPDF as a library in CI

    链接地址: http://www.djcxy.com/p/88530.html

    上一篇: 将Html转换为包含图像的pdf

    下一篇: 将HTML转换为PDF