Referencing to a page of a locally stored PDF (using a Generic Path) in Note

Page 1 of 1 (15 items)
This post has 14 Replies | 1 Follower

Posts 12
Vincent van Altena | Forum Activity | Posted: Thu, Jun 18 2020 1:56 AM

Besides my Logos library, I have PDF files stored in a cloud service (in my case OneDrive) which I synchronize to my local hard drive. Could you help me with the following scenarios:

1) For my academic research, I would like to be able to refer (in the most ideal scenario) to a specific page or a specific destination in a particular PDF from within a Logos note. 

Outside of Logos, using plain html the following scenarios work (USERNAME and COMMENTARY are variables and the named destination exists in the pdf):

  • Referencing  to a named destination in a locally stored pdf: <a href="C:\Users\USERNAME\OneDrive\digitalLibrary\COMMENTARY.pdf#nameddest=Acts17.14">Commentary named destination</a href>
  • Referencing  to a page in a locally stored pdf: <a href="C:\Users\USERNAME\OneDrive\digitalLibrary\COMMENTARY.pdf#page=361">Commentary page</a href>

2) On top of that, it would be ideal to be able to use a Generic Path variable to keep the links intact when switching between Windows (10) machines. However, I did not manage to get this working with a Generic Path variable in plain html - let alone from within Logos

  • <a href="%UserProfile%\OneDrive\digitalLibrary\COMMENTARY.pdf#page=361">Generic path page</a href>

I do remember I saw a previous post on this issue within the Logos forums, but following these instructions did not solve my issue (though I can't find the particular post anymore), since Logos seems to alter the link syntax to a non-existent location, e.g.: 

  • C:\Users\USERNAME\OneDrive\digitalLibrary\COMMENTARY.pdf#nameddest=Acts17.14

is changed to 

  • https://c/Users/USERNAME/OneDrive/digitalLibrary/COMMENTARY.pdf#nameddest=Acts17.14

Any ideas or suggestions?

regards, Vincent

Posts 408
Kevin | Forum Activity | Replied: Thu, Jun 18 2020 4:24 AM

Logos alters a link to file:/// prefix for me, however that does not work for me either. Perhaps it is a bug, I do not know.

You could run a little localhost webserver, such as https://github.com/cesanta/mongoose/. There is a link at the bottom of the page to a precompiled Window file, download the free edition one, put the downloaded file (mongoose-free-6.9.exe) in the folder you want as the top level folder (where your pdfs are) and then run it.

Cancel any Windows Firewall alert (for a different firewall, deny access), and also right click the system tray icon, choose Advanced Settings, and change the listening port to 127.0.0.1:80, and untick 'Launch Browser'. This will stop anyone on your local network/Internet accessing your files. Save settings, close the window, then right click the system tray icon and Exit.

Relaunch the mongoose-free-6.9.exe from your top level folder, and now open your browser and in the address bar put localhost or http://localhost or http://127.0.0.1 then click Go/hit enter. You should see all your files in that folder, and be able to browse to folders below that. You can right click the files you want to link, and copy the link location to paste into Logos.

So as example if you put the mongoose file in your Onedrive folder, you would paste in Logos http://localhost/digitallibrary/commentary.pdf and that should open the pdf. For specific pages you will have to use the link button in the note tool and link to http://localhost/digitallibrary/commentary.pdf#page=10. The browser will open the pdf itself, unless you have told the browser to open files of that type in a different application. I can explain how to configure that if a problem later.

Anyway this might be helpful.

Posts 2575
David Ames | Forum Activity | Replied: Thu, Jun 18 2020 4:33 AM

Vincent van Altena:

1) For my academic research, I would like to be able to refer (in the most ideal scenario) to a specific page or a specific destination in a particular PDF from within a Logos note. 

For Academic Research:  How will you tell the academic reader who uses your research paper how to find a copy of the PDF?

Or will you attach your store of PDF files to your research paper.

Posts 12
Vincent van Altena | Forum Activity | Replied: Thu, Jun 18 2020 4:57 AM

Thank you Kevin, that's helpful.

1) However, since I have already configured an other localhost webserver for docker, do you know whether I can run more than one webserver in parallel or switch between them?

2) Considering setting a default application for opening a pdf in an other application than the webbrowser I think this article is helpful: https://www.technipages.com/google-chrome-open-pdf-in-adobe-reader

regards, Vincent

Posts 12
Vincent van Altena | Forum Activity | Replied: Thu, Jun 18 2020 5:00 AM

Hi David,

Sorry for the confusion. I was asking for this feature to improve the efficiency of my own research and digital library organization. Not for publication of my research. 

Vincent

regards, Vincent

Posts 408
Kevin | Forum Activity | Replied: Thu, Jun 18 2020 5:04 AM

Depending on how it is being used, you could use docker instead, assuming apache running you would need to create a virtual directory to your files.

You could certainly use a different port if docker is using port 80, eg configure listening port to 127.0.0.1:8080.
You would have to change your links to http://localhost:8080/digitallibrary/commentary.pdf, and to browse the files you will need to specify http://localhost:8080 in the browser window.

