I'm invoking the navigator print function using a simple window.print(); call. It prints perfect (I want to print the same I see on the screen, so I don't really use a special CSS to print) but it showing the link locations next to the text link, something like:
Homepage (http://localhost)
To be clearer: I don't want to have the link locations near the links in the printed version, I have control over the CSS but I can't find this behaviour defined anywhere, so I think is a navigator-related issue!
EDIT: This happens under Firefox 3.6.8 and the last Chrome, on Ubuntu an Windows XP/Vista.
Just select the desired text on the current page and press CTRL+P. This will bring up the Print dialog, where you can simply select the "Selection" option there. This will print out only the selected text.
Selecting the Headers and footers would do exactly what you need to achieve - it will show the webpage URL in the footer (as well as some other data in the header and in the footer, as mentioned above). However, when printing a pdf file in Chrome, you only get two options: Fit to page & Two-Sided.
Try this: In Page Setup, have URL on the left in the Footer and have both Center and Right as Blank. That about as good as you're gonna get of a full URL. Try this: <br /> In Page Setup, have URL on the left in the Footer and have both Center and Right as Blank.
So to avoid additional print-out of link information in a printed web page, add the following rules to the @media print
section:
a:link:after, a:visited:after { content: ""; }
This will remove the ugly link information like Homepage (http://localhost)
and reduce it to Homepage
. You may of course add rules to avoid it only in the text section (or only in the navigation, but you shouldn't display navigation in the print-out format of your web page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With