# Zooming in/out in preview mode changes font size in exported pdf

#### Ufuk Kizilgedik

27 Mar, 2017 05:33 AM

Thank you for the help.

// Please enter a detailed description of the issue
// Description of the issue: Zooming in or out in preview mode changes the font size in the exported pdf.

// Please enter a list of steps required to reproduce the issue
// Steps to reproduce:

1. Open a random text in Marked2
2. Zoom in, say to 160%
3. Export to PDF or print. Here you have huge letters.

// If applicable please attach a sample document that causes the issue for you.

// Configuration (do not edit)
Marked 2 930 (Direct)
OS X Version: 10.11.6
---
allowPageBreakInCode: 1
bookTxtIsLeanpub: 0
summaryMdIsGitBook: 0
codeIsPoetry: 0
convertGithubCheckboxes: 1
convertYAMLToMMD: 1
defaultMathJaxConfig: TeX-AMS-MML_HTMLorMML
defaultPreviewStyle: 101
defaultProcessor: MultiMarkdown
enableMiniMap: 0
excludeBlockQuotesFromCounts: 0
excludeFootnotesFromCounts: 0
excludeVerbatimFromCounts: 0
excludeCaptionsFromCounts: 0
folderPreviewExtensionsArray: md, markdown, txt, mdown, html, opml
githubNewlines: 0
h1IsPageBreak: 0
h2IsPageBreak: 0
hrIsPageBreak: 0
includeMathJax: 0
limitTextWidth: 1
minimalJavaScript: 0
outlineModeExtensions:
permissionGranted: 1
processHTMLFiles: 1
scrollToEdit: 1
shouldDetectCritic: 1
shouldHighlightMarkupErrors: 1
syntaxHighlight: 1

1. Support Staff Posted by Brett on 27 Mar, 2017 05:01 PM

This is currently expected behavior. It provides an easier way to adjust
the output size than having to specify a universal font size or custom
CSS for print/PDF output of a given document. I understand that it's not
necessarily intuitive, though, so I may add an export option to always
print/export at 100%.

-Brett

2. Posted by Scott James on 12 Jun, 2018 04:34 PM

Apologies if this is already answered, I've seen this topic come up in different contexts on but couldn't figure out the final answer.

My goal is to produce a document with 10pt font (not by choice, FWIW, by requirement). I ended up doing the following:

• Choose Swiss
• Select 70% zoom because I see in CSS:

body {
font-size: 15px; --> 10/15 ~ .67 line-height: 21px; margin: 0 auto; }

So this works Good Enough. What I'm not so clear on is the meaning of the option:

"Custom font size for export ".

Clicking On and Setting this to different values seems to change the exported output but not to 10 pt. Perhaps some sort of scaled-10-pt?

3. Support Staff Posted by Brett on 13 Jun, 2018 07:25 PM

The custom font size essentially adds a font-size: XXpx !important to the output, which should override whatever is in the style. It's a bit screwy right now, as half of the built-in styles are using rem/em to base sizes off of what's specified for the html/body. Because I assume that when setting a custom font size, users would still want headlines and other elements that differ from the paragraph font size to scale accordingly, I'm going to need to find a way to normalize the themes and provide a mechanism that will work with unpredictable custom themes.

So at this point, the "Custom font size for export" is a bit of a gamble. If you need an exact output font size, the best bet right now is to create a custom theme that outputs exactly what you intend. All of the CSS for the default styles as well as a collection of custom styles is available at https://github.com/ttscoff/markedcustomstyles.

-Brett

4. Posted by scott.james on 15 Jun, 2018 02:14 PM

Thanks for the detailed explanation. They accepted my zoom-ing hack for now, so I’m good. But if they get persnickety I’ll do as you say with the explicit CSS.

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

### »

#### Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

# Keyboard shortcuts

### Generic

? Show this help Blurs the current field

### Comment Form

r Focus the comment reply box Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

## Recent Discussions

 19 Jul, 2019 09:20 AM why is PDF font enormous ? 15 Jul, 2019 03:26 PM Support Multimarkdown File Transclusion / Import 05 Jul, 2019 07:54 PM my CSS files are a mess 20 Jun, 2019 11:33 AM Page Numbers on PDF export? 19 Jun, 2019 03:31 PM ![image](image-url) problem

## Recent Articles

 Using JavaScript in Marked Custom CSS: Writing custom CSS for Marked License code has already been utilized Highlight sentences longer than a certain number of words How do I retrieve a lost license (direct version)