markdown-preview-enhanced
markdown-preview-enhanced copied to clipboard
VSCode-MPE-Puppeteer-PDF-Relative Path Not working
OS: Windows 10 IDE: VS Code Extension: Markdown Preview Enhanced Exporter: Puppeteer Format: PDF
Issue: When defining path in the front matter to export to a sub folder, Puppeteer tries to save in the sub folder of VS code. Looks like working folder is falling to the executable's folder instead of where my markdown file is. Pandoc handles the path correctly.
id: print
class: 'ABCD'
puppeteer:
landscape: false
format: A4
displayHeaderFooter: false
path: "./Exports/test.pdf"
Error:
Error: ENOENT: no such file or directory, open 'C:\xxx\xxx\VSCode\Exports\test.pdf'
It's 10 days and not reply so bumping this in a hope somebody may see it.
Just adding to this as I'd like to be able to specify a relative path to the source MD file. Currently the path is relative to the directory in which vscode is located and I can't think of a way around this.
Simple solution would be to be able to include variables but front matter below results in failure. Any ideas?
puppeteer:
path: ${workspaceFolder}/test.pdf
format: "A4"
It's been a while I guess there is no solution but appreciate if anyone can help.
I have the same problem