Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF Export Error: "Failed to add header/footer" with Null pdf Type #6216

Open
3 tasks done
HoeYeungHo opened this issue Jan 22, 2025 · 0 comments
Open
3 tasks done

PDF Export Error: "Failed to add header/footer" with Null pdf Type #6216

HoeYeungHo opened this issue Jan 22, 2025 · 0 comments

Comments

@HoeYeungHo
Copy link

HoeYeungHo commented Jan 22, 2025

  • Searched existing issues to avoid creating duplicates.
  • Confirmed that it can be reproduced in built-in themes without customized css.
  • Searched http://support.typora.io/

Describe the bug
When exporting a PDF in Typora, the following error is displayed:

Failed to add header / footer.
`pdf` must be of type `string` or `Uint8Array` or `ArrayBuffer`, but was actually of type `null`

As a result, the exported PDF does not include any header or footer content. The settings used for export are shown in the attached screenshot.

To Reproduce

Steps to reproduce the behavior:

  1. Set up the page settings as shown in the screenshot (e.g., custom margins, A4 size, and headers/footers with variables like ${pageNo} / ${totalPages}).
  2. Export a Markdown file to PDF.
  3. Observe the error message and missing header/footer in the exported PDF.

Expected behavior

Headers and footers should be correctly rendered in the exported PDF, without any errors.

Screenshots / Screencasts

Image

Image

Sample Markdown File

Any Markdown file.

Desktop (please complete the following information):

  • OS: Windows 11 64-bit
  • Typora Version: 1.10.5-dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant