yzane / vscode-markdown-pdf

Markdown converter for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=yzane.markdown-pdf
Other
1.01k stars 206 forks source link

Autoconverted PDF define the path to the destination directory #309

Open BrtVn opened 1 year ago

BrtVn commented 1 year ago

Hi

I am using this settings in VSC settings.json: "markdown-pdf.convertOnSave": true

It works well, but I would like to define path to the destination directory, to save all pdfs at one place. Not at the same directory where md file is stored.

Is there way how to do it?

Thanks for response Brt

mal1kc commented 1 year ago

i think you can use "markdown-pdf.outputDirectory" setting to specify output directory like example from readme.md

dodoru commented 1 year ago

i think you can use "markdown-pdf.outputDirectory" setting to specify output directory like example from readme.md

Hi, I want to set "markdown-pdf.outputDirectory": "${workspaceFolder}/_.out" in all my ./vscode/settings.json But it not work , why ?

mal1kc commented 1 year ago

Hi, I want to set "markdown-pdf.outputDirectory": "${workspaceFolder}/_.out" in all my ./vscode/settings.json But it not work , why ?

in my understanding vscode does not support that type of variables in 'settings.json' file, acts like normal string

but if i understand correctly what you want , you can use { "markdown-pdf.outputDirectory": "./_.out", } and after converting markdowns to pdf your file structure will be like that

workspace-folder/
├─ .vscode/
│  ├─ settings.json
├─ ._out/
│  ├─ aa.pdf
│  ├─ bb.pdf
new_folder/
├─ aa.md
bb.md

btw i checked it doesn't matter where to put that setting (global or .vscode/settings.json file) it will work.