Closed arentsen closed 11 months ago
Did you use the date
option?
So we fixed the issue about headers and footers because in many systems it can't be passed, we changed variable ?? null
into isset()
.
Do you use a footer template? Because you passed an empty variable into a footer. It can be as not a founded template, and the content of the header (the top) is similar to the default Craft CMS page.
When you use date
option in pdfOptions your PDF may not be updated for a long time...
Also, the header can be defined as the root of templates
folder without the slash /
, so in this example, many of our solutions header and footer templates are defined as the following PDF Options in _pdf
folder of templates
:
{% set pdfOptions = {
...
header: "_pdf/header.twig",
footer: "_pdf/footer.twig",
...
}
%}
Thank you, that is helpful. No, I took out the date function since it did not work, but now it looks like it works again! Thanks for the update.
The pdf generator used to work find, but since a short time (I guess since the plugin update of last week), the pdf text shows the following CSS text on top of the text of the document:
It shows like this:
Also, my local installation gives an error message:
Template „“ could not be found.
on this line (which is not cached):
<a href="{{alias('@web')}}/{{craft.documentHelper.pdf("artists/_biography-pdf.twig", "file", 'pdf/' ~ entry.title ~ '-' ~ craft.app.language|upper ~ '.pdf' ,entry, pdfOptions) }}" download target="_blank">Download Bio {{ craft.app.language|upper }}</a
and the pdfOptions is defined as follows: