Importing a PDF file and then displaying it

This forum is for all Flare issues related to importing files or projects.
Post Reply
dheadrick
Jr. Propeller Head
Posts: 2
Joined: Fri Jan 21, 2011 11:11 am

Importing a PDF file and then displaying it

Post by dheadrick »

Hi,

I just started using Madcap Flare this week and this is my first posting to the forum.

My question is: Can I import (or perhaps embed is a better word) a PDF document using Flare and then activate (view) the PDF file from the CHM file created by Flare? So, I'd have a link in the CHM file to the PDF file that hopefully I can somehow import/embed within my CHM file. I would want the PDF file, once it's clicked on, to be viewed in Adobe Reader or Adobe Acrobat, whatever PDF viewer the user has on their system.

Stated another way, the PDF file wouldn't be viewed by the CHM file viewer, it would be viewed outside of the CHM file. But I'd want the PDF file embedded in the CHM file so that I would deliver one file, not two. I know that I can link to a separate PDF file, I just don't know if I can embed a PDF file within a CHM file and then link to it and have it displayed.

Thanks for your help!

Dave
alaltenburg
Sr. Propeller Head
Posts: 342
Joined: Mon Nov 03, 2008 9:33 am
Location: The heart of America

Re: Importing a PDF file and then displaying it

Post by alaltenburg »

Welcome to the forums!

In order to embed a PDF file, all you have to do is add the PDF file inside the project through your explorer window. Add it to the list of .htm files you already have created. Once inside the project, all you have to do is select text, press hyperlink, and link to a "file in Project" by selecting the pdf file. Then when the selected text is clicked, adobe reader will open the file.

You can also just add the PDF file to the TOC and when that item is clicked, Adobe reader will bring up the program.

Hope that helps,
Andrea
The Moon is the first milestone on the road to the stars.

— Arthur C. Clarke
dheadrick
Jr. Propeller Head
Posts: 2
Joined: Fri Jan 21, 2011 11:11 am

Re: Importing a PDF file and then displaying it

Post by dheadrick »

Hi Andrea,

Thanks for your response. By "explorer window", I presume you mean the "Content Explorer" -- true?

Second question: How do I add the PDF file to the list of HTML topics? If I select "Import file", it gives me a choice of MS Word, FrameMaker, DITA import file and Flare project file -- no PDF choice. Under "Project", it appears I can add numerous items but a PDF file isn't one of them.

The Flare Getting Started Guide has an extensive chapter on "Adding Stuff to Projects", but PDF files aren't discussed there either.

Your confirmation if I should be on "Content Explorer" and any information you have on how to actually add a PDF file would be appreciated.

Thanks again.

Dave
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Importing a PDF file and then displaying it

Post by LTinker68 »

You don't import it -- just use Windows Explorer to copy the PDF file into the project. I usually create a folder called Files under the Resources folder and put all my external content in there.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Steveman
Sr. Propeller Head
Posts: 110
Joined: Mon Jul 12, 2010 9:55 pm
Location: Palmerston North, New Zealand

Re: Importing a PDF file and then displaying it

Post by Steveman »

I've tried this but when I build my Webhelp it says the file could not be loaded and it aborts the build. Is there a step I'm missing here?

I've created a File folder under Resources as Lisa has suggested. Copied the PDF file into it using Windows Explorer. Created a hyperlink in the topic, and selected "File in Project".

Like the others I just want a nice PDF to be available to those users who look at the WebHelp online version of the manual and think to themselves; "Gee I wouldn't mind having a copy of that literary masterpiece".
Carp diem - Seize the fish
wclass
Propellus Maximus
Posts: 1238
Joined: Mon Feb 27, 2006 5:56 am
Location: Melbourne, Australia

Re: Importing a PDF file and then displaying it

Post by wclass »

Your steps look OK, but there is a known issue with webhelp and PDFs if you have "mark of the web" turned on (Target Advanced tab). It won't display the PDf but it usually builds OK.
Can you view the PDF file OK - I'd check to make sure it views using Print Preview.
For reference, I can view PDFs in both webhelp and CHMs.
Margaret Hassall - Melbourne
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Importing a PDF file and then displaying it

Post by LTinker68 »

If you are using MOTW, then you can get around it by embedding the PDF in a topic instead of linking to it. See this post --> http://forums.madcapsoftware.com/viewto ... 324#p31324
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Steveman
Sr. Propeller Head
Posts: 110
Joined: Mon Jul 12, 2010 9:55 pm
Location: Palmerston North, New Zealand

Re: Importing a PDF file and then displaying it

Post by Steveman »

I've been reading the thread about embedding as well and have tried that too with no success. Whats interesting is the error that I get says it cannot locate or load the PDF and the file path it displays is for the Flare project that originally created it. Even if I add a path to where the PDF was published rather than inside the WebHelp project, it still displays the same error going back to the original Flare Project. (which is in the location that the file path suggests in the error)

I've tried adding the PDF into the Content Explorer. When you double click-it it opens okay. I am using MOTW for now but only because I'm working on a local system. It will shortly be moved to a web server so hopefully I won't need MOTW then? But for now I don't think thats the problem, it's not even building.

Lisa, I tried your suggestion for embedding from the linked thread, but with the same issue. Perhaps I need to test this with a PDF that hasn't been published by Flare?
Carp diem - Seize the fish
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Importing a PDF file and then displaying it

Post by LTinker68 »

Steveman wrote:Perhaps I need to test this with a PDF that hasn't been published by Flare?
I don't know if that matters. I can't remember at this point if the PDF I used when I originally tested that had been created in Flare or not. I don't remember what version of Flare I tested it in either so it's possible that it was working in a previous version but not now. What version of Flare are you using -- I have the latest but I can install the older ones to retest if necessary.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Importing a PDF file and then displaying it

Post by NorthEast »

I'd suggest deleting the existing link, then drag the file from Content Explorer into the topic - that will create a link.
Then switch off MOTW in your primary target (assuming that's WebHelp), and check the topic in preview to see if the link works.

If your build still fails, I would double-check that the topic doesn't contain any other old links that might be causing the failure.
Steveman
Sr. Propeller Head
Posts: 110
Joined: Mon Jul 12, 2010 9:55 pm
Location: Palmerston North, New Zealand

Re: Importing a PDF file and then displaying it

Post by Steveman »

Ok, it looks like the build problem was related to a linked project not being found. Not sure why but reloaded it and it was fine. Turns out by sheer coincidence that it was the same project where the PDF file was generated. So naturally I figured the problem was connected.

I set up a dummy page called Downloads and made sure the PDF file was at the same level as the topic. I embedded the PDF in the topic. I can double-click the PDF in the Content Explorer and it opens fine. But when I build the output it says it can't find the linked file. So it looks like a linking problem now.

PS. I just realised I totally hijacked this thread. My apologies :oops:
Carp diem - Seize the fish
Post Reply