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

David Emerson newsgrps at dalyn.co.nz
Thu Dec 6 14:29:28 CST 2007


Joe,

The PDF is one of a number of reports that are shown dynamically on 
the screen based on table records.  The user clicks on check boxes to 
select the reports they want to run, then the code processes the 
check boxes and opens the appropriate reports/files etc.  Therefore 
hardcoding the href isn't an option in this case.

Thanks for your reply though.

David

At 7/12/2007, you wrote:
>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
>
>
>_______________________________________________
>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