Hi! I tried to search for a similar feature request, but I did not happen to find one, although I scanned through a lot of PDF related feature requests.
Use case or problem
I’d like to automate exporting content that I will share with third parties. If I generate a PDF and send it to someone (might be via email or via Git, for example), I might notice later that there is some typo in my content. Then I fix the typo and need to generate a PDF file again.
If I could write a Windows Batch script or a Linux Bash script that calls the Obsidian executable, I could store all the PDF settings in the script file (page size, orientation, margin, downscale percent, source file, and output file name). Then I can be certain that if I ever need to generate the PDF again, it will have the same layout and output file name as before.
This would also enable better automatisation: for example, after generating the PDF, my script could commit the new/updated PDF file to Git, and then push it to some remote repository where it would be processed further. Or my script could send an email with the PDF attached to it (or open Thunderbird with a new email message window and the PDF already attached). The possibilities are endless.
Proposed solution
An example of how a command line call could look like:
Obsidian.exe generate-pdf MyNote.md MyNote.pdf --page-size A4 --landscape on --margin default --downscale-percent 100
Obsidian would use the vault that is located in the current working directory. If the current working directory does not contain a vault, Obsidian would response with an error message.
Current workaround (optional)
Currently I’m just using the GUI to generate PDFs.
Related feature requests (optional)
The command line export feature could also support exporting multiple files into a single PDF, like discussed here.
Thank you for your support!