When exporting a note with code blocks to a PDF, page break gets inserted mid-line

Info

  • Platform: Ubuntu
  • Platform version: 16.04
  • App Version: 3.18.0

Reproduce

  1. Have a note with some multi-line code block.
  2. Export the note as PDF.

Expected result: If a code block line can’t fit onto a page, the code block should break and a new page should start with a new code block containing the next line.

Actual result: Notice how the page break splits the line across two pages:

That said, this is a really minor annoyance to me (I don’t mind it much), but I couldn’t find anyone else reporting it before me, so ¯\(ツ)/¯.

Hi Aleksandar,

Thank you for reporting it.
This is weird but I guess it’s a problem in Chromium because the app just prints a generated HTML as PDF.
It works fine on macOS:

You are on Ubuntu, so it seems to be a platform-dependent problem.
It may get fixed when upgraded Electron’s version in the future.

A workaround would be to export it as HTML and print it from your browser.

Thanks!