Printing PDFs Server-side using Acrobat Reader from ASP.NET

Posted by Chris Roberts on Stack Overflow See other posts from Stack Overflow or by Chris Roberts
Published on 2010-04-15T00:05:29Z Indexed on 2010/04/15 0:13 UTC
Read the original article Hit count: 684

Filed under:
|
|
|

Hi,

I have been presented with a problem which requires me to print PDF files from a server as part of an ASP.NET web service.

The problem is further complicated by the fact that the PDF files I have to print can ONLY be printed using Adobe Reader (they were created using Adobe LiveCycle and have some strange protection in them).

This piece of code seems to do the trick in the Visual Studio development web server, but doesn't do anything when the site's running in IIS.

I'm assuming this is probably some sort of permissions issue!?

I know this is a FAR from ideal thing to be trying to do, but I haven't really got much choice! Any ideas would be greatly appreciated!

Dim starter As ProcessStartInfo
Dim Prc As Process

' Pass File Path And Arguments 
starter = New ProcessStartInfo("c:\program files\...\AcroRd32.exe", "/t ""test.pdf"" ""Printer""")
starter.CreateNoWindow = True
starter.RedirectStandardOutput = True
starter.UseShellExecute = False

' Start Adobe Process 
Prc = New Process()
Prc.StartInfo = starter
Prc.Start()

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about pdf