How to removes the extra space on top in every page 1 in PDF export

What I’m trying to do

I’m trying to export my .md files into PDF using the build in PDF exporter, but I found out whether I use Default, Minimal, or None margin size, there always be an extra pixels on top of the first page.

Config on on the picture below:

  • Page: A4, Margin: None, Include Title: False, Landscape: False, Downscale: 100%
  • Obsidian Version: v1.3.5 MacOS

First Page

The rest of the page

The issue is, I’m unable to modify that extra pixels even using my custom snippets

Things I have tried

From many previous solutions people use the @page At-rule and @media print to select and modify printing elements.

So far what I found the only attributes i can modify in the @page At-rule is only the margin attributes, it does affect all the pages, but not removing the extra pixels that I said before and only making it larger with the extra margin

Current Solutions

Because the extra pixels only exist in the the first page, I choose to delete the entire 1st page on post using my mac preview

First I add extra div elements that break page after it’s initiation

<div class="page-breaker">delete this page</div>
.page-breaker {
    page-break-after: always;

And then delete the first page on post in my pdf editor

Asking for Help

  • Can any body tell me the css class or attributes that governs that extra pixels?
  • Recommendation of plugin that removes that extra pixels
  • or how to modify it directly on obsidian? (recommended: reference to build my own custom obsidian plugin)

Thank you for taking the time to read this long request, looking forward for your response :grin:

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