If you create an @media print section in your userstyle.css file any css stored within that section will only apply when the note is printed / exported to pdf.
@media print {
@page {
margin: 2cm 2cm 2cm 3cm;
/* adds margins for the page - margin order top, right, bottom, left */
}
element {
setting: value;
/* example */
}
}
As I only use a mono printer I use this to modify everything to render in black and white, but because it only applies to printing it does not affect anything on the screen. In fact I have divided my userstyle.css file into two sections; one for the screen and one for printing. This is just to keep the different requirements separate.
@media screen {
body {
font-size: 14px;
/* example - on the screen the body text will be 14px*/
}
}
@media print {
body {
font-size: 12px;
/* example - when printed the same body text will be 12px*/
}
}
This is great, thanks for sharing. Any chance to add bookmarks as per the outline of the markdown? I can add toc, but that not appears as bookmarks as it does while exporting to pdf via Typora.
Thank you in advance
I am not a developer so I do not know if what you ask is possible. If one of the devs sees this then maybe they could comment if the component used to create PDFs can be set to create bookmarks from headings.