Frontmatter is not visible when printing

Steps to reproduce

  • Update obsidian to the latest version 1.1.9
  • Open an obsidian file
  • Export page as PDF

Expected result

I expect to see a PDF file with the front matter at the top.

Actual result

The front matter is not visible in the PDF file any longer.

Environment

  • Operating system:
    Windows 10 22H2 64x

  • Debug info:

SYSTEM INFO:
Obsidian version: v1.1.9
Installer version: v1.1.8
Operating system: Windows 10 Pro 10.0.19045
Login status: not logged in
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: light
Community theme: none
Snippets enabled: 3
Restricted mode: off
Plugins installed: 27
Plugins enabled: 26
1: Editor Syntax Highlight v0.1.3
2: Natural Language Dates v0.6.1
3: Dataview v0.5.47
4: Auto Note Mover v1.2.0
5: Better Word Count v0.9.1
6: LanguageTool Integration v0.3.3
7: RTL Support v0.3.0
8: Review v1.6.4
9: CSV Table v1.2.0
10: Excel to Markdown Table v0.4.0
11: TimeStamper v1.3.0
12: Footnote Shortcut v0.0.9
13: Better footnote v1.0.1
14: Table of Contents v0.1.3
15: Contextual Typography v2.2.4
16: JSON/CSV Importer v0.24.0
17: Sortable v0.2.6
18: Advanced Tables v0.18.1
19: Tracker v1.10.9
20: Projects v1.5.0
21: Periodic Notes v0.0.17
22: Completr v3.1.0
23: Yaml Manager v1.3.3
24: DB Folder v3.1.0
25: Dynamic RTL v0.2.11
26: Calendar v1.5.10

RECOMMENDATIONS:
Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.


Additional information

thanks

Hi there, I’ve been able to solve this problem. If you want the front-matter block to be shown as before when you’re previewing or printing a page, add the following css lines into your custom css file:


/* making the frontmatter visible */

.frontmatter.language-yaml {
	display:block !important;
}

.frontmatter-section {
	display:none !important;
}

.frontmatter-section.mod-tags, .frontmatter-section.mod-aliases {
	display: block !important;
}

Here’s before this css:

Here’s after this css:

You’re welcome :smiley:

2 Likes

It’s a real lifesaver that Obsidian is open source. Anyone can make changes to it to suit their needs. Thanks Obsidianmd team.

Obsidian is not open source, at all.

It is text-based with html5 features, and first-class plug-in support.

But it’s important to understand that the client, sync, canvas, and publish are all closed-source products.

This means that despite many of the good (for the user) design decisions, the product cannot be forked and maintained by others if the team begins making decisions that are not tenable.

It also means that vulnerabilities are obfuscated and can only be mitigated by internal team

It’s important to understand where risks still exist when adopting a tool as awesome as this.

thank you so much nmelin for your reply.

It means a lot to me. True, the core plugins are maintained by the Obsidian team. But even the fact that an ecosystem of developers can help expand this tool and the end users can make changes to their version is a really good one. I come from the background of using Notion where everything was managed by the Notion team. So this level of freedom of changing the software to our preferences is something that I really appreciate. However, as you mentioned there are still risks of using this kind of a software.

Thanks again mate,
Zachary.

Hi, I’ve written a Medium blog on how to fix this problem. Take a look and let me know if it solved your problem.

Thanks.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.