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.
Post Reply
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

How to remove hyperlinks in PDF output?

Post by ChoccieMuffin »

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 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: How to remove hyperlinks in PDF output?

Post by ChoccieMuffin »

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 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: How to remove hyperlinks in PDF output?

Post by NorthEast »

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).
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: How to remove hyperlinks in PDF output?

Post by ChoccieMuffin »

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 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: How to remove hyperlinks in PDF output?

Post by NorthEast »

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.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: How to remove hyperlinks in PDF output?

Post by ChoccieMuffin »

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 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: How to remove hyperlinks in PDF output?

Post by NorthEast »

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.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: How to remove hyperlinks in PDF output?

Post by ChoccieMuffin »

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 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Post Reply