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

ERR:Failed to export as PDF. undefined #5785

Closed
lyboos opened this issue Jul 21, 2023 · 5 comments
Closed

ERR:Failed to export as PDF. undefined #5785

lyboos opened this issue Jul 21, 2023 · 5 comments

Comments

@lyboos
Copy link

lyboos commented Jul 21, 2023

[ DONE ] Searched existing issues to avoid creating duplicates.

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

[ DONE ] Searched http://support.typora.io/

Describe the bug
Failed to export to PDF, Typora says "Failed to export as PDF. undefined."

To Reproduce
Steps to reproduce the behavior:

Go to 'File'
Click on 'Export'
Scroll down to 'PDF'
See error (Obsidian has the same problem and I'm sure that Print Spoller is running)
Expected behavior
PDF export should succeed.

Screenshots / Screencasts
Now I want to show the log file from %APPDATA%/Typora:INFO 2023/7/21 16:34:19 File.option.applyImageMoveForLocal = false
INFO 2023/7/21 16:34:20 File.option.applyImageMoveForWeb = true
INFO 2023/7/21 16:34:20 File.option.applyImageMoveForLocal = true
INFO 2023/7/21 16:34:21 File.option.applyImageMoveForWeb = false
INFO 2023/7/21 16:34:37 [blur] 1
INFO 2023/7/21 16:34:37 [win] blur
INFO 2023/7/21 16:34:38 [focus] 1
INFO 2023/7/21 16:34:39 [blur] 1
INFO 2023/7/21 16:34:39 [win] blur
INFO 2023/7/21 16:35:49 [focus] 1
INFO 2023/7/21 16:35:50 [blur] 1
INFO 2023/7/21 16:35:50 [win] blur
INFO 2023/7/21 16:42:23 [blur] 1
INFO 2023/7/21 16:42:23 [win] blur
INFO 2023/7/21 16:42:23 [focus] 1
INFO 2023/7/21 16:42:25 load file [C:\Users\ASUS\AppData\Local\Temp\Typora\1689928945613-0.6122815334844249.html] for PDF export
ERROR 2023/7/21 16:42:25 Error: ERR_FAILED (-2) loading 'file:///C:\Users\ASUS\AppData\Local\Temp\Typora\1689928945613-0.6122815334844249.html'
at rejectAndCleanup (node:electron/js2c/browser_init:2:77411)
at EventEmitter.stopLoadingListener (node:electron/js2c/browser_init:2:77786)
at EventEmitter.emit (node:events:513:28)
at EventEmitter.emit (node:domain:489:12) {
errno: -2,
code: 'ERR_FAILED',
url: 'file:///C:\Users\ASUS\AppData\Local\Temp\Typora\1689928945613-0.6122815334844249.html'
}Sample Markdown File
EVERY file has this problem.

Desktop (please complete the following information):

OS: [Windows 10 64bit]
Typora Version
Multiple Versions alle failed to export as PDF on my computer, and Obsidian failed too.

Additional context
my version is 1.6.7 it hasnt been fixed!

@Anonymi1ty
Copy link

My Typora also had such a problem and reported the same error as the above log file, version 1.6.7

Additional context
This problem occurs only when exporting a PDF

@Micromalusx
Copy link

My Typora also has such a problem and reported the same error as the above log file, versions 1.6.7 & 1.7.4 both have the problem. All the main methods on the Internet cannot solve this.

@abnerlee
Copy link
Contributor

Typora uses temp file during the export process. It load fails from your log. So do you have any security app or rules that does not allow Typora to save or load temporary file (under C:\Users\ASUS\AppData\Local\Temp\Typora)?

@lyboos
Copy link
Author

lyboos commented Nov 1, 2023

Typora uses temp file during the export process. It load fails from your log. So do you have any security app or rules that does not allow Typora to save or load temporary file (under C:\Users\ASUS\AppData\Local\Temp\Typora)?

I have checked my security rules, and it has not prevented Typora. It should have no security group-related restrictions. Based on your prompt, I found out that it was Typora that failed to load this HTML after generating the temporary HTML, causing the error that could not be exported.

@abnerlee
Copy link
Contributor

should be fixed in 1.8.10

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

4 participants