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

Themes not working in PDF export #6269

Closed
tholonia opened this issue Feb 4, 2025 · 1 comment
Closed

Themes not working in PDF export #6269

tholonia opened this issue Feb 4, 2025 · 1 comment

Comments

@tholonia
Copy link

tholonia commented Feb 4, 2025

  • [ x] Searched existing issues to avoid creating duplicates.

  • [ x] Confirmed that it can be reproduced in built-in themes without customized css.

    If it only exists in 3rd party themes or css, you can still report it, but please attach the theme target or the css file. We may not "fix" it, if it is caused by 3rd party themes or css styles that we cannot support.

  • [ x] Searched http://support.typora.io/


Describe the bug
Regardless of what theme I select, custom or built-in, the PDF export always uses the same theme, which looks like Githib or Pixyll.

Desktop (please complete the following information):

  • OS: Arch/Manjaro Linux 64bit]

Typora Version
1.9.3

Additional context

The problem is quite simple, but the cause is obscure. This is the typora log file, which makes the issue clear. The problem is that I have no way to see what is throwing that error. The renderer console simply says "export PDF to /home/jw/src/iching_cli/book/v2/bin/docs/iching.pdf", and no errors.

INFO 2/4/2025, 1:16:51 AM [focus] 1
INFO 2/4/2025, 1:17:03 AM load file [/tmp/Typora/1738642623784-0.9011948934280007.html] for PDF export
INFO 2/4/2025, 1:17:03 AM generate print preview window with id 6
INFO 2/4/2025, 1:17:05 AM load file [/tmp/Typora/1738642625176-0.7482365456495663.html] for PDF export
INFO 2/4/2025, 1:17:05 AM [blur] 1
INFO 2/4/2025, 1:17:05 AM [win] blur
INFO 2/4/2025, 1:17:05 AM generate print window with id 7
INFO 2/4/2025, 1:17:09 AM [focus] 1
INFO 2/4/2025, 1:17:09 AM [RenderProcess 1][Log] export PDF to /home/jw/src/iching_cli/book/v2/bin/docs/iching.pdf
INFO 2/4/2025, 1:17:28 AM get PDF data
ERROR 2/4/2025, 1:17:28 AM unhandledRejection Error: Script failed to execute, this normally means an error was thrown. Check the renderer console for the error.
at node:electron/js2c/sandbox_bundle:2:58441
at IpcRendererInternal. (node:electron/js2c/sandbox_bundle:2:52634)
at IpcRendererInternal.emit (node:electron/js2c/sandbox_bundle:2:34768)
at Object.onMessage (node:electron/js2c/sandbox_bundle:2:50712)
INFO 2/4/2025, 1:17:28 AM get background color

I am using
pandoc 3.1.11.1, and I have used it from the command line to make sure it is working.
electron v33.3.0

Note: /tmp/Typora/1738642623784-0.9011948934280007.html just says "test", which I assume is testing that PDF export works. but 1738642625176-0.7482365456495663.html is the complete HTML exported file with the same bad theme, so the theme isn't even making it to HTML. However, if I export to HTML it's fine. I can also use pandoc...

pandoc iching.html -o output.pdf --pdf-engine=xelatex

and that works also (but missing some Chinese chars). If I do not use Xelatex, is crashes on LaTeX. Error: Unicode character ䷀ (U+4DC0) not set up for use with LaTeX, but the point is, it works fine in pandoc.

Any ideas on how to debug?

@abnerlee
Copy link
Contributor

abnerlee commented Feb 4, 2025

Please check your export theme setting in Preferences Panel → Export → PDF

Is it "Current Theme"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants