Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Realm Works Forums > Realm Works Discussion

Notices

Reply
 
Thread Tools Display Modes
Bobifle
Member
 
Join Date: Jun 2015
Posts: 78

Old June 19th, 2015, 11:55 AM
Hi,

I'm trying to create link/hyperlinks to a pdf document I've added in a topic.

1/ the only auto link created by RW points to the topic containing the pdf, not the pdf itself
2/ I tried to create in a snippet an hyperlink with an url pointing to my local drive pdf. But it's not supported.


Before opening a feature request, I'd like to know if anyone has achieved such feature ?

For instance:

snippet:
"The player uses a new discipline called The Ultimate discipline of death (core rule book#page=290)"

Edit : any way to bypass the 30 Mb file size ?

Last edited by Bobifle; June 19th, 2015 at 12:01 PM.
Bobifle is offline   #1 Reply With Quote
Vargr
Senior Member
 
Join Date: Apr 2014
Location: Denmark
Posts: 740

Old June 19th, 2015, 01:08 PM
You can add a new snippet in your topic and then choose

Documents and Media / PDF Document

That will enable you to have a link to a PDF.

I believe the PDF will be imbedded, not sure though.

I am planning to play around with that one of these days, for a need a link that will open an external file with the windows default program for that type of file. Ie. a link to a non-imbedded file.

Vargr
Deputy Calendar Champion


Legend has it, that the Tarrasque is a huge fighting beast, perpetually hungry.
Sleet entered History when he managed to get on the back of a Tarrasque only to be ridden out of History shortly after.

Using Realm Works, Worldographer (Hexographer 2), LibreOffice, Daz3D Studio, pen & paper for the realm World of Temeon and the system LEFD - both homebrewed.

Vargr is offline   #2 Reply With Quote
Parody
Senior Member
 
Join Date: Jan 2013
Location: Rochester, MN
Posts: 1,515

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
Vargr
Senior Member
 
Join Date: Apr 2014
Location: Denmark
Posts: 740

Old June 19th, 2015, 01:26 PM
Quote:
Originally Posted by Parody View Post
To open a 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.
Ohh... That is nifty! I am going to play around with that (going to use it for opening a spreadsheet - should be simpler).

Vargr
Deputy Calendar Champion


Legend has it, that the Tarrasque is a huge fighting beast, perpetually hungry.
Sleet entered History when he managed to get on the back of a Tarrasque only to be ridden out of History shortly after.

Using Realm Works, Worldographer (Hexographer 2), LibreOffice, Daz3D Studio, pen & paper for the realm World of Temeon and the system LEFD - both homebrewed.

Vargr is offline   #4 Reply With Quote
Parody
Senior Member
 
Join Date: Jan 2013
Location: Rochester, MN
Posts: 1,515

Old June 19th, 2015, 03:24 PM
If the file would normally open properly by double-clicking on it in Explorer and you don't need to pass command line options it's a lot easier:

Code:
explorer "c:\full\path\to\file.doc"
You probably don't even need to say "explorer".


Last edited by Parody; June 19th, 2015 at 03:26 PM.
Parody is offline   #5 Reply With Quote
Bobifle
Member
 
Join Date: Jun 2015
Posts: 78

Old June 19th, 2015, 03:34 PM
Parody thanks for your insights.

I've tried the tag snippet and the batch files.

For the batch file, I'm not convinced because you need to create a specific snippet. It's too much work. Like you said I already have the material available (I have the printed book and the pdf) and I must balance the expense of creating my links and the benfits of clicking ont it.

Your tag snippet is a nice idea, but it kinda lack de link feature.

Right now I'm using a simple "custom ref" in GM direction for instance : "CRB p253" stands for Core Rule Book page 253 but like your tags, no link is available.

One question though :
Any benefits from using tags over simple text ?
Bobifle is offline   #6 Reply With Quote
Parody
Senior Member
 
Join Date: Jan 2013
Location: Rochester, MN
Posts: 1,515

Old June 19th, 2015, 03:55 PM
Quote:
Originally Posted by Bobifle View Post
For the batch file, I'm not convinced because you need to create a specific snippet. It's too much work. Like you said I already have the material available (I have the printed book and the pdf) and I must balance the expense of creating my links and the benfits of clicking ont it.
That's what happens when you're working around something not intended by the application.

Let's step back: what you're trying to do is reference the source text of an ability. If you really want to reference the entire text of something, bring the entire text into Realm Works. For example, create an Article named "The Ultimate discipline of death" that is set up like a Discipline description in your rulebook. Copy in the text from your PDF so it's all in the Article. Then your Realm Works links go to a complete description and you don't normally need to reference the PDF/physical book. I'd still put a source reference into the Topic/Article for those times when I want to reference the source material, though.


Quote:
Originally Posted by Bobifle View Post
Any benefits from using tags over simple text ?
You can pick a default, so in most cases I just needed to type in the page number(s). If it's not the default, you can pick the name from a list instead of typing. In a system where the book titles don't have accepted abbreviations, that's pretty useful. You can also easily find all of the Topics/Articles that came from a specific source using a Tag Filter.

Parody is offline   #7 Reply With Quote
Vargr
Senior Member
 
Join Date: Apr 2014
Location: Denmark
Posts: 740

Old June 20th, 2015, 03:33 AM
@Parody:
Thank you for the suggestion.

---

I noticed that we have an option to insert a hyperlink (http in any snippet by right clicking the snippet.

I would like to suggest, that we get a file link as well, working in exactly the same manner - that would be extremely useful.

While Parody's solution work, it is not straightforward and a bit of a hassle to make.

Vargr
Deputy Calendar Champion


Legend has it, that the Tarrasque is a huge fighting beast, perpetually hungry.
Sleet entered History when he managed to get on the back of a Tarrasque only to be ridden out of History shortly after.

Using Realm Works, Worldographer (Hexographer 2), LibreOffice, Daz3D Studio, pen & paper for the realm World of Temeon and the system LEFD - both homebrewed.

Vargr is offline   #8 Reply With Quote
Bobifle
Member
 
Join Date: Jun 2015
Posts: 78

Old June 20th, 2015, 07:36 AM
Quote:
Originally Posted by Vargr View Post
I noticed that we have an option to insert a hyperlink (http in any snippet by right clicking the snippet.

I would like to suggest, that we get a file link as well, working in exactly the same manner - that would be extremely useful.
That is a great suggestion. And would cost nothing to implement. You simply need to support the file:// protocol (security issue put aside, I know little about this)
.
Bobifle is offline   #9 Reply With Quote
Acenoid
Senior Member
 
Join Date: Dec 2013
Posts: 798

Old June 20th, 2015, 04:20 PM
If RW would support Relative Paths (I would not know) it might be easier to link to other files on multiple machines

Join the (unofficial) Realm-Works IRC Chat: #realm-works on the Rizon Network (https://wiki.rizon.net/index.php?title=Servers)
-> Browser Client: https://kiwiirc.com/client/irc.rizon.net
Acenoid is offline   #10 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 12:29 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.