index.html 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. ---
  2. layout: default
  3. ---
  4. <!-- First Band (Image) -->
  5. <div class="row">
  6. <div class="large-12 columns">
  7. <img src="images/banner.jpg">
  8. <hr>
  9. </div>
  10. </div>
  11. <div class="row">
  12. <div class="small-12 columns">
  13. <h2>What is it?</h2>
  14. <p><code>wkhtmltopdf</code> and <code>wkhtmltoimage</code> are open source (LGPLv3) command line tools to render HTML into PDF and various image formats using the Qt WebKit rendering engine. These run entirely &quot;headless&quot; and do not require a display or display service.</p>
  15. <p>There is also a C library, if you're into that kind of thing.</p>
  16. <h2>How do I use it?</h2>
  17. <ol>
  18. <li><a href="downloads.html">Download a precompiled binary</a> or build <a href="https://github.com/wkhtmltopdf/wkhtmltopdf">from source</a></li>
  19. <li>Create your HTML document that you want to turn into a PDF (or image)</li>
  20. <li>
  21. <p>Run your HTML document through the tool.<br>
  22. For example, if I really like the treatment <a href="http://google.com">Google</a> has done to their logo today and want to capture it forever as a PDF:</p>
  23. <p>
  24. <code>wkhtmltopdf http://google.com google.pdf</code>
  25. </p>
  26. </li>
  27. </ol>
  28. <h2>Additional options</h2>
  29. <p>That's great, I've always wanted to turn Google's homepage into a PDF, but I want a table of contents as well.</p>
  30. <p>There are plenty of command line options. Check out the <a href="usage/wkhtmltopdf.txt">auto-generated wkhtmltopdf manual</a>.
  31. <h2>Get Hardcore</h2>
  32. <p>Command line tools are awesome, but I want a C library.</p>
  33. <p>No problem. Check out the <a href="libwkhtmltox">library documentation</a>.</p>
  34. <h2>Real world examples?</h2>
  35. <p>Like we said, if you really like Google's homepage today and want to save it as a PDF, you could use wkhtmltopdf for that.</p>
  36. <p>Seriously, you could use it to generate invoices, create birthday cards, or all other sorts of fun things. Just use your imagination!</p>
  37. </div>
  38. </div>