Skip navigation
Prateek.T
Currently Being Moderated

RH10 - Hyperlink an external pdf to chm file

Oct 3, 2013 1:02 AM

Tags: #file #pdf #hyperlink #external #chm #robohelp10

Hi,

 

I am Prateek, India. I am a technical writer & am working on RoboHelp. I am facing few issues with hyperlinks.

 

Let me straight away take to a scenario:

 

I have generated a chm file, name: "dynamic.chm" ( folder: D\Dynamic)

In this chm there are 3 links. viz: one.pdf, two.pdf, three.pdf ( folders random & each pdf is 50kb)

 

When I generated a chm file without giving hyperlinks, the size was 50kb.

I gave hyperlinks in a standard(robohelp -> create a project -> topic1 -> some text -> create hyperlink -> link to dropdown -> file -> select a pdf from a location) manner and generated chm output, the size was about 200kb.

 

My requirement: While having the chm size at 50kb, I need all the 3 hyperlinks to work fine. How can this be done?

Is there anyway where we can dynamically hyperlink the pdf files to the content?

 

As like in a word document, while giving hyperlink we provide "same folder", is there any option in RH? - I mentioned this because, we will be having a whole set of 100 documents in a single folder, and we will place the help file in the same folder. So, whenever a hyperlink is clicked, it must trigger the related .pdf file.

 

Thanks a lot in advance.

 

Regards,

Prateek Thungathurthy

 
Replies
  • RoboColum(n)
    5,356 posts
    Oct 8, 2004
    Currently Being Moderated
    Oct 3, 2013 4:44 AM   in reply to Prateek.T

    Hi Prateek.

     

    By linking to a PDF as you have, the file is added as a baggage file inside your project. That is why the CHM file increases. If you want to maintain the CHM size at 50kb you'll have to host the PDFs somewhere and hyperlink by adding a URL to them. That way the files are NOT part of the project.

     

    Out of interest, why is 200kb such a big issue?

     
    |
    Mark as:
  • RoboColum(n)
    5,356 posts
    Oct 8, 2004
    Currently Being Moderated
    Oct 4, 2013 2:20 AM   in reply to Prateek.T

    In that case you have two choices:

     

    1. Package up the 300+ PDFs in the install together with the CHMs. The link path to the PDFs would just be <filename>.pdf. However this has the drawback that the link would be broken if the PDF or CHM were ever moved from their original location.

    2. Add a hyperlink to each PDF file. This adds each PDF as a baggage file and increases the CHM file size. It does have the advantage that you only need to install the two CHM files. As the PDFs are part of the CHM, you can forget about them.

     

    Either way, the overall disk real estate would be about the same. Maybe option two would be less, especially if you use the file compression option in your single source layout.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 4, 2013 10:47 AM   in reply to Prateek.T

    Hi there

     

    As we are talking about CHM files here, I like to use the HTML Help Shortcut control to open external files. You just supply the file name of the PDF as the target for the control. That way the PDF may be kept outside of the CHM if you want.

     

    The only real side effect is a phenomenon that happens with CHM files when they are linked to the application. You may find that the actual folder that the help "sees" has changed, due to the way the developers have linked the CHM. And that's why we find folks using the JavaScript outlined at the link below to accomplish this.

     

    Click here to view

     

    Cheers... Rick

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 14, 2013 3:33 PM   in reply to Prateek.T

    Prateek.T wrote:

     

    Hi,

     

    Thanks for your reply, you made point more clear..

     

    As mentioned by you, we have 2 choices. Can you take some time to tell me the process for choice 1, please?

     

    "Package up the 300+ PDFs in the install together with the CHMs. The link path to the PDFs would just be <filename>.pdf. However this has the drawback that the link would be broken if the PDF or CHM were ever moved from their original location." - How can this be done? Well, to address the issue of broken links, we will not change the location of pdfs / chms. So the location would remain same all the time.

     

    And also, I got a personal reply for one of this forum members. This link "External Files Link" was provided by thim. I guess this works...(I dont know coding)

     

    Regards.

     

     

    I think Colum is saying build a chm with relative links to the pdfs that just contain the pdf file names. Then install both the chm and the PDFs into a single folder. As long as the pdfs and the chm remain in the same folder together, the pdfs should open up fine once the link is followed from the chm.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 14, 2013 4:01 PM   in reply to Prateek.T

    Prateek.T wrote:

     

    Hi captive8r,

     

    Thanks for your reply.

     

    Well, we dont really link our chm files to the application. As mentioned in my previous replies, we deliver a set of 300+ pdf's and 2chms as a single folder. You mentioned a point about HTML Help Shortcut Control.

     

    "I like to use the HTML Help Shortcut control to open external files. You just supply the file name of the PDF as the target for the control." -  Can you explain, how this works?

     

    Regards.

     

    Select Insert | HTML Help Controls | Shortcut. The Shortcut Wizard appears. In Shortcut, type the text for the linking text to use, and click Next. In Program to run when shortcut is activated, type the name of the PDF filename to open. Just the name. Continue through the Wizard. A button appears with the linking text on it. Place the PDF in the same directory as the compiled chm. The PDF opens when you click on the button.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 16, 2013 11:36 AM   in reply to Prateek.T

    How are you linking to the PDFs? Are you using the above Shortcut method?
    Can you post the HTML code and any scripting you're using?

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 17, 2013 9:09 AM   in reply to Prateek.T

    Thanks for sharing. Glad things are working for you now.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points