Zzz (not maintained & may not work) Simple PDF Page Link Handler
<10kB. Updated 2019-03-30.
The author has shared 36 other
item(s).
Description
Download
As add-ons are programs downloaded from the internet, they are potentially malicious. You should only download add-ons you trust.
Supported Anki versions:
- 2.1.0 (updated 2019-03-30)
To download this add-on, please copy and paste the following code into Anki 2.1:
1442957026
If you were linked to this page from the internet, please open Anki on your computer, go to the Tools menu and then Add-ons>Browse & Install to paste in the code.
All Anki 2.1.x Add-Ons Contact Author
Reviews

Great!

thanks

very nice.
A guide for the current version 2.1:
- If you want to complain that adjusting this add-on is too complicated go away. I know this. But this add-on (which is complicated to adjust) is much better than what we had before which was nothing.
- add two additional fields to your note type. I'll refer to them as "file" and "page". for details see https://apps.ankiweb.net/docs/manual.html
- edit the source code of the file __init__.py of this add-on and adjust the path of the pdf viewer that can handle links to a page. As far as I know you need a browser like Firefox or Chrome. By default this add-on assumes that you use Firefox on Windows. If you don't you have to adjust the source code of this add-on: To see the file __init__.py in your file maanger click "View File" in the "Add-ons" window (main window Tools -> add-ons). Then use a text editor and change the path to your browser.
- Regular pdf viewers like Acrobat won't help because the operating system doesn't allow to open a pdf on a specific page, for details see e.g. [this tenderapp discussion](https://anki.tenderapp.com/discussions/ankidesktop/29160-link-to-a-pdf-page#comment_45901339).
- then edit your card template and put this into the back template:
<br><br>Source: <a href='javascript:pycmd("file:///{{file}}#page={{page}}");'>{{file}} , {{page}}</a><br><br>
- If Firefox doesn't show the file but offers to download it you need to change a setting in Firefox. In Firefox go to Preferences, then look for "Applications". Filter this list for "pdf" and set it to "Preview in Firefox".
- When you create a note you can put "C:/a folder/filename.pdf" into the field "file" and maybe "12" into the field page.
If you use the legacy version 2.0:
- The add-on is not named __init__.py. Also you can directly edit it in Anki to change the path to the browser.
- You need to change what you put in your template as outlined in the description. It should be something like this.
<br><br>Source: <a href='file:///{{file}}#page={{page}}'>{{file}} , {{page}}</a><br><br>
A guide for the current version 2.1:
- If you want to complain that adjusting this add-on is too complicated go away. I know this. But this add-on (which is complicated to adjust) is much better than what we had before which was nothing.
- add two additional fields to your note type. I'll refer to them as "file" and "page". for details see https://apps.ankiweb.net/docs/manual.html
- edit the source code of the file __init__.py of this add-on and adjust the path of the pdf viewer that can handle links to a page. As far as I know you need a browser like Firefox or Chrome. By default this add-on assumes that you use Firefox on Windows. If you don't you have to adjust the source code of this add-on: To see the file __init__.py in your file maanger click "View File" in the "Add-ons" window (main window Tools -> add-ons). Then use a text editor and change the path to your browser.
- Regular pdf viewers like Acrobat won't help because the operating system doesn't allow to open a pdf on a specific page, for details see e.g. [this tenderapp discussion](https://anki.tenderapp.com/discussions/ankidesktop/29160-link-to-a-pdf-page#comment_45901339).
- then edit your card template and put this into the back template:
<br><br>Source: <a href='javascript:pycmd("file:///{{file}}#page={{page}}");'>{{file}} , {{page}}</a><br><br>
- If Firefox doesn't show the file but offers to download it you need to change a setting in Firefox. In Firefox go to Preferences, then look for "Applications". Filter this list for "pdf" and set it to "Preview in Firefox".
- When you create a note you can put "C:/a folder/filename.pdf" into the field "file" and maybe "12" into the field page.
If you use the legacy version 2.0:
- The add-on is not named __init__.py. Also you can directly edit it in Anki to change the path to the browser.
- You need to change what you put in your template as outlined in the description. It should be something like this.
<br><br>Source: <a href='file:///{{file}}#page={{page}}'>{{file}} , {{page}}</a><br><br>
Comment from author
Thank you. That's very thoughtful of you to write much more detailed description on how to actually use it. I very much appreciate it.

very useful. If your cards are short and you forget the context this add-on allows to quickly open the corresponding pdf file at the correct page on your computer.
Thanks @kelciour for creating this add-on.
Thanks @kelciour for creating this add-on.