Description
Create a pdf. Returns the PDF as a string.
Comments
Control the page margin in CSS with:
[%@page {
margin: 0;
}%]
Examples
[%content_type("pdf");
echo pdf("<p>Hello, World!</p>");%]
[%content_type("pdf");
echo pdf(twig("report.html.twig", $context));%]
|
Parameters4
Coding name |
html
|
Description |
The HTML source code of the PDF.
|
Position |
1
|
Type |
String(Primitive type)
|
Coding name |
size
|
Description |
The size of the document.
|
Position |
2
|
Type |
String(Primitive type)
|
Default value |
A4
|
Coding name |
orientation
|
Description |
The orientation of the document.
|
Position |
3
|
Type |
String(Primitive type)
|
Default value |
portrait
|
Coding name |
compress
|
Description |
Wheter the PDF should be compressed.
|
Position |
4
|
Type |
Boolean(Primitive type)
|
Default value |
true
|
|