How to print pdf document.

Y

Yuriy

Hello! I need to print PDF Document by clicking a button
on .aspx page. The PDF should be printed on client printer
without displaing it on the window. I tried Process
namespace but it doesn't work.
Please, help! Thank you.
 
J

John Timney \(Microsoft MVP\)

You cant print directly to a clients printer from asp.net - printers belong
to client side, and asp.net is server side. All you could do is feed the
PDF to the browser and hope the user printed it. Can you imagine the chaos
if we could all issue print jobs to each others printers without them doing
anything.
--
Regards

John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
 
E

Esteban Felipe

John is right. you can not print using Asp.net... But here
comes javascript to the rescue :).. But I only know how to
ddo it with html pages. You still have to find out how to
aadecuate this to pdfs.

<script language="Javascript1.2">
<!--
function printpage() {
window.print();
}
//-->
</script>

Make a button or call this script directly from your page.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,325
Messages
2,571,702
Members
48,501
Latest member
BryceLopes

Latest Threads

Top