Forum How do I...?

How do I hide the url for web links

msleman
Here's my sample html
<a href="http://www.google.com">Visit Google</a>

PrinceXML outputs pdf with
Visit Google (http://www.google.com)

How do I take out the url from there. For example I want
Visit Google
only

I tried several css combinations
link, href, href: after, content
and nothing worked.

Using 8.0 beta on windows.
mikeday
This should not happen by default, are you applying any CSS style sheets?
srooks
It seemed to be happening by default for me (using 10?). Easy fix:
a:after {
content: '';
}

You can further add a class as a qualifier if greater flexibility is desired (e.g. .dont-show-link).
mikeday
Perhaps there is a style sheet in your document that adds this rule? It could be a print-specific style sheet, eg. within a @media print section, which is why it does not get applied in the browser.
schmudde
I ran into this today as well. It was because I use Bootstrap 3.x for my layout and the print.less includes this rule:

a[href]:after {
     content: " (" attr(href) ")";                                                                                                 
}


I updated
"(" attr(title) ")"
to read
""
and now it works as expected. Posted just in case anybody else runs into this!

/Schmudde