Textsize in print is to large and can not be changed.

Viewed 11

Hi,

I have a custom stylesheet with

body {
  font-family: "Cargan", "Cargan Regular", Georgia, -apple-system,
    BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell",
    "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  max-width: 50em;
}

It works ok in Marked 2.

In Marked 3 the font size is much larger. And the override font size in the PDF export window is ignored.

Also CSS for print is ignored:

@media print {
  font-size: 12pt;
}

Yours
derheap

PS: The image upload is not working. I select a PNG and the popup keeps complaining: ›The file can not be empty‹

If @media print is going to have any effect, it should have a selector inside of the print block

[@media](/users/media) print {
  #wrapper { font-size: 12pt; }
}

#wrapper is the preferred selector for adjusting the preview, inside or outside of a print block.

I don't know why it won't let me just type @ media print, it keeps trying to link that. But you know what that should look like.

I keep making this error all the time. But still it does not work.

2 Answers

Are you talking specifically about the font size in exported PDFs? I thought I had fixed the font size override. @print styles will have no effect on v3, as it no longer uses the print system to generate PDFs. I'll look at the font size override, though. I'm not sure what you're running into with PNG uploads, but could you create and attach a zip with your stylsheet, an example Markdown document, and any additional screenshots you think would help me fully replicate the issue?

I have confirmed that the font size override works with the built-in styles. I think the issue you're running into probably has to do with using the body tag instead of #wrapper in your stylesheet. You can also consider adding !important to the font-size property to ensure it takes effect.

It’s a bit strange.

I changed the body selector to #wrapper and enlarged the font-size to 2 em as a demo.
The size is scaled down in the print preview, even if override is not checked. With override the font is in the same size. Which for my judement is not 9pt, more 12pt. Enlarging works.

How to attach a ZIP?

Something is wrong with attachments here, I'll have to look into it. Can you share via Dropbox or iCloud and give me a link?

Ah, it moved. Click the paper clip icon in the toolbar on your answer (won't work in comments).