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

Typora v1.7.5 Freezes or Produce PDF with Wrong Footer are Footer is Turned On in PDF Export Setting on macOS Ventura #5846

Open
3 tasks done
g4x86 opened this issue Sep 22, 2023 · 10 comments

Comments

@g4x86
Copy link

g4x86 commented Sep 22, 2023

  • Searched existing issues to avoid creating duplicates.

  • 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.

  • Searched http://support.typora.io/


Describe the bug
Typora became unresponsive when exporting to PDF file with header/footer are turned on using internal theme.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Settings -> Export -> PDF
  2. Set Theme to an internal theme, e.g. GitHub
  3. Set Footer to a predefined tag "No. ${pageNo} / ${totalPages}"
  4. Close the dialog and export a Markdown to PDF
  5. Typora either becomes unreposive or produces a PDF file after a long delay with a text "footer" at the bottom of each page instead of the desired page numbers.

Expected behavior
Typora should produce a PDF document with correct page footer as expected.

Screenshots / Screencasts
A screenshot of PDF export setting dialog

Sample Markdown File
Diagrams.md
Diagrams.pdf

Desktop (please complete the following information):

  • macOS 13.6 (Ventura)

Typora Version
1.7.5

Additional context
Interesting, Typora v1.7.5 on Linux doesn't have this problem.

PDF Export Setting [Diagrams.pdf](https://github.com/typora/typora-issues/files/12704013/Diagrams.pdf) [Diagrams.md](https://github.com/typora/typora-issues/files/12704014/Diagrams.md)
@siddhpant
Copy link

Can confirm Linux doesn't have this problem.

@g4x86
Copy link
Author

g4x86 commented Nov 24, 2023

Today, I tested the latest Typora version 1.7.6 on my newly installed macOS Sonoma 14.1.1 (which is a completely fresh installation by wiping out everything on the hard drive including both OS and all app/user data) and this same problem persists. Now I can confirm this is a real bug of Typora on Mac.

@abnerlee
Copy link
Contributor

I cannot reproduce this in 1.8.2-dev (https://typora.io/releases/dev), could you check if it is already fixed in 1.8.2-dev?

@g4x86
Copy link
Author

g4x86 commented Dec 30, 2023

I just tried the version 1.8.2-d-ev on macOS Sonoma 14.2.1:

  1. first set the Footer in the PDF export dialog to No. $(pageNo} / ${totalPages},
  2. exported a document to PDF,
  3. a colorful lollipop cursor showed up and lasted about 30 seconds,
  4. eventually a PDF file was generated but with a footer text of "footer" at the bottom of each page. So, basically the same problem as before.

@abnerlee
Copy link
Contributor

Is there any error/warning message or popups?

@g4x86
Copy link
Author

g4x86 commented Jan 26, 2024

There is any error/warning messages either when the lollipop mouse pointer kept spinning without exporting anything or the program exported a PDF file with a footer with the text "Footer"

I just observed another bug of the latest version 1.8.7 on Debian/Ubuntu-based Linux system: PDF export function plainly stopped working (regardless of header/footer are set) with an error message: "Failed to export as PDF: undefined". Before updating, all previous versions of Typora work fine with PDF export. Furthermore, I tested the Flatpak version v1.8.6 for PDF export and surprisingly it works out smoothly. Based this overvation, my guess is that the Deb package of Linux version might use some external libraries to generate PDF, but however the latest versions have some compatibility issue with those external libraries.

So, please fix the PDF export bug in Linux deb package and also the Mac version.

Many thanks!

@g4x86
Copy link
Author

g4x86 commented Jan 26, 2024

More info regarding the PDF export problem in Debian/Ubuntu-based Linux: when I run Typora from command line and, as soon as I select Export to PDF in menu, the following error message was printed:

[25404:0125/224421.343038:ERROR:platform_shared_memory_region_posix.cc(214)] Creating shared memory in /dev/shm/.org.chromium.Chromium.0RYXNK failed: No such file or directory (2)
[25404:0125/224421.343204:ERROR:platform_shared_memory_region_posix.cc(217)] Unable to access(W_OK|X_OK) /dev/shm: No such file or directory (2)
[25404:0125/224421.343265:FATAL:platform_shared_memory_region_posix.cc(219)] This is frequently caused by incorrect permissions on /dev/shm. Try 'sudo chmod 1777 /dev/shm' to fix.

However, I checked out the permission of /dev/shm and it looks totally fine:

drwxrwxrwt 2 root root 40 Jan 25 22:46 /dev/shm/

Other programs, like PostgreSQL, have no problem in creating files in this directory. Plus, I rebooted my Linux box after installing Typora, but it didn't help.

@g4x86
Copy link
Author

g4x86 commented Jan 27, 2024

Updates:

  1. On Debian/Ubntu-based Linux, the issue of PDF export in Typora was resolved after its version was upgraded to v1.8.8.

  2. On the latest macOS 14.3, Typora v1.8.5 (regardless of installation source being either direct downloaded DMG image from official website or Homebrew) still has the same problem: once Header/Footer option was turned on, Typora had a hard time to generating corresponding PDF file with a rainbow lollipop cursor spinning more than 10 seconds and the resulted PDF file only has, e.g. "Footer" text at the bottom of each page. If Header/Footer option was turned off, Typora generated PDF file right away. Moreover, I tested Typora v1.8.5 on another freshly installed macOS 14.3 (without any third-party software installed), and Typora can export PDF files with desired footer text, e.g. page numbers, correctly. I'm wondering if it's because Typora has some compatibility issue with other software, e.g. Homebrew? I tried to remove /usr/localbin directory from the path variable and then launched Typora from command line as /Applications/Typora.app/Contents/MacOS/Typora MarkdownFile.md, but the problem remained and no useful debug information was printed out when Typora started exporting a PDF file with Header/Footer option turned on. Let me know if there's any other way to let Typora print out useful debugging information while it's running. Thanks!

@abnerlee
Copy link
Contributor

abnerlee commented Feb 6, 2024

still has the same problem: once Header/Footer option was turned on, Typora had a hard time to generating corresponding PDF file with a rainbow lollipop cursor spinning more than 10 seconds and the resulted PDF file only has, e.g. "Footer" text at the bottom of each page.

Possible to attach a screencast for us to use since we cannot reproduce this issue on our mac?

@g4x86
Copy link
Author

g4x86 commented Feb 7, 2024

Quantum.pdf

When I turned on both header and footer options in PDF Export settings, I ended up with a PDF document with the "footer" text in both header and footer areas.

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

3 participants