Skip to content

Instantly share code, notes, and snippets.

@WietseWind
Last active June 24, 2016 12:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WietseWind/ff620d1cf5d6801312d395f5ff39b774 to your computer and use it in GitHub Desktop.
Save WietseWind/ff620d1cf5d6801312d395f5ff39b774 to your computer and use it in GitHub Desktop.
PDF maken en opslaan o.b.v. variabelen
<h1>Formulier</h1>
<p>Hele mooie resultaten</p>
<b>Naam:</b> {{ naam }} <br />
<b>Adres:</b> {{ adres }} <br />
<b>Plaats:</b> {{ plaats }} <br />
<b>Telefoon:</b> {{ telefoon }} <br />
<h1>Nieuwe <b>{{ 'PAGINA'|t|lower }}</b> (bestand: formlierpdfje)</h1>
<p>Nu nog content...</p>
{% set pdf = api.PDF_generate( 'formulier', 'document.pdf', 'portrait', {
naam : 'Wietse',
adres : 'xxxstraat 72',
plaats : 'Amersfoort',
telefoon : '022588888'
} ) %}
{% do api.IO_staticFile(pdf.name).set(pdf.data) %}
{% do mail.send('john@doe.nl', 'john@doe.nl', 'Dit is een test', 'gegeten', {
naam:"Wietse",
gegeten: [{eten:"paprika"},{eten:"Brood"}]
}, [ pdf ]) %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment