This content has been marked as final. Show 7 replies
Hi Eynar and welcome to the forums.
Yes you can add pdfs directly to a help file. It can get a bit tricky and depends a little on how you want them displayed. If you create a direct link to a .pdf (e.g. <A HREF="yourfile.pdf">click here</A>), the link will prompt the user to save or open the file. You can also use a shortcut control, which will open the .pdf in the user's default .pdf reader. The way to get the file to open in the help browser is to use the parser function (see below) and create a link calling that function <A ONCLICK="parser('yourfile.pdf')" STYLE="text-decoration:underline; COLOR: green; CURSOR: hand">Link to your PDF file</A>.
The parser function was written by Microsoft to find the correct path for linked files. I've included it here, you can also find it in Microsoft's help documentation. You would add it to your <HEAD> section. With this function your pdf files can be external to the compiled help file but in the same folder.
I hope John won't mind but I believe he uses an old version of RH and may not be aware that you can now import the PDF into RH. I don't think you could do that with earlier versions.
You don't say why you don't like the appearance but maybe changing the style sheet that gets created on import would help or just applying another one.
first of all, thank you both for the help and sorry for the late reply.
to answer peter's reply:
Importing is what i'm trying to avoid. I've tried using the style sheets but the converted topic never looks the same as the original PDF. Is there any way to reference use PDFs and not convert them? I would like the user to be able to click on the topic in the table of contents and have the Pdf appear in the right window. Does that make sense?
That will work as I've described using the parser function. That is, of course, if you are using compiled help and not WebHelp. Looking back that wasn't made clear in your original post.
Thanks Peter for the update. I do indeed use an old version of RH, but since Microsoft has not changed the help engine it all still works. What does "import pdf" do in the newer versions? Convert to HTML? In my ancient version, you could "import" Word documents but that was never good, especially if there were embedded images, so it is something we avoided like the plague. Better to embed the Word document as a Word document. Of course, that meant the end user would need to have Word installed. But who doesn't have Acrobat Reader? So I'd think it is best to include .pdfs as they are.
John, I hope you didn't interpret my post as suggesting your method did not work. It was only intended to point out that there is now an inbuilt method.
Yes it does convert the PDF to HTML. Not sure how good a job it does as it is not a feature that I have used, other than trying it out of interest.
No, Peter. I didn't take it that way. I just wanted to clarify for Eynar that my comments were actually specific to compiled help. I think you'd probably do something different for WebHelp, no?
great thanks again to both of you. i'll try john's suggestion.