How Do I Remove all Hyperlinks from Printed output?
-
WritersBlock
- Propeller Head
- Posts: 19
- Joined: Mon May 17, 2010 11:46 am
How Do I Remove all Hyperlinks from Printed output?
Sorry I searched and searched. Is there an option to turn off all hyperlinks (be them URLs or Popups) so that when my printed .pdf is outputted my links are not blue underline hyperlinks?If you click on the link they are obviously broken.
Thanks for the help.
Thanks for the help.
-
lacastle
- Propellus Maximus
- Posts: 1028
- Joined: Thu Apr 12, 2007 7:28 am
- Location: Wilmington, DE
- Contact:
Re: How Do I Remove all Hyperlinks from Printed output?
I have my hyperlink (<a>) styles set to to the same font/size/color/etc as my regular text in my print medium. technically they are still hyperlinks, but unless someone is reading word for word with the mouse pointed at each word, he won't know the text can be clicked.
Laura A. Castle
http://www.lauracastle.com
http://www.lauracastle.com
Re: How Do I Remove all Hyperlinks from Printed output?
Which a text reader would do (I think) for the vision-impaired.lacastle wrote:... but unless someone is reading word for word with the mouse pointed at each word, he won't know the text can be clicked.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Re: How Do I Remove all Hyperlinks from Printed output?
I use conditions to remove the links from my printed output.
1. I mark each link with the condition "Web-only" and set Exclude Action (in the bottom left corner of the Condition Tags dialog) to Unbind.
2. In the target, on the Conditional Text tab, I select Exclude checkbox for the "Web-only" condition.
3. When I compile, links are not there.
I compile only the what's new topic as a PDF file, so I have a relatively small number of links to manage. Everything else is web only.
1. I mark each link with the condition "Web-only" and set Exclude Action (in the bottom left corner of the Condition Tags dialog) to Unbind.
2. In the target, on the Conditional Text tab, I select Exclude checkbox for the "Web-only" condition.
3. When I compile, links are not there.
I compile only the what's new topic as a PDF file, so I have a relatively small number of links to manage. Everything else is web only.
-
mmtechwriter
- Jr. Propeller Head
- Posts: 6
- Joined: Mon Feb 21, 2011 9:00 pm
Re: How Do I Remove all Hyperlinks from Printed output?
Hi,dsimov wrote: I compile only the what's new topic as a PDF file, so I have a relatively small number of links to manage. Everything else is web only.
I recently came across the same problem. I have a lengthy topic that lists the name of all the APIs, and each name is a link. In the WebHelp output, I have all the topics included so all the links work fine. In the PDF output which is a small reference document, I want to print only the main topic containing the list. All the links need to be stripped from printed output. The links are endless in number, so setting conditions for each link is not manageable.
Is there a simple way to do this - like setting some property in the target that remove all links?
Any help is appreciated.
Thanks.
-
doc_guy
- Propellus Maximus
- Posts: 1979
- Joined: Tue Nov 28, 2006 11:18 am
- Location: Crossroads of the West
- Contact:
Re: How Do I Remove all Hyperlinks from Printed output?
So you want to actually remove the links, right? You are saying that styling the text to look like the regular body text isn't an option?
In my PDFs, I use the Print section of the style sheet to make links *look* like body text.
I suppose one option would be to generate Word output, and remove the links there (right click and "remove hyperlink") and then publish to PDF from Word. (Not idea, I totally recognize.)
Here is a thread from Adobe's website about removing links from PDFs. (You'd still need to style the links so that they aren't blue, or whatever.)
Hope this helps.
In my PDFs, I use the Print section of the style sheet to make links *look* like body text.
I suppose one option would be to generate Word output, and remove the links there (right click and "remove hyperlink") and then publish to PDF from Word. (Not idea, I totally recognize.)
Here is a thread from Adobe's website about removing links from PDFs. (You'd still need to style the links so that they aren't blue, or whatever.)
Hope this helps.
-
mmtechwriter
- Jr. Propeller Head
- Posts: 6
- Joined: Mon Feb 21, 2011 9:00 pm
Re: How Do I Remove all Hyperlinks from Printed output?
Thanks Dave for suggesting the workarounds. I styled the text like plain text and then removed the links from Acrobat PDF, and yes it worked. However, this doesn’t look like the preferred way of doing it. It would have been really good if I could have managed it from source rather than altering the output. This also requires me to own a copy of Acrobat license which in our setup is not available all that time. With Word, since the two page document I am talking about contains nearly 150 links so removing the links one by one after every compilation will not be feasible in real-time.
We were earlier using FrameMaker for this small document and I recently generated it from Flare thinking to avail its single source capabilities. However, with no way to remove links in Flare, I think I will revert to FreameMaker file again.
We were earlier using FrameMaker for this small document and I recently generated it from Flare thinking to avail its single source capabilities. However, with no way to remove links in Flare, I think I will revert to FreameMaker file again.
-
Centauri27
- Sr. Propeller Head
- Posts: 134
- Joined: Thu Apr 17, 2008 11:30 am
- Location: Vancouver, BC, Canada
Re: How Do I Remove all Hyperlinks from Printed output?
Great tip, dsimov. This definitely gets the job done. The only drawback for me is that I must apply it to thousands of links in our legacy help system that's several hundred topics.
And I must avoid applying it to hyperlinks that lead to bookmarks within the same topic--those I want to keep.
I've logged an enhancement suggestion with MadCap for putting in a switch in Flare to suppress hyperlinks in PDF, but I don't know if it'll ever get implemented.
Carl
I've logged an enhancement suggestion with MadCap for putting in a switch in Flare to suppress hyperlinks in PDF, but I don't know if it'll ever get implemented.
Carl
Re: How Do I Remove all Hyperlinks from Printed output?
Have just come across exactly the same requirement, have logged the same feature request.
It does seem absurd - if I'm producing a word doc or a pdf, then its highly unlikely that any of the hyperlinks in those topics that point outside that TOC will work/be wanted. So there should be a target-level switch suppressing them.
Unless someone has found a cunning solution somewhere? Conditional text, and changes to stylesheets, is not really a runner.
Thanks.
It does seem absurd - if I'm producing a word doc or a pdf, then its highly unlikely that any of the hyperlinks in those topics that point outside that TOC will work/be wanted. So there should be a target-level switch suppressing them.
Unless someone has found a cunning solution somewhere? Conditional text, and changes to stylesheets, is not really a runner.
Thanks.
Re: How Do I Remove all Hyperlinks from Printed output?
Hey all,
forgive my thread necromancy, but I am in the same boat and would like to see the final solution for this problem which would be easier to implement than the suggested one with conditions. I strongly believe that the solution to this should be as simple as checking a single checkbox in the target or (which would be even better) adding a tag to the "a" style's printed output in the stylesheet.
Given the number of Flare projects we have, the changing of all links in them could easily equate to 100+ hours of work. What is worse is future development - usually we are making about 5 new manuals a year and adding the hyperlink in there is pretty easy. Adding a hyperlink and then manually adding a condition for it is time consuming and would inevitably lead to omissions.
What we are looking for is a solution which enables us to de-activate links aiming out of the project, as usually a target of the Flare project contains all topics in there (with several notable exceptions), 95% of the links not working is links aiming to other project. When I examine such link in Flare, it says "Link to website", with address something like "ms-its:[%25=oem.Clarity.chm%25]::/Help/020-instrument/020.040-method/020.040-event-table.htm".
Suggested solution is not desirable either, some of the projects are quite complex and contain 20+ different conditions. Managing the conditions in a way that everything is displayed correctly in given target is quite challenging, adding another conditions into the mix just does not work...
So, to the questions finally - has anyone find different solution for the problem? Is such feature already implemented and I just couldn't find it due to my poor google-fu? And if not, what can I do to raise a priority more (vote somewhere, send feature request, ...)?
Thanks all in advance!
forgive my thread necromancy, but I am in the same boat and would like to see the final solution for this problem which would be easier to implement than the suggested one with conditions. I strongly believe that the solution to this should be as simple as checking a single checkbox in the target or (which would be even better) adding a tag to the "a" style's printed output in the stylesheet.
Given the number of Flare projects we have, the changing of all links in them could easily equate to 100+ hours of work. What is worse is future development - usually we are making about 5 new manuals a year and adding the hyperlink in there is pretty easy. Adding a hyperlink and then manually adding a condition for it is time consuming and would inevitably lead to omissions.
What we are looking for is a solution which enables us to de-activate links aiming out of the project, as usually a target of the Flare project contains all topics in there (with several notable exceptions), 95% of the links not working is links aiming to other project. When I examine such link in Flare, it says "Link to website", with address something like "ms-its:[%25=oem.Clarity.chm%25]::/Help/020-instrument/020.040-method/020.040-event-table.htm".
Suggested solution is not desirable either, some of the projects are quite complex and contain 20+ different conditions. Managing the conditions in a way that everything is displayed correctly in given target is quite challenging, adding another conditions into the mix just does not work...
So, to the questions finally - has anyone find different solution for the problem? Is such feature already implemented and I just couldn't find it due to my poor google-fu? And if not, what can I do to raise a priority more (vote somewhere, send feature request, ...)?
Thanks all in advance!
-
ChoccieMuffin
- Senior Propellus Maximus
- Posts: 2650
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: How Do I Remove all Hyperlinks from Printed output?
You can raise a feature request - see the link in my footer. It does sound sensible to have. Good luck.
Started as a newbie with Flare 6.1, now using Flare 2024r2.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Re: How Do I Remove all Hyperlinks from Printed output?
This seems to still be a problem. There's no way to easily exclude links from printed output?
Re: How Do I Remove all Hyperlinks from Printed output?
In instances where:
* you've got a veritable sh*tload of links in a source project
* you import that project into another project
* you use only a select number of topics from the source in the child project
* you build the pdf and realise that there are broken links that cannot be solved (you cannot publish) unless you include the linked topics in your TOC
* the people who build the product ignore your requests for a "Ignore broken links setting"
... you can use Perl
This script implements dsimov's solution and creates a new directory "AddedConditional" so that you don't overwrite your topics:
1. Back up your topic folder in the source project - UserManualBK
2. Rename the AddedConditional folder to your topic folder name after you run the script - UserManual.
3. Remember to set "ScreenOnly" to Exclude (Flare version 10) in the PDF target build.
4. Then build the source and the child PDF project to check that all is fine and the links are plain text in the PDF (the child project is set to "auto-import on build" in this instance).
You can install Perl on windows machines and also install Cygwin (which includes Perl) to get all the Linux Bash commands as in "Useful Bash Command..." below.
The script:
* matches the links using regular expressions,
* stores the matches with the use of brackets (.*?) and
* inserts the sequentially stored matches ($1, $2, $3 etc) at the appropriate spot.
You add the additional text to (and within) the matched text: MadCap:conditions="Default.ScreenOnly" MadCap:excludeAction="unbind">.
Run the below with "perl AddConditionalToHREF.pl ." in a Perl (or Bash) command prompt from within your Topics folder:
* you've got a veritable sh*tload of links in a source project
* you import that project into another project
* you use only a select number of topics from the source in the child project
* you build the pdf and realise that there are broken links that cannot be solved (you cannot publish) unless you include the linked topics in your TOC
* the people who build the product ignore your requests for a "Ignore broken links setting"
... you can use Perl
This script implements dsimov's solution and creates a new directory "AddedConditional" so that you don't overwrite your topics:
1. Back up your topic folder in the source project - UserManualBK
2. Rename the AddedConditional folder to your topic folder name after you run the script - UserManual.
3. Remember to set "ScreenOnly" to Exclude (Flare version 10) in the PDF target build.
4. Then build the source and the child PDF project to check that all is fine and the links are plain text in the PDF (the child project is set to "auto-import on build" in this instance).
You can install Perl on windows machines and also install Cygwin (which includes Perl) to get all the Linux Bash commands as in "Useful Bash Command..." below.
The script:
* matches the links using regular expressions,
* stores the matches with the use of brackets (.*?) and
* inserts the sequentially stored matches ($1, $2, $3 etc) at the appropriate spot.
You add the additional text to (and within) the matched text: MadCap:conditions="Default.ScreenOnly" MadCap:excludeAction="unbind">.
Run the below with "perl AddConditionalToHREF.pl ." in a Perl (or Bash) command prompt from within your Topics folder:
Code: Select all
#!/usr/bin/local/perl -w
use strict;
#---------------------------------------------------#
# Useful Bash command to check matches #
#--------------------------------------------------#
# find . -name "*.htm" -print0 | xargs -0 egrep "The text you are trying to match"
#--------------#
# FileHandles #
#--------------#
use IO::File;
my $outFileHandle = new IO::File;
my $processedDirName="AddedConditional";
my $inFileExtension = ".htm";
my $outFileExtension = ".htm";
# -- exit if no directory supplied --#
if(@ARGV < 1) {
print "\n** usage: AddConditionalToHREF.pl PathToFiles/ **\n\n";
exit(0);
}
my $dirName=$ARGV[0];
#-- remove forward slash (delimiter) from the end of directory name if present--#
$dirName=~s/(.*)\//$1/i;
# -- make the processed/ directory --#
mkdir "$dirName/$processedDirName";
my $inFileName="";
# -- Read the files into an array --#
my @filesArray = glob("$dirName/*$inFileExtension");
my $fileCount=0;
foreach $inFileName (@filesArray) {
open(FILEHANDLE, $inFileName)
or die ("Cannot open file");
my @array = <FILEHANDLE>;
my $currentFile=$filesArray[$fileCount];
# -- obtain the file name only -- #
$currentFile=~/.*\/(.*)$inFileExtension/;
my $outFileName="$1$outFileExtension";
#print "Out File: $outFileName\n";
$outFileHandle->open(">$dirName/$processedDirName/$outFileName") or die "Cannot open file";
my $i = 0;
for (@array) {
if($_=~/(.*?)<a href="(.*?)">(.*?)<\/a>(.*)/) {
$_=~s/(.*?)<a href="(.*?)">(.*?)<\/a>(.*)/$1<a href="$2" MadCap:conditions="Default.ScreenOnly" MadCap:excludeAction="unbind">$3<\/a>$4/;
#<MadCap:conditionalText MadCap:conditions="Default.PrintOnly">$3<\/MadCap:conditionalText>
print "Match:\nOne: $1 \nTwo: $2 \nThree: $3\nFour: $4\n";
}
$i++;
}
#----------------------#
# Remove empty lines #
# #
#----------------------#
for (@array) {
if($_=~/^\s*$/) {
chomp $_;
}
}
#---------------------------------------------#
# Print the results to the equivalently-named #
# file in the $processedDirName directory #
#---------------------------------------------#
for (@array) {
$outFileHandle->print($_);
}
$fileCount++;
}Re: How Do I Remove all Hyperlinks from Printed output?
I just searched this forum for how to solve this issue and came across my own post - now that's self help!
On this occasion, I wanted to turn off the links for Screen output as well as Print output. I modified the MadCap:conditions="Default.ScreenOnly" in the link to MadCap:conditions="Local.ActivateLinks". Then I created a Conditional Text of Local.ActivateLink. When I build I can set Local.ActivateLinks to "Exclude" and turn off the links.
On this occasion, I wanted to turn off the links for Screen output as well as Print output. I modified the MadCap:conditions="Default.ScreenOnly" in the link to MadCap:conditions="Local.ActivateLinks". Then I created a Conditional Text of Local.ActivateLink. When I build I can set Local.ActivateLinks to "Exclude" and turn off the links.
