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

[BUG] Problems with links occur when converting to PDF #2021

Open
n-okano-s-style opened this issue Jul 5, 2024 · 4 comments
Open

[BUG] Problems with links occur when converting to PDF #2021

n-okano-s-style opened this issue Jul 5, 2024 · 4 comments
Assignees
Labels

Comments

@n-okano-s-style
Copy link

Describe the bug
A clear and concise description of what the bug is.

If you preview with Markdown Preview Enhanced and convert it to PDF, the links within the page will be strange. It feels like it shifts irregularly.
However, during the preview stage, in-page links work fine.
This issue was discovered on July 4th. It was working fine until last week.
I restarted my PC and reinstalled VSCode, but it didn't work.
However, even after converting it to PDF, for some reason the links within the page only work properly when opened in Adobe.
After converting to PDF, in-page links did not work properly in VSCode's vscode-pdf, chrome, and edge.

Environment

  • OS: Windows 11
  • VSCode: 1.82.0
  • Markdown Preview Enhanced: 0.8.0
@n-okano-s-style n-okano-s-style changed the title [BUG] [BUG] Problems with links occur when converting to PDF Jul 5, 2024
@irs-alba1
Copy link

irs-alba1 commented Jul 11, 2024

I have exactly the same problem here. Tried also with older plugin versions down to 6.10 with same result.
I use the MS Edge Browser as the default viewer, because this is the normal setup for my users.
Preview is correct, but as soon as the Chrome (Puppeteer) PDF file is generated, the links are all wrong.
Affects both auto generated toc as well as manually created links.
Also the file opens not at the top but starts in the middle of a picture at page 12...
I'm quite sure that this worked correctly in the past, so it is probably not the pluing's fault but some changed behavior either in chrome or edge?

@n-okano-s-style
Copy link
Author

n-okano-s-style commented Jul 12, 2024

I understand the cause.

It seems to be caused by the current version of chrome when performing Preview → Export → Chrome (Puppeteer).

I was able to confirm that the links worked fine after reinstalling the previous version of chrome.
Even if you reinstall the previous version of Chrome, the automatic update will revert you to a bad version.

Your only option is to lock chrome to a version or wait for a fixed version to be released.

@irs-alba1
Copy link

Can you tell if it is then a conversion or a display issue? I was able to open the generated PDF correctly in FoxitReader, while both Chrome and Edge messed up all links. Or does Edge use Chrome for PDF display?

@n-okano-s-style
Copy link
Author

n-okano-s-style commented Jul 12, 2024

I think it's a conversion issue.

However, depending on the PC, the link may work properly even with the same version, which is a mystery.
When I passed the PDF (Link doesn't work properly) to a PC that can convert it to PDF normally, the link did not work properly.

Links work fine in Adobe, but not in browsers like Chrome or Edge.
sorry. I don't know the exact cause, but it seems that a fix is ​​currently in progress.
https://issues.chromium.org/issues/347674894

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

No branches or pull requests

3 participants