Open PDF button in HTML5 output?

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
claypool
Propeller Head
Posts: 22
Joined: Wed Aug 14, 2019 5:35 am

Open PDF button in HTML5 output?

Post by claypool »

Good afternoon -

I am trying to include a button that allows users to open up the Project's PDF output file in the HTML5 output.

I've used a javascript in the toolbar skin for a button:

function MAIN() {

window.open("Guide.pdf");
}

However, this doesn't seem to account for any relative linking - I can open the PDF from the default opening page, but no other. Is there a way to correct this? I'm not familiar with JavaScript, so I did this based on some articles that I had read.

Thanks in advance for your help!
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: Open PDF button in HTML5 output?

Post by NorthEast »

The easiest way is to add the PDF in your project Content folder, and just insert a hyperlink to the PDF - as Flare will handle the link path.
You can style the link to look like a button.
claypool
Propeller Head
Posts: 22
Joined: Wed Aug 14, 2019 5:35 am

Re: Open PDF button in HTML5 output?

Post by claypool »

Thanks, Dave! Worked like a charm. Love all the things I am learning from this forum.
JvdB
Propeller Head
Posts: 12
Joined: Fri Feb 28, 2020 2:05 am

Re: Open PDF button in HTML5 output?

Post by JvdB »

hi Dave

I'm hoping you're going to see this! :)

Is there any way to put that stylised link alongside the Print/Expand All/ Navigate Next / Navigate Previous buttons that you can insert above the side navigation, so that it appears as another button?

Thanks
Jen
Post Reply