GEDCOM question

Wouldn’t such an item be specific to the SDK of the viewer that your OS has associated with the PDF filetype?

Searching Google, there is a spec for Parameter passing in a URL for Acrobat. (The basic hooks I noted were for page, named section & comment.) But Adobe is notorious for continually changing their hooks without consideration of backward compatibility.

Ok many thanks for the replies.
The question was : can GRAMPS do it standard, answer = no.
It would be a nice new feature though.
Actually only 4 lines of python code + acrobat DC installed
(with filename +page number as parameters)

Of course, the association with a document management app
is also worth looking at.

Paul

Have you taken the plunge yet? Or are you still dipping your toe in the shallow end of the pool?

Yes, You are correct, it would be depending on both OS and the software of choice… And it might also be affected by the PDF Document Version… and also might be affected by if you have changed the page numbering in the PDF…

Hi,

Let’s say that i have the pool on my radar.
Much will depend upon this latest question about how to search inside the pdf’s i have.
The searching index will have to be constructed manually, because e.g. OCR is not efficient
when it comes to 16th century handwriting .

Paul

You did not mention how or where you obtain these PDF’s.

As I mentioned I get most of mine from Google and Archive.org

There is an addon, Web Connection, that will take basic information (name and years) from an individual and open a search in various websites, including google and archive.

I throw this out there for your consideration as well for those that know more about coding as a possible road map to searching downloaded pdf’s.

I should add that it is easy to add other websites to the search list.

The annotation, including comments and highlighting in PDF’s is done manually and is a separate PDF text layer, just like the OCR text layer…

It works both on text based and image based (scanned) PDF’s…

But it all depend on your PDF viewer of choice and your OS how you actually do the annotation (highlighting, indexing and so on in each PDF…

Hi,

These would be pdf’s that i generate myself from a
zillion documents.

Paul

I just tried a workaround & failed.

The following opened to the right page with Firefox but to page1 in Chrome.
https://gramps-project.org/wiki/images/archive/d/d6/20111104134605!GRAMPS_3_3_Prince.pdf#page=70

Figured that since using a "file://” web protocol directly in a browser could successfully pass targeting parameters, maybe I could do the same as a “Internet Address” Note link.

Tested with:
FILE://c:/users//documents/sample.pdf#page=2

Unfortunately, that "FILE://” protocol defaulted to opening Microsoft Edge on Win10… which refuses to pass the parameter.

And FILE wasn’t one of the Protocols listed as re-assignable in Windoze’s Settings.

Idea/Question to Gramps Developers…

Would it be possible to add a field for parameters and a page field in the media viewer or in settings?

That way the user could define the parameter needed for opening the pdf to a spesific page for their default PDF viewer/editor

and that information could be added to the “open file string”… something like <“default editor name” + filepath + “parameter”…

It would be up to the user to add it in the correct order, it could have been done with a “string field” and parameters for “app name”, “filename” and “parameter”…

OR could it be added a new “Link Type” for Notes, something like “File://” (on windows this defaults to IE, so its useless as is), but maybe something like a “Open with app:AppName://” - link type, that supports parameters in the correct order for the app opened (users need to parse the correct order themself)…

It would create a few problems when exporting to web, gedcom, xml and so on, or when creating reports, but that would be the responsibility of the user…

It would be nice to be able to ‘passthrough’ a parameter from a Gramps media object handle Link in the Note Editor

1 Like

Yes, it would be a great feature, not only for PDF’s, but it might be usable for other document formats to… I think both ODF and Docx support it (never tried)…

That way it could be possible to make Citation Notes that opened a PDF or other document directly…

On Windows I can only do this in a command line with the full path of the app I’m using (if its not in “path”, so to be able to construct a string using som attributes would be great…

On Win 10 i can use the “zotero://open-pdf/library/items/NFHWK2FT?page=4” from a Note in Gramps, it will first open Zotero and then Zotero will open the page to the given page…

I have not yet figured out how to do this with i.e. Foxit or any other PDF reader, but I think it needs a Registry entry…

Zotero is Firefox based, so it might be the reason for why it accept an address like that…

1 Like

This is how it may be done in Win10 with acrobat DC

In preferences you would give the path to the default pdf reader, say acrobat reader DC
e.g. “C:\Program Files (x86)…\AcroRd32.exe”

Python can launch acrobat with “subprocess.Popen(…)” and pass 2 parameters (pdfFile and page).
That’s it…

Paul

2 Likes

Yes, it would be approx the same with foxit, it takes multiple parameters after the /A
i.e.
foxit.exe “filename” /A page=2 zoom=60

I tried to do this with URI protocols in Windows, but by default the URI protocol only take one parameter and that is the whole URL string with filenames and parameters in one string…
So the string has to be split…
That is not a good solution, but by using “normal” python parsing and execution, it shouldnt be a problem to parse most parameters for programs that support it, you just need the order of the parameters…

So what could be done is to use some predefind attributes in gramps, i.e. “page”, “section”, “paragraph” and in preferences the user could define the program used and the 2-3 parameters needed…
i.e. for foxit
Switch:"/A"
Page:“page=”
Section:“Section”
and so on…
If a program doesnt need the “Switch”, just leave it blank…

But I think I still would fall back to Zotero…

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.