Notion Answers

Help between Notion users


Register & Ask

It's free & easy

Get answers

Answers, votes & comments

Vote and select answers

Receive points, vote and give the solution

Question

1vote

How to export page that have code block in it?

Hello, I was doing a flowchart on notion using Mermaid. I don’t know how to code but I managed to make a simple, good enough flowchart. However, when I exported the page as a PDF it showed me the code itself rather than the flowchart that I could see in the preview in my notion. How do I fix that?

0vote

polle commented

Please share an example in Notion to see how you have the blocks.

1vote

Fantazzma commented

So I just opened the code block, set it to mermaid, and wrote the code down

flowchart TD
id1[Research identified trough data-base search n = 132] --> id2[Research who's title meets the inclusion criteria n = 46]
id2 --> id3[Research that meet the inclusion criteria n = 26]

after that I set the code block to "Preview" and tried to export the page as pdf, but the pdf file showed the text above and not the flowchart that it was suppose to.

2 Answers

0vote

polle Points77470

I did some tests and that is how Notion interpret the block, because it is actually a code block, so that is what the PDF export gets.

A solution for this can be to screenshot the preview you want and paste it as an image directly.

0vote

turnipjs Points180

Usually I export directly as a PDF, but when there is a Mermaid diagram I go to the Notion website in a web browser, hide the side bar, change the width of the window, and File > Print. I actually use the mouse on the menu bar because the hotkey is overridden, at least on Mac. Very annoying but this is a solution that works for me.

Please log in or register to answer this question.

...

Welcome to Notion Answers, where you can ask questions and receive answers from other members of the community.

Please share to grow the Notion Community!

Connect