View Single Post
Parody
Senior Member
 
Join Date: Jan 2013
Location: Rochester, MN
Posts: 1,517

Old June 19th, 2015, 01:21 PM
Quote:
Originally Posted by Bobifle View Post
I'm trying to create link/hyperlinks to a pdf document I've added in a topic.
As you've found, you can't link into an attached PDF file. What I do is use a special Source Tag Snippet:

Source Snippet.png

The book name is one of the Tags and the page(s) go into the text field. If the Topic/Article uses more than one book, then I add another Source snippet.


Quote:
Originally Posted by Bobifle View Post
any way to bypass the 30 Mb file size ?
Nope. LWD would have to change that limit. It's also a good idea to not clog up your multi-machine, multi-platform database with files you likely use independently from that database. (I use my rulebooks and modules all the time away from Realm Works.)


Quote:
Originally Posted by Bobifle View Post
2/ I tried to create in a snippet an hyperlink with an url pointing to my local drive pdf. But it's not supported.
It is very much not supported. Keeping local files separated from your multi-machine, multi-platform database is also a good idea.

However, while I don't recommend doing so, you can use batch files and Foreign Object snippets to do some local automation in Realm Works. They'll only work on one machine, unless you can ensure that all paths are identical on multiple machines.

To open an external PDF to a specified page, you need to create a batch file. It only needs one line:

Code:
"E:\Program Files\Adobe\Acrobat 10.0\Acrobat\Acrobat.exe" /A "page=N" "c:\full\path\to\file.pdf"
The first part is the full path to your copy of Acrobat or Adobe Reader. (The example is where I installed Acrobat Pro X.)

/A is the Actions command. In the following string, replace N with the page number. It needs to be an integer index so if, for example, your PDF says the first page number is "Front Cover" you may have to add or subtract a couple to find the right one.

The last part is the full path to the PDF file.


Run the batch file and see if it works. Once you have the batch file opening the PDF to the right place, then you can attach the batch file to a Foreign Object snippet in Realm Works. When you use the "play" button to "view" it, Realm Works will write the batch file to your Temp folder and run it, which should open the file for you.


Last edited by Parody; June 19th, 2015 at 03:31 PM. Reason: Fixed quotes in the command (stupid spaces) and emphasized external files.
Parody is offline   #3 Reply With Quote