Error when attempting to export paginated PDF.

Eivind Birkedal's Avatar

Eivind Birkedal

18 Oct, 2017 01:16 PM

// Please enter a detailed description of the issue // Description of the issue:

Unable to completely export my markdown document as a pagniated PDF. I can print, and print to pdf via macOS' native menus, but it does not respect page breaks like export to paginated PDF would normally do.

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

  1. Open my document in Marked
  2. Choose to export my document as paginated PDF
  3. Get window with “Error while printing”.

I’ve tried the native styles as well but encounter the same issue.

// 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.13

allowPageBreakInCode: 1
bookTxtIsLeanpub: 0
summaryMdIsGitBook: 0
codeIsPoetry: 0
collapsibleHeadlines: 1
convertGithubCheckboxes: 1
convertYAMLToMMD: 0
defaultMathJaxConfig: TeX-AMS-MML_HTMLorMML
defaultPreviewStyle: 100
defaultProcessor: MultiMarkdown
enableMiniMap: 1
excludeBlockQuotesFromCounts: 1
excludeFootnotesFromCounts: 1
excludeVerbatimFromCounts: 1
excludeCaptionsFromCounts: 1
folderPreviewExtensionsArray: md, markdown, txt, mdown, html, opml
githubNewlines: 1
h1IsPageBreak: 0
h2IsPageBreak: 0
hrIsPageBreak: 0
includeMathJax: 1
limitTextWidth: 1
minimalJavaScript: 0
permissionGranted: 0
printHeaderBottomRight: %page
printHeaderFooterFirstPage: 0
processHTMLFiles: 1
removeMetadataForPreview: 0
removeYAMLHeaders: 0
scrollToEdit: 1
shouldDetectCritic: 1
shouldHighlightMarkupErrors: 1
shouldLoadCritic: 0
syntaxHighlight: 1

  1. Support Staff 1 Posted by Brett on 18 Oct, 2017 05:47 PM

    Brett's Avatar

    Is this only with this particular document? Is paginated pdf export
    working well with other documents?


  2. 2 Posted by Eivind Birkedal on 19 Oct, 2017 07:10 AM

    Eivind Birkedal's Avatar

    I tried reproducing it when I came in to work today, and now everything is working perfectly again. So the issue can be closed. I don't know if the solution was the computer going to sleep, or just relaunching, but the export now works properly.

    I'll do more extensive testing should the issue reoccur.

  3. 3 Posted by Eivind Birkedal on 19 Oct, 2017 09:26 AM

    Eivind Birkedal's Avatar

    I've encountered the error again, and I think I've found the issue. The error occured when I moved office, and plugged into my external display (Apple Cinema Display). Marked was already opened with the document before connecting to it.

    It seems it encounters an error if connected to an external display, and it will not correctly export paginated PDFs, even if disconnected from the display again.

    Quitting Marked and reopening the document in Marked will let you export the document correctly again.

    So there appears to be some sort of issue when the screen resolutions change while having a document open.

  4. Support Staff 4 Posted by Brett on 19 Oct, 2017 04:25 PM

    Brett's Avatar

    Interesting. Is the display on your laptop Retina? I've had issues like
    this (though not related to the print system) with other apps when
    moving from Retina to my Thunderbolt display while the app is open...


  5. 5 Posted by Eivind Birkedal on 19 Oct, 2017 07:37 PM

    Eivind Birkedal's Avatar

    Yes, specifically a MacBook Pro (Retina, 13-inch, Early 2015).

    To be clear I'm able to export a paginated PDF while connected to the Thunderbolt Display, but I need to restart Marked to have it work correctly.

  6. Support Staff 6 Posted by Brett on 19 Oct, 2017 07:56 PM

    Brett's Avatar

    I think something isn't registering with the print system when the
    resolution changes. I can add a forced refresh when the screen
    resolution changes and see if that fixes it. I have the same setup, I'll
    have to test and make sure I can replicate.


Reply to this discussion

Internal reply

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

Attaching KB article:


Already uploaded files

  • 42.1 KB

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


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac