Gurpenator icon indicating copy to clipboard operation
Gurpenator copied to clipboard

option to open pdf to specific page

Open thejoshwolfe opened this issue 13 years ago • 2 comments

Executing something like this seems to work

"C:/Program Files (x86)/Adobe/Reader 10.0/Reader/AcroRd32.exe" /A "page=168=OpenActions" GURPS_Basic_Set_Characters.pdf

The pdf can be found here: http://www.sjgames.com/gurps/books/basic/

thejoshwolfe avatar Dec 04 '11 07:12 thejoshwolfe

I'm thinking we should use a database separate from the main definitions. We should be able to paste the trait list tables on page 297 into a computer program that can parse it and generate the page number lookup database.

thejoshwolfe avatar Dec 04 '11 07:12 thejoshwolfe

Another problem is how to find the installation of acrobat reader. Here's a pseudocode strategy using the registry to find the handler of the .pdf file extension:

string registryCommandName = registry["\HKEY_CLASSES_ROOT\.pdf"]["(Default)"].REG_SZ();
string commandTemplate = registry["\HKEY_CLASSES_ROOT\" + registryCommandName + "\Shell\Open\Command"]["(Default)"].REG_SZ();
commandPath = commandTemplate.split('"')[1];

thejoshwolfe avatar Dec 04 '11 08:12 thejoshwolfe