Closed imudak closed 1 month ago
After downgrading Chrome from the latest version 126.0.6478.115 to 124.0.6367.61 on my PC, the issue no longer occurs. It seems there were some changes related to PDF handling in Chrome around version 126, which might be affecting this behavior.
It looks like fixes are progressing on the following issue in Chromium.
Page.printToPdf does not render anchor links [347674894] - Chromium
The duplicate issue is being discussed in #2021 and we would appreciate it if you could CLOSE this one.
Description
When generating a PDF from a Markdown file using the Markdown Preview Enhanced (MPE) extension in VSCode, clicking on Table of Contents (TOC) links results in navigating to a position 11 pages ahead of the intended section.
Environment
Steps to Reproduce
Create the following Markdown file:
Generate the PDF using MPE in VSCode:
Export -> Chrome (Puppeteer) -> PDF
.Open the generated PDF and click on any TOC link.
Expected Behavior
Clicking on a TOC link should navigate to the corresponding section in the PDF.
Actual Behavior
Clicking on a TOC link navigates to a position 11 pages ahead of the intended section.
Additional Information
If the PDF does not contain at least 11 pages, clicking the TOC links causes the PDF to crash.
Request for Assistance
Please assist in resolving this issue. If any additional information is required, feel free to contact me.