Yes that guide is good to follow by the looks of it.  Yes

Posts 12
Vincent van Altena | Forum Activity | Replied: Thu, Jun 18 2020 5:33 AM

Kevin:

So as example if you put the mongoose file in your Onedrive folder, you would paste in Logos http://localhost/digitallibrary/commentary.pdf and that should open the pdf. 

It works really nice, except for one crucial thing: this workflow copies the pdf from my local one drive folder into my default Google chrome download location. So instead of working with the original file, I am now duplicating files on my local system, which is undesired.

Am I overlooking something to make this work as desired, i.e. opening the original file?

regards, Vincent

Posts 12
Vincent van Altena | Forum Activity | Replied: Thu, Jun 18 2020 5:34 AM

Kevin:

So as example if you put the mongoose file in your Onedrive folder, you would paste in Logos http://localhost/digitallibrary/commentary.pdf and that should open the pdf. 

It works really nice, except for one crucial thing: this workflow copies the pdf from my local one drive folder into my default Google chrome download location. So instead of working with the original file, I am now duplicating files on my local system, which is undesired.

Am I overlooking something to make this work as desired, i.e. opening the original file?

regards, Vincent

Posts 408
Kevin | Forum Activity | Replied: Thu, Jun 18 2020 5:50 AM

It should download/duplicate it to a temp internet files folder and open it immediately from there, no interaction required. I don't use Chrome but will check.

In the guide you linked, there was a step saying "You can select the downloaded file at the bottom of the window, then choose “Open”, then the file will open in a separate Reader window. Select the “Always open files of this type” option."

No basically it will 'download' and then open the copy. Are you needing to edit the PDFs?

Edit - I checked, and yes chrome downloads to the download folder, which is annoying as it means no automatic removal. Firefox saves it to windows temp folder. I will see later if there is anything to change chrome behaviour, but I have to go do some stuff until this evening.

Posts 12
Vincent van Altena | Forum Activity | Replied: Thu, Jun 18 2020 6:53 AM

Kevin:
 No basically it will 'download' and then open the copy. Are you needing to edit the PDFs?

Yes, I annotate the pdf's, bookmark certain locations etc. And I use a reference manager (Zotero) to automatically extract my annotations. So being able to edit the pdf's is quite important to me.

Kevin:
 Edit - I checked, and yes chrome downloads to the download folder, which is annoying as it means no automatic removal. Firefox saves it to windows temp folder. I will see later if there is anything to change chrome behaviour, ... 

Thanks in advance!

regards, Vincent

Posts 2575
David Ames | Forum Activity | Replied: Thu, Jun 18 2020 9:53 AM

Vincent van Altena:

Sorry for the confusion. I was asking for this feature to improve the efficiency of my own research and digital library organization. Not for publication of my research. 

I got triggered by the words "For Academic Research"    One last word on downloaded PDF files. 

Some place keep the URL, Title and download date.  They may update the PDF.

Also maybe we should use Academic Standards even though we are only doing it for ourself.

Posts 408
Kevin | Forum Activity | Replied: Thu, Jun 18 2020 12:39 PM

Sorry then Vincent, if you need to edit the original file then this way will not work, as it will always download the file and open that.

Hopefully the file:/// link is just bug that can be fixed, and not something deprecated in the new notes tool, as apparently it used to work, but I think https://community.logos.com/forums/t/147867.aspx is referring to the old notes tool.

Perhaps someone else can advise if their pdfs linked still work.

It might be worth contacting support direct describing the problem you are having, reference this and the other thread.

Posts 12
Vincent van Altena | Forum Activity | Replied: Fri, Jun 19 2020 1:29 AM

Hi Kevin,

That's a pitty, but I was expecting this.

Some sort of work around would be to use your method and after editing the pdf to overwrite the original pdf in the local onedrive folder. That would work, I think but needs some care to avoid corrupting files.

I will contact support directly to see whether they can offer a solution or - when this appears to be a bug - can add it to their bug fixes list.

Vincent

regards, Vincent

Posts 12
Vincent van Altena | Forum Activity | Replied: Fri, Jun 19 2020 1:37 AM

David Ames:
 Also maybe we should use Academic Standards even though we are only doing it for ourself. 

I fully agree about complying to Academic Standards, the problem however is that there are many standards around (not only the SBL Handbook of Style ed.2).

So here is where a reference manager (in my case Zotero) comes in to the play, since it provides a way to keep all kinds of bibliographical data and output it according to the Academic Standard of choice.

Maybe a suggestion to Logos would be to see if it would be possible to offer an integration with a reference manager like Zotero.

regards, Vincent

Posts 408
Kevin | Forum Activity | Replied: Fri, Jun 19 2020 3:04 AM

Hi Vincent,

I agreed, it would need care planning to avoid corrupting or losing work, but is possible. With the webserver, downloading, sync back to source, much more opportunity for problems, feels quite messy. Hopefully they confirm a bug and fix it soon.

Cheers

Page 1 of 1 (15 items) | RSS