Re: New browser window

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Craig Deelsnyder (cdeelsny_at_NO_SPAM_4_MEyahoo.com)
Date: 07/23/04


Date: Fri, 23 Jul 2004 17:22:32 -0500

On 7/23/2004 5:14 PM, tma wrote:
> First, I'm following instructions without truly understanding them, so go
> easy on me... :)
>
> I am exporting a report to .PDF. Below is a code snippet. What I would like
> is for a new IE instance to be launched with the .pdf instead of the current
> IE window/aspx page. (My real problem is the window with which I am viewing
> the pdf does not go back to the page that launched the export but rather the
> page prior to it!) What do I need to change below to accomplish this?
>
>
> crReport.Export()
>
> Response.ClearContent()
>
> Response.ClearHeaders()
>
> Response.ContentType = "application/pdf"
>
> Response.WriteFile(Fname)
>
> Response.Flush()
>
> Response.Close()
>
>
> Thanks!
>
>
>
>
>
>

Looks like you have the pdf in a file at some point? And I assume you
are showing us part of a script, just before this you exported the
file....Just open a popup window via Javascript pointing at the url of
the PDF document:

http://www.codeguru.com/Csharp/.NET/net_asp/scripting/article.php/c5337/

if you are storing the file outside of the webserver, then you would
want to popup a window pointed at an aspx page containing just the logic
above.

Note you can alternatively just put a link to the pdf with
target="_blank" if this export/view is a 2step process instead of all at
once.

-- 
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET


Relevant Pages

  • Re: GS/GSView wont print
    ... and the printing process goes through normally to the point where the popup window starts displaying various messages from GS. ... I don't normal need printed files from PDF either. ...
    (comp.os.os2.apps)
  • Re: Out of Memory Exception
    ... I'm creating a PDF by exporting an ActiveReport. ... xPDF.Export(rpt.Document, pdfPath) ... Memory exception. ...
    (microsoft.public.dotnet.framework.adonet)
  • how to embed fonts whilst exporting doc to pdf in the code
    ... I have a VB.net code which exports the document to the pdf on the fly and send to the printer to print, however I am having problems in printing as the printer guy said that the fonts not being embedded into PDF I am exporting. ... However because I am doing this on the fly, I think I would have to incorporate distiller/word settings in the code. ... BASICS: ObjectDataSource Control ...
    (microsoft.public.powerpoint)
  • Re: Chopped up bitmaps in PDF files
    ... transformation which direct exporting to .pdf bypasses. ... InDesign and PDF created via distillation of PostScript output from ...
    (comp.publish.prepress)
  • Re: Export Dlls required?
    ... These are the DLL's needed for exporting to PDF. ... distributed report nothing at all happens! ... You need the merge module for client run time files. ...
    (microsoft.public.vb.crystal)