Skip to content

johnsidi/scripts-for-Obsidian-Better-PDF-Plugin

Repository files navigation

I have recently started using the Better PDF plugin because it allows me to create links to specific PDF pages which work both in Windows and Mac computers. The fact that I do not even need to click on the link but the page is automatically embedded in the note is an added feature.

I have created two scripts for creating automatically the necessary snippet for embedding the current PDF page in an Obsidian note.

I prefer to save all my PDF files in one folder named "PDF files" inside my Obsidian vault. If you do not want to use this convention you need to adjust the url value in the scripts accordingly.

The generated snippet has the following form:

```pdf
{"url": "/PDF files/pdfTitle",
"page": [currentPDFpage]}
```

The pdfTitle and currentPDFpage are autopopulated.

for Windows users

If you are a Windows user you need to use the Adobe Acrobat Pro and create a new JavaScript Action.

image

Click on Specify Settings and paste the JavaScript code. Unckeck the option "Prompt User".

image

In order to create the snippet you need to click on the action and then on the start button.

image

image

After executing the action a new window opens with the appropriate code selected which you can copy and past on your Obsidian note.

image

for Mac users

You can either use Adobe Acrobat Pro or the free PDF reader Skim and my simple AppleScript. After executing the AppleScript the snippet will be copied automatically to your clipboard.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published