Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JS Open print dialog page to print a file

Status
Not open for further replies.

penguinspeaks

Technical User
Nov 13, 2002
234
US
Greetings:

I need to print a pdf file. The file names are listed from a database loop that contains the filenames within a folder. I have a script that can directly send to the printer, but I want to open the dialogue page instead. Depending on the file, I may only want certain pages printed.

Code:
<button type="button" onclick="printJS({printable:'NEWPDF/<%=VAR2%>.pdf', type:'pdf', showModal:true})">
   PRINT PDF </button>
Code:
<script src="[URL unfurl="true"]https://printjs-4de6.kxcdn.com/print.min.js"></script>[/URL]
<script src="[URL unfurl="true"]https://printjs-4de6.kxcdn.com/print.min.css"></script>[/URL]

This direct prints. How do I open the dialogue??

Thanks,
Penguin
Please keep in mind that I am using classic ASP with MySQL database. Not sure if that information helps or not.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top