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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to automatically print a pdf from asp.net

Status
Not open for further replies.

jrenae

Programmer
Jan 18, 2006
142
US
Hello,

I'm trying let the user check off multiple pdf files to print from the browser. I have a VB6 app that was converted to VB.NET project which uses WinApi ShellExecute (we pass the path and the printer to the DLL). It works fine when calling the method from a VB.NET app, but when running from ASP/ASP.NET it won't launch the Acrobat reader (does not err either). It must have something do with ASPNET_wp not being able to launch it??? but I can't seem to get <Identity impersonation=true to work correctly on my local machine.

So, 2 questions:
1. Why can I launch acrobat and print from VB and VB.NET, but not from ASP and ASP.NET?

2. Is there a better way to print a pdf (without user interaction) that won't leave the reader window open (that's what happens when it's successful from VB)?

Any light on this subject is greatly appreciated.

Thanks much
 
>> Why can I launch acrobat and print from VB and VB.NET, but not from ASP and ASP.NET?

because VB / VB.NET runs on the client system, while ASP/ASP.NET runs on the server side. All the printing in ASP.NET will happen on the server side!


>>2. Is there a better way to print a pdf (without user interaction) that won't leave the reader window open (that's what happens when it's successful from VB)?

if u r looking to print it from the user's system then nope...

Known is handfull, Unknown is worldfull
 
>>because VB / VB.NET runs on the client system, while ASP/ASP.NET runs on the server side. All the printing in ASP.NET will happen on the server side!

I understand that, but I'm running asp/ASP.NET locally, so in theory, wouldn't the client system and the server both be my machine?


>>if u r looking to print it from the user's system then nope...

I'm looking for the user to have a list of available files (valid network paths) on an ASP.NET page, and then be able to check off which they want to print, pass in the path(s) and the printer, and have it print (without the acrobat reader window opening on the web server).

Thanks for your reply.
 
I understand that, but I'm running asp/ASP.NET locally, so in theory, wouldn't the client system and the server both be my machine?

Same machine yes, but it will run on the IIS server portion of the PC, not the client side browser.
 
if you want the user to see files listed on a server ..you will need to reference FSO. do a search on how to use FSO. once you get some code, post back here and someone will help you.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top