Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open a link new tab with print command?

I have a hyperlink with contains third party website link. I want to open this link in new tab with print command. How can i do this? Suppose:

<a href="www.google.com" target="_blank">Print</a>

Note: I know how to open a link in new TAB/Window. I want to know how to open with PRINT DIALOG.

like image 213
Sandy Avatar asked Sep 05 '12 07:09

Sandy


People also ask

How do I get my link to open in a new tab?

Open in a new tab To open a link in a new tab, click the link by pressing down your middle mouse button, or right-click the link and select Open link in New Tab.

How do I open a link in a new tab without switching?

in mac: Cmd+click and in windows: ctrl+click will open new tabs in the background.

How do I make a link open in a new tab in Wordpress?

You can easily set external links to open in a new tab in WordPress. In the Classic Editor, just insert your link and click Link Options to open the advanced insert link popup. Then check the box labeled “Open link in a new tab.”

How do you get a link to open in a new tab with the value for the target attribute?

Use target="_blank" to Open Link in New Tab in HTML We can use the target attribute in the anchor tag to open a link in a new tab in HTML. The _blank value in the target attribute of the anchor tag opens the link in the new tab.


Video Answer


1 Answers

You could try something like this:

<a href="javascript: w=window.open('http://yoursite.com/LinkToThePDF.pdf'); w.print(); w.close(); ">​​​​​​​​​​​​​​​​​print pdf</a>
like image 167
Nikola Avatar answered Oct 07 '22 22:10

Nikola