Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Asp.Net Programming

PDF Viewer Control


Does anyone know of an ASP.net control that will allow viewing a pdf file?
Without streaming the file to the browser. I have to display a pdf without
the pdf being stored on the web server and also not have the user prompted
for a download.

Thanks in advance,
Rick

If the information is not sent to the browser how will it work ?

Your requirements make no sense.  If you can't send it to the browser, how
would you expect the viewer to see it.

The easiest option is to stick it in an iframe - but they can still chose to
set their browser to prompt for all files if thats what they want to have
happen.

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog

"Rick" <rfem@newsgroups.nospam> wrote in message

news:O%23mtTKtoHHA.4400@TK2MSFTNGP03.phx.gbl...

I was hoping to get a control that would sit on a web page and be able to
stream the pdf into the control. I know it has to display in a browser, but
streaming directly to the browser forces the download prompt.And I'm not
given the option from people higher up to make changes or force users to
make the changes on the client side.

"Rick" <rfem@newsgroups.nospam> wrote in message

news:O%23mtTKtoHHA.4400@TK2MSFTNGP03.phx.gbl...

If you download and install the adobe acrobat pdf viewer, you won't be
prompted whether to save or download a pdf file that was obtained by
clicking a link on the browser - the file will download and
automatically open in acrobat (this also holds true if the link was
initiated via javascript).

If you do have acrobat installed, but are still getting the download
prompt, then the .pdf file extension probably isn't associated with
acrobat on the windows OS you are using.  Re-installing acrobat should
fix this.

You can also stream files using XMLHTTP, however, this will also
require you to weaken security settings on your browser that would
enable ADODB.scritping and the scripting.filesystemobject active X
controls, opening you to internet attacks.

I don't think there is a native ASP.NET control that ships with visual
studio that allows you to view pdf files.

-----------------------------------------------Reply-----------------------------------------------

Hi Rick,

For viewing PDF document in web page, it totally depend on the PDF viewer
installed on client machine. So it is necessary to insure that the client
has installed the PDF viewer software(unless you're using activex control
for pdf viewing so that client need to download and install your activex
component). Also, for whether client will prompt for open dialog, it depend
on your client machine's explorer setting. You can configure it through the
following steps:

1. open windows explorer

2. Tools ---> folder options---> File Types

3. choose the "PDF" extension and in the "Advanced" setting, you can find
the "confirm open after download" checkbox option.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.asp...
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

-----------------------------------------------Reply-----------------------------------------------

Rick wrote:
> I was hoping to get a control that would sit on a web page and be able to
> stream the pdf into the control. I know it has to display in a browser, but
> streaming directly to the browser forces the download prompt.And I'm not
> given the option from people higher up to make changes or force users to
> make the changes on the client side.

If your problem is that you don't want the user to wait for the entire
file to download, then I have good news for you. The Adobe Reader
browser plugin has a feature that allows you to stream the PDF page by
page on demand. The users would only have to wait for the first page to
load, and they could start navigating right away. This requires that you
first optimize your PDF for the web, also known as linearization. Go to
pdfzone.com and see if you can find a command line tool that converts an
existing PDF file into a byte-servable linearized one. If you host that,
Adobe Reader will fetch it page by page as the user is scrolling. Once
again, this won't work unless you get a tool that linearizes the PDF
first, or save it that way from Acrobat.

Tom

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc