Options
{
"pdf": {
"html": HTML,
...
}
}Pdfcrowd options
Debugging
Example
Last updated
Was this helpful?
{
"pdf": {
"html": HTML,
...
}
}Last updated
Was this helpful?
Was this helpful?
{% capture html %}
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Liu+Jian+Mao+Cao&display=swap" rel="stylesheet">
<style>p { font-family: 'Liu Jian Mao Cao', cursive; }</style>
<p>Almost before we knew it, we had left the ground.</p>
<div id="tester" style="width:100%;height:40vh;"></div>
<script src="https://cdn.plot.ly/plotly-2.2.0.min.js"></script>
<script>
// from https://plotly.com/javascript/getting-started/
TESTER = document.getElementById('tester');
Plotly.newPlot( TESTER, [{
x: [1, 2, 3, 4, 5],
y: [1, 2, 4, 8, 16] }], {
margin: { t: 0 } } );
</script>
{% endcapture %}
{% action "files" %}
{
"file.pdf": {
"pdf": {
"html": {{ html | json }},
"page_width": "7in",
"page_height": "5in",
"margin_top": "10mm",
"margin_right": "10mm",
"margin_bottom": "10mm",
"margin_left": "10mm"
}
}
}
{% endaction %}