Submitted by WayneK on 2020/02/27 17:26
I want to place a link in InfoQube that opens a PDF to a specific page.
 
This was discussed a couple of years ago (Universal Links):
 
Was suggested it should be possible by appending a code to the pdf URL
 
I've repeatedly tried to make this work but never have been able to. 
 
Does anyone have a suggestion on how it can be done?
 
Wayne

Comments

It might be difficult.  To open a PDF file on a specific page you need to add a command line parameter to the link, I don't know how easy this is in IQ.  It is easy enough in ConnectedText but takes one line of scripting which some people find difficult.
 
The other problem is that different PDF readers like different parameters.
 
For instance in Adobe Acrobat the line should read :-
 
"C:\mypath\myfile.pdf page=133
 
to open the PDF file on page 133.
 
But for the free version of PDF-XChange the parameter is :-
 
"C:\mypath\myfile.pdf $P 133
 
to open 'myfile.pdf' on page 133.
 
So the parameter is dependent on the type of PDF reader you have installed which is out of Pierre's control.
 

You could call a simple batch file or Autohotkey script with the file path and page number as parameter. Then if you changed to a different pdf reader, it would be a simple matter of changing a single line of code in that script. Here's a thread discussing it for Autohotkey.

LeftEccoForIQ

2020/02/28 10:55

In reply to by LeftEccoForIQ

In fact, I haven't found any indication that IQ currently supports file links with parameters out of the box.
 
But I found this information on how to create your own protocol to launch an app with parameters on Windows.

Thanks for the additional details.
 
Looks to be beyond my capabilities.  I did get links from PDFs to InfoQube items to work, though.
 
For me, it looks like options are:
 
1) Extract the relevant pages as a separate file for InfoQube to link to.
 
2) Have a two-step link: 1) InfoQube link to file; 2) Internal PDF bookmark to page
 
 
Wayne
 

LeftEccoForIQ

2020/02/29 15:34

In reply to by WayneK

One other way that springs to mind: If you wouldn't mind permanently running an Autohotkey script  in the background, it could monitor your Windows clipboard and whenever you copy a path to a pdf file followed by a (page) number to the clipboard, it could open your pdf at that page. I could cook something up for you.

WayneK

2020/03/01 01:07

In reply to by LeftEccoForIQ

LeftEcco,
 
Thank you for the generous offer but I don't want to trouble you when I'm not sure I would follow through and use the set up.  I already have a problem with running a couple of text monitoring programs and don't think I want to add another to the mix right now.
 
Wayne
 

The Zetero with zotfile and mdnotes extension may give you what you need.

The combination can be used to extract highlighted notes from a PDF file with links to the originating pages. The link/call is in Adobe Acrobat format. You can copy these extractions to any editor. I have used them in Scrivener and Word, but they should also work in IQ editor (I haven’t tried it). Apparently these extracts can also be in markdown file format.

I don’t know how to run multiple instances of Acrobat so I needed to close the acrobat to click on a new link to another page. However, if you use foxit pdf reader and configure it to have multiple instances, then you can click it away…

Zetero beta has a built-in PDF viewer. These generated links work with the built-in viewer. In fact, that is probably what I will use going forward. You can still highlight and annotate outside zetero if you like...

It behaves differently for web and local files

For web, this works fine in Chrome, Firefox but not Edge:

http://www.africau.edu/images/default/sample.pdf#page=2

In v118g, you can hold the Shift key to show the Open With dialog and choose a browser

For local files however you can create the link in IQ but the #page=2 ending is ignored. I haven't found a way to pass it to the browser

If you hold Shift (or have show open with enabled), on some version of Windows, the dialog shows and selecting Chrome DOES open it to page 2 as it should. Windows 10 does not and shows a silly "You'll need a new store app" dialog

I'll keep trying

n.b. the web links do work in Edge, but is in conflict with a new Edge feature to resume PDF to previous page setting (LOL). Turn off "PDF view settings" to make it work

 I am sure you are right about web. I kept most of my files local and some in the cloud. I don’t use browser for reading PDF files. I use local desktop programs.

For the PDF files I have stored in Zotero (locally). Zetero with add-on I had described above can generate  text highlighted in the PDF with associated links.
I just test it: I copy the a couple segments of text (with links) and pasted them in an infoqube doc.. Clicking on links (in the browser mode of infoq doc), I was taking to desired pages in the Zotero internal PDF viewer. When I reconfig zetero with either foxit or adobe, infoq would direct me to the correct page in the respective pdf reader.

Give it a try. For me, this combination really enhanced the power of InfoQube for me. I try to read “key” books in PDF format so I can highlight and annotate easily. I even covert most of my epub, awz books to PDF (via Calibre). I still read some books in kindle, but if the book is worth a 2nd read, I will read it in PDF.

Note: the Zotero internal PDF reader is only available in its beta version.

 

How do I ?