[dba-VB] Launch and monitor external programs from .NET

Joe O'Connell joeo at appoli.com
Thu Dec 6 13:19:08 CST 2007


David,

I have not followed this thread, so your question may have already been
answered.

If you want to open a pdf in the user's browser, couldn't the pdf just
be the href? <a href="path/name.pdf" target="_blank">Open PDF</a>

If the user left clicks, the pdf should open in a new browser window.
If the user right clicks, a box will open allowing the user to save the
pdf on their local disk drive.

Joe O'Connell

-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of David Emerson
Sent: Thursday, December 06, 2007 1:56 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Launch and monitor external programs from .NET

Thanks Robert.  This looks like it open the pdf in a browser 
window.  Am I correct?  I am wanting the box to appear giving the 
user the option of opening it or saving the file.

David

At 7/12/2007, you wrote:
>David,
>
>Here is what I use:
>
><asp:HyperLink ID="HyperLink1"
>         runat="server"
>         NavigateUrl="Documents/Interest_Skills_Survey.PDF"
>         Text="Interest and skills assesment survey."
>         Target="_blank">
>         Interest and skills assesment survey.
></asp:HyperLink>
>
>As far as I know, Adobe Reader is not installed on the server.
>
>Robert
>
>At 12:00 PM 12/6/2007, you wrote:
>>Date: Thu, 06 Dec 2007 13:48:36 +1300
>>From: David Emerson <newsgrps at dalyn.co.nz>
>>Subject: Re: [dba-VB] Launch and monitor external programs from .NET
>>         (was: Open PDF file)
>>To: dba-vb at databaseadvisors.com
>>Message-ID:
>>         <20071206004538.RHEB9910.fep05.xtra.co.nz at Dalyn.dalyn.co.nz>
>>Content-Type: text/plain; charset="us-ascii"; format=flowed
>>
>>I included Gustav's code in my web application as below:
>>
>>Dim runPdf As New System.Diagnostics.Process
>>runPdf.StartInfo.FileName = HttpContext.Current.Server.MapPath("") +
>>"\PDFFiles\" + strReportFile + ".pdf"
>>runPdf.StartInfo.WindowStyle = ProcessWindowStyle.Normal
>>runPdf.Start()
>>
>>However, when it is run by a user I get the following error: No
>>application is associated with the specified file for this
>>operation.  It seems to be wanting to open the file on the server.
>>
>>Do I need to install Adobe Acrobat on the server?  I would have
>>thought that it would use the local machines copy.
>>
>>David

_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com





More information about the dba-VB mailing list