How to remove hyperlinks in PDF output?

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.

How to remove hyperlinks in PDF output?

Postby ChoccieMuffin on Tue Nov 06, 2018 11:08 am

I'm sure I read something about this recently but couldn't find the thread, so apologies in advance.

Anyway, here's my issue. I have hyperlinks to topics that are only included in my online output (CHM) so I want the TEXT of the hyperlink to appear in my PDF output but not the link. I found this page in the help: http://help.madcapsoftware.com/flare201 ... RemoveLink

So this is what I did:

1. Added a condition to my condition tag set - Primary.ScreenOnlyHyperlink.
2. Added a generic style to my stylesheet - .ScreenOnlyHyperlink.
Code: Select all
   .ScreenOnlyHyperlink
   {
      mc-conditions: 'Primary.ScreenOnlyHyperlink';
      mc-exclude-action: unbind;
      background-color: #deffde;
   }

3. Applied the .ScreenOnlyHyperlink to the a links where I only want the text.
4. In the PDF target, set .ScreenOnlyHyperlink to EXCLUDE.
5. Generated target.

My problem is, the links aren't excluded in the PDF so I get the usual build warning, and a hyperlink that doesn't work in the PDF.

I'm fairly sure it's a case of pilot error here, so what have I done wrong?

Thanks for your help, I'm expecting this to be something dumb that I've done!
Started as a newbie with Flare 6.1, now using Flare 2018.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Propellus Maximus
 
Posts: 1832
Joined: Wed Apr 14, 2010 8:01 am

Re: How to remove hyperlinks in PDF output?

Postby ChoccieMuffin on Thu Nov 08, 2018 5:31 am

Does anyone have any suggestions on this one? I'm stumped, as I thought I'd done the necessary but it's not working. Help gratefully received.
Started as a newbie with Flare 6.1, now using Flare 2018.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Propellus Maximus
 
Posts: 1832
Joined: Wed Apr 14, 2010 8:01 am

Re: How to remove hyperlinks in PDF output?

Postby Dave Lee on Thu Nov 08, 2018 7:28 am

Ok, you don't need to do any of that (well, apart from 4).

Flare will actually do this for you automatically, provided the topics that you link to are excluded from that target.

So:
1) For the topics you don't want to include in the PDF, set the Primary.ScreenOnlyHyperlink (or whatever) condition on the topic files.
2) Do absolutely nothing else. Flare will display these links in plain text in the PDF output (or any other output).
Dave Lee
Master Propellus Maximus
 
Posts: 5368
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: How to remove hyperlinks in PDF output?

Postby ChoccieMuffin on Fri Nov 09, 2018 4:20 am

Dave Lee wrote:Ok, you don't need to do any of that (well, apart from 4).

Flare will actually do this for you automatically, provided the topics that you link to are excluded from that target.

So:
1) For the topics you don't want to include in the PDF, set the Primary.ScreenOnlyHyperlink (or whatever) condition on the topic files.
2) Do absolutely nothing else. Flare will display these links in plain text in the PDF output (or any other output).


'Scuse me being a bit fick, but I'm not completely sure which topics I set the Primary.ScreenOnlyHyperlink condition on. Is it the topics that contain the links I've set the style class on (typically in my case there will be a table containing a list of hyperlinks)? I ask this because the topics that they link to are already excluded from the PDF. And do I also need to set any include or exclude condition in the target? I'm sorry, I'm just confused, and it's Friday, and I'm feeling very stupid.

Or have I just got the process all wrong? Should I instead just remove any conditions at all from the links in the topic (there was previously a hyperlink conditioned as ScreenOnly and a bit of ordinary text conditioned as PrintOnly) and if I apply the Primary.ScreenOnlyHyperlink condition to the topic and not set anything at all on the target?

(My head hurts, I think I need a lie-down!) :D
Started as a newbie with Flare 6.1, now using Flare 2018.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Propellus Maximus
 
Posts: 1832
Joined: Wed Apr 14, 2010 8:01 am

Re: How to remove hyperlinks in PDF output?

Postby Dave Lee on Fri Nov 09, 2018 5:01 am

ChoccieMuffin wrote:Scuse me being a bit fick, but I'm not completely sure which topics I set the Primary.ScreenOnlyHyperlink condition on. Is it the topics that contain the links I've set the style class on (typically in my case there will be a table containing a list of hyperlinks)? I ask this because the topics that they link to are already excluded from the PDF. And do I also need to set any include or exclude condition in the target? I'm sorry, I'm just confused, and it's Friday, and I'm feeling very stupid.


(1) Set the condition on the topic files that you don't want to include in the output - i.e. the topics that you've linked to (not from). Set this on the files themselves, in file/topic properties. (Probably also call the condition Primary.ScreenOnly or something, as it's not for links.)
(2) In your target, exclude that condition.
Dave Lee
Master Propellus Maximus
 
Posts: 5368
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: How to remove hyperlinks in PDF output?

Postby ChoccieMuffin on Wed Nov 14, 2018 3:29 am

Right then - as I expected, the reason it didn't work was driver error.

The key thing I needed to do was ensure that the .ScreenOnlyHyperlink class was applied to the HYPERLINK specifically, and not to the paragraph that contained it. I used a specific class for these so I could see at a glance that the text would appear in the PDF output, and I used a class rather than just a condition so that I only needed to apply the class rather than apply the condition and then click an option in the Conditions box (which I know I'd forget!)

Dave, thank you very much for your help, though I don't think your suggestion to apply the condition on the topics I've linked to rather than to the links in the document containing the links is quite correct. So when I did what I said in the first post MAKING SURE I APPLIED THE CONDITION TO THE HYPERLINK, NOT ITS CONTAINING PARAGRAPH, it worked as expected.
Started as a newbie with Flare 6.1, now using Flare 2018.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Propellus Maximus
 
Posts: 1832
Joined: Wed Apr 14, 2010 8:01 am

Re: How to remove hyperlinks in PDF output?

Postby Dave Lee on Wed Nov 14, 2018 4:11 am

ChoccieMuffin wrote:Dave, thank you very much for your help, though I don't think your suggestion to apply the condition on the topics I've linked to rather than to the links in the document containing the links is quite correct.


Have you tried it? It works perfectly fine for me.

That's why I was a bit surprised that you're doing any of this work, since it's something Flare will do for you automatically, without needing to set any conditions/classes on your links.

Note the condition has to be on the topic file itself, and the condition excluded in the target.
Dave Lee
Master Propellus Maximus
 
Posts: 5368
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: How to remove hyperlinks in PDF output?

Postby ChoccieMuffin on Wed Nov 14, 2018 5:07 am

Dave Lee wrote:
ChoccieMuffin wrote:Dave, thank you very much for your help, though I don't think your suggestion to apply the condition on the topics I've linked to rather than to the links in the document containing the links is quite correct.


Have you tried it? It works perfectly fine for me.

That's why I was a bit surprised that you're doing any of this work, since it's something Flare will do for you automatically, without needing to set any conditions/classes on your links.

Note the condition has to be on the topic file itself, and the condition excluded in the target.


Yes, I tried it, and it didn't work, I still got the links in the PDF output. As before, it could just be "pilot error" again, as I've already demonstrated that in spades on this subject! But I'm not going to stress about it as I've worked out a way to do it that works for me, and that I can document for my colleague, so I'm happy. :)
Started as a newbie with Flare 6.1, now using Flare 2018.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Propellus Maximus
 
Posts: 1832
Joined: Wed Apr 14, 2010 8:01 am


Return to Printed Documentation Targets

Who is online

Users browsing this forum: No registered users and 5 guests