1

I have a website, but I need a button which I want to print a specific .pdf file from my webpage database. As an example, this site has a print button, which gives you option to print some pdf files

Any idea how can I do that?

I've tried this one, but it's not working:

<a href="../Documents/ScrittoGraffito/Scritto_Customers/Nicolaides_Optical/Nicolaides_webpage/Shop1_Banner.pdf" 
   onclick="window.print()"/><p class="test">link</p></a>
Adrian Wragg
  • 7,311
  • 3
  • 26
  • 50
user1900665
  • 11
  • 1
  • 3

1 Answers1

0

That code will tell the browser to open the print dialog for the current page.

If you want to force the browser to print the linked pdf then that is not possible, as it will be completely controlled by the application or plugin that handles pdf documents.

EDIT;

Apparently it is possible, but you have to make use of a pdf toolkit.

Community
  • 1
  • 1
Jivings
  • 22,834
  • 6
  • 60
  • 101