# GEDCOM question

**URL:** <https://gramps.discourse.group/t/gedcom-question/380>\
**Category:** Help\
**Created:** [April 19, 2020, 7:25am UTC](https://gramps.discourse.group/t/gedcom-question/380 "2020-04-19T07:25:05Z")\
**Posts on this page:** 15\
**Page:** 2

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [April 27, 2020, 2:23pm UTC](https://gramps.discourse.group/t/gedcom-question/380/21 "2020-04-27T14:23:22Z")

</div>

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

[Searching Google](https://www.google.com/search?q=open+parameter+pdf+viewer), 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.

---

<div class="post-metadata">

**Author:** ![DPaul](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@DPaul](https://gramps.discourse.group/u/DPaul)\
**Post date:** [April 27, 2020, 2:41pm UTC](https://gramps.discourse.group/t/gedcom-question/380/22 "2020-04-27T14:41:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DaveSch](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davesch/32/40_2.png) [@DaveSch](https://gramps.discourse.group/u/DaveSch)\
**Post date:** [April 27, 2020, 2:57pm UTC](https://gramps.discourse.group/t/gedcom-question/380/23 "2020-04-27T14:57:05Z")

</div>

> [@DPaul](#):
>
> Need to convince myself to take the plunge

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

---

<div class="post-metadata">

**Author:** ![StoltHD](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@StoltHD](https://gramps.discourse.group/u/StoltHD)\
**Post date:** [April 27, 2020, 3:02pm UTC](https://gramps.discourse.group/t/gedcom-question/380/24 "2020-04-27T15:02:27Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![DPaul](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@DPaul](https://gramps.discourse.group/u/DPaul)\
**Post date:** [April 27, 2020, 3:21pm UTC](https://gramps.discourse.group/t/gedcom-question/380/25 "2020-04-27T15:21:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DaveSch](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davesch/32/40_2.png) [@DaveSch](https://gramps.discourse.group/u/DaveSch)\
**Post date:** [April 27, 2020, 3:37pm UTC](https://gramps.discourse.group/t/gedcom-question/380/26 "2020-04-27T15:37:34Z")

</div>

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](http://Archive.org)

There is an addon, [Web Connection](https://gramps-project.org/wiki/index.php/Web_Connect_Pack), 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.

---

<div class="post-metadata">

**Author:** ![StoltHD](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@StoltHD](https://gramps.discourse.group/u/StoltHD)\
**Post date:** [April 27, 2020, 3:45pm UTC](https://gramps.discourse.group/t/gedcom-question/380/27 "2020-04-27T15:45:13Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![DPaul](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@DPaul](https://gramps.discourse.group/u/DPaul)\
**Post date:** [April 27, 2020, 4:00pm UTC](https://gramps.discourse.group/t/gedcom-question/380/28 "2020-04-27T16:00:23Z")

</div>

Hi,

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

Paul

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [April 27, 2020, 4:02pm UTC](https://gramps.discourse.group/t/gedcom-question/380/29 "2020-04-27T16:02:39Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![StoltHD](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@StoltHD](https://gramps.discourse.group/u/StoltHD)\
**Post date:** [April 27, 2020, 4:04pm UTC](https://gramps.discourse.group/t/gedcom-question/380/30 "2020-04-27T16:04:25Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [April 27, 2020, 4:27pm UTC](https://gramps.discourse.group/t/gedcom-question/380/31 "2020-04-27T16:27:14Z")

</div>

> [@StoltHD](#):
>
> Would it be possible to add a field for parameters and a page field in the media viewer or in settings?

It would be nice to be able to ‘passthrough’ a parameter from a Gramps media object handle Link in the [Note Editor](https://www.gramps-project.org/wiki/index.php/Gramps_5.1_Wiki_Manual_-_Entering_and_editing_data:_detailed_-_part_2#Link_Editor)

---

<div class="post-metadata">

**Author:** ![StoltHD](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@StoltHD](https://gramps.discourse.group/u/StoltHD)\
**Post date:** [April 27, 2020, 4:46pm UTC](https://gramps.discourse.group/t/gedcom-question/380/32 "2020-04-27T16:46:17Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![DPaul](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@DPaul](https://gramps.discourse.group/u/DPaul)\
**Post date:** [April 27, 2020, 5:33pm UTC](https://gramps.discourse.group/t/gedcom-question/380/33 "2020-04-27T17:33:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![StoltHD](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@StoltHD](https://gramps.discourse.group/u/StoltHD)\
**Post date:** [April 27, 2020, 6:31pm UTC](https://gramps.discourse.group/t/gedcom-question/380/34 "2020-04-27T18:31:23Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [May 27, 2020, 6:36pm UTC](https://gramps.discourse.group/t/gedcom-question/380/35 "2020-05-27T18:36:16Z")

</div>

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

[Previous page](https://gramps.discourse.group/t/gedcom-question/380.md?page=1)
