So I was just thinking how cool it would be to able to link to specific pages in a document, sort of like we have with Google Books, but for offline .pdf files, and say, while in Anki. Any idea how to accomplish this? ;p
Usage would be to refer from, say, example sentences or simply text excerpts back to the source document...
Edit: Here's what I found so far:
http://ic.ucsc.edu/tutorials/linkingtopdfs/
For .djvu: http://www.uky.edu/KGS/djvu/Support/djvuplugin35.html
Not sure if it works for offline files... Wonder how to do it for .doc files... or local .html documents? (I guess that would require inserting an id thingy...)
Last edited by nest0r (2010 April 21, 2:26 am)
Woohoo! It works (From my first comment, not that Wired thingy)! Well, I use Foxit Reader, so the format is different: For the card in Anki, use the HTML Editor to make a link: <a href="path to pdf" -n [pagenumber here, no brackets]>link</a>!
I guess if you store a copy of the relevant documents in the .media folder, that'll simplify things, but as a trivial tangent, sharing might be problematic, unless there's a way to make it go to the .media folder regardless? Otherwise I guess you'd have to do a find/replace on the exported deck or something, no big deal...
Edit: And I guess with .doc files, you'd need to insert a bookmark then create a link to that...
Last edited by nest0r (2010 April 21, 3:19 am)
Oh, I'm stupid, that Foxit link doesn't actually work, it's just that the page number was stored in my cache. It opens the pdf but that's all.
I was wondering how I managed to get the command line in the href thingy, but checking it, it was removed. ;p
I'm sure the Acrobat #page= works, though. At this point I can't remember why I wanted to bother, seems like I should keep doing what I was doing before, putting in the page numbers and just doing it manually, and that only when I didn't bother copy/pasting big chunks of test when it's an OCR'd .pdf...
Last edited by nest0r (2010 April 22, 2:10 am)
Nemotoad wrote:
Fine, fine, reject my wired marker add-on with scorn then. :-p
Why would I bother if I can't click from an Anki card to specific pages in a pdf? Otherwise I'd just copy/paste the text into the card or keep the .pdf open and type in the page number. ;p No need to introduce another reader or whatever...
I think I already installed/uninstalled 5000 note-taking addons and programs over the years, never really had much use for them, I just use UltraEdit (and Firefox bookmarks ;p). And MyLifeOrganized, on and off...
I was almost tempted to install Adobe since it allows pagenumbers in the URLs without command line or whatever, but it creeps me out. Sticking with manual stuff.
Anyway, don't mind me, just feeling grouchy.
Last edited by nest0r (2010 April 22, 2:28 am)
Blahah
Member
From: Cambridge, UK
Registered: 2008-07-15
Posts: 715
Website
The html command is...
<a href="document.pdf#page=3">Text of link/a>
or, if you have set a named destination in your PDF (bookmarks point to named destinations) you can link to it like this...
<a href="document.pdf#introduction_section">Text of link</a>
You can't have spaces in the address string, and obviously you cant pass parameters outside the parentheses like in your first attempt.
edit: I'm not sure if Anki will support this as it uses Webkit, which often is a bit less full-featured than a browser.
edit2: this functionality is in adobe acrobat, but probably not any other PDF reader, so you'll have to have Acrobat set as your default for PDFs.
Last edited by Blahah (2010 April 22, 4:08 am)
It just occurred to me if I turn the pdf pages to images via conversion or screenshots, I could have the images on the cards (either as part of the usual card or solo as an Anki 'Book' somehow w/ each card a page) or set it up so they're off the card but still linked from the card, maybe. Does Anki let you create clickable links to other cards (like how there's a link to a card when you create new cards and it says '1 card added etc'? Or perhaps you can link to hard drive images via Anki so when you click them they open in the default image browser?
Speaking of which, if you can create links from card to card, that could make for interesting strategies, re: my card chain idea from way back when... hmm...
Last edited by nest0r (2010 October 15, 4:00 pm)