Closed kurtkk closed 9 years ago
Following setup should work:
page.includeCSS.test = test.css
page.includeCSS.test.media = print
test.css:
#mm {display:none;}
With TypoScript option: plugin.web2pdf.settings.pdfStyleSheet
you can change media of chosen stylesheet to screen
or all
. Default one is print
.
So it only works if you have enclosed the css-items with @media print { … }
without @media print { … } you have to rename the css-file to print.css!
Sorry, I wouldn't close this issue! ;-)
It seems that the @media instruction in external files is ignored by mPDF library. Therefore you should use an own external stylesheet for printing. Like I wrote before, you should include it media type "print". In this file there is no need for the @media statement.
I tried it like this: TS: page { includeCSS { print =[...]/Resources/Public/Styles/print.css print.media = print } } plugin.web2pdf.settings.pdfStyleSheet = print
print.css:
But my PDF ignores all styles. What am I doing wrong?
@topfender Did you include the static template?
yes
Which TYPO3 Version do you use?
6.2.14
What does it mean?
in Typoscript an own includeCSS with media = print!? page.includeCSS { file2 = ... pdf.css file2.media = print }
OR / AND
in the main.css file a part like this: @media print { #mm { display:none; } }
Both don't work!?