Docverter / docverter

Docverter Server
Other
831 stars 100 forks source link

html with css to pdf #15

Closed fezfez closed 11 years ago

fezfez commented 11 years ago

Hi,

Im trying to convert html with css to pdf but css is ignored.

the command : curl http://c.docverter.com/convert -F from=html -F to=pdf -F css=@fdr.css -F input_files[]=@fdr_latin.html > test.pdf

Best regards

peterkeen commented 11 years ago

The css option doesn't work with html -> pdf, since it doesn't get run through pandoc at all. You can include it in the other_files[] option:

curl http://c.docverter.com/convert -F from=html -F to=pdf -F input_files[]=@fdr_latin.html -F other_files[]=@fdr.css > test.pdf

and then in your HTML include it as a stylesheet reference:

<link rel="stylesheet" type="text/css" href="fdr.css" media="print"></link>
fezfez commented 11 years ago

Thanks you, i resolve my probleme :). Just another question, can i use this command in production environnement ?

peterkeen commented 11 years ago

For a production environment I would ask you go through the steps to install it on your own heroku account as documented in the README. The public instance is mostly for testing things out.

--Pete

fezfez commented 11 years ago

Ok, anyway thanks you for this awesome tools !

Best regards