Copy link to clipboard
Copied
This question relates to my work with FM>RH integration. But the task I'm trying to accomplish is something specifically done in RH with customization of WebHelp skins, so I'm posting in this forum. I'm running RH9 on Windows XP Pro.
We have recently replaced WebWorks with RH and finally have the mapping files set up to generate Help from our FM source files. Celebration was short, because then we realized that our users wanted a PDF option. We haven't done any mapping to create PDFs from RH, and that seems kind of silly anyway, since we have superior PDF generation from the FM files.
So I set about making a custom button in the header of a WebHelp skin that will link to a PDF. I accomplshed that work, but its behavior falls short of the functionality I'd like to see. Currently, you click on the button and it opens the PDF in the browser window of the Help system. I want it to open in a new window, so I can keep the experience clean for the users, separating Help and PDF. I don't know if this is possible.
Here is where I am at. To create button I navigated to:
Project Set-up/Skins/NEW SKIN/WebHelp Skin Editor/ Main/NEW BUTTON
When I choose the edit icon to customize the new button, there is an option to choose Link or JavaScript. I got the PDF to open inside the Help browser by just using the Link option and specifying the PDF. I have tried to use the JavaScript option without success. My JS may be wrong, but when I choose inline JS option and place anything there, it turns all the navigation buttons to gobbledy gook. Specifying an external JS file doesn't work at all.
Any direction or help would be appreciated.
Thanks,
Douglas
Hi Rick,
I do believe you've added it, but it's a bit hidden. To get it working, you need to use the window.open method: http://www.w3schools.com/jsref/met_win_open.asp
In the onclick, add: window.open('url_to_pdf','','width=500,height=500');
Greet,
Willam
Copy link to clipboard
Copied
Have a search in the RH forums on PDF links - there have been a few discussions recently on adding a button to launch PDFs.
Copy link to clipboard
Copied
I've taken a look around and don't see anything that is helpful. The results were very limited and didn't address what I was trying to achieve specifically. Any other advice?
Copy link to clipboard
Copied
Check Willam van Weelden's site? (www.wvanweelden.eu<http://www.wvanweelden.eu>) - he's a scripting guru
Copy link to clipboard
Copied
Hi there
I believe this is documented in my Skinny on Skins file available at:
Cheers... Rick
Copy link to clipboard
Copied
Hi Rick,
I do believe you've added it, but it's a bit hidden. To get it working, you need to use the window.open method: http://www.w3schools.com/jsref/met_win_open.asp
In the onclick, add: window.open('url_to_pdf','','width=500,height=500');
Greet,
Willam
Copy link to clipboard
Copied
Works perfectly. Thank you all for your help!
Copy link to clipboard
Copied
I see one other shortcoming with this solution now that I've implemented it. Our Help follows the applictions through a convoluted path of development servers, amongst other strangeness with the way we deploy Help and PDF documentation. My concern is referencing a single URL/file on a server. Since we're moving things around, that doesn't really work well, we want the PDF to be with the Help system, if possible. Is there a way to reference the PDF as a relative link in the baggage files, so it will pull it from whatever server the Help system resides on without having to make changes?
UPDATE:
It seems if you place the PDF in the WebHelp folder and reference it as the JavaScript, the Help system automatically reats it as root folder and find it there. So, I think this is the solution to my question? However, this is a bit annoying, as it means you have to remember to manually place the file in the compiled Help system. I had earlier experimented with placing the PDF as a baggage file, but those don't seem to carry over when you compile Help. Is there any way to put the PDF in the Baggage Files and designate that it be included in compiled Help?
Copy link to clipboard
Copied
Hi there
douglas131313 wrote:
...I had earlier experimented with placing the PDF as a baggage file, but those don't seem to carry over when you compile Help. Is there any way to put the PDF in the Baggage Files and designate that it be included in compiled Help?
That would be very odd behavior because that's the precise reason for the existence of Baggage Files!
Are you certain that the PDF isn't being copied to the output folder? Rick
Copy link to clipboard
Copied
Just use a relative path. That is the solution to your problem.
Greet,
Willam