carboneio / carbone

Fast and simple report generator, from JSON to pdf, xslx, docx, odt...
https://carbone.io
Other
1.3k stars 190 forks source link

[Feature Request]: Enable HTML > PDF conversion #99

Open TimCsaky opened 4 years ago

TimCsaky commented 4 years ago

Environment Carbone Version: 2.1.1 Node Version: 12.*

Problem to solve With older versions of Carbone we were able to convert HTML templates to PDF reports. Since upgrading to Carbone v2.* we found this wasn't working. As confirmed in the documentation XML to PDF isnt currently supported: https://carbone.io/documentation.html#supported-files-and-features-list

Proposed solution It turns out we were able to get our HTML templates converted to PDF by adding in the HTML doctype definition at the top of the HTML template file:

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">

Maybe this will help somebody. Could be added to the documentation somewhere(?) Thanks for Carbone.. it's a useful tool!

dgrelaud commented 4 years ago

We try to fix that as soon as possible in october.

dgrelaud commented 4 years ago

Thank you for your bug report ;)