Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / June 2007

Tip: Looking for answers? Try searching our database.

PDF Viewer Control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rick - 30 May 2007 16:52 GMT
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
Jon  Paal [MSMD] - 30 May 2007 17:28 GMT
If the information is not sent to the browser how will it work ?

> 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
John Timney (MVP) - 30 May 2007 18:38 GMT
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

> 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
[quoted text clipped - 3 lines]
> Thanks in advance,
> Rick
Rick - 30 May 2007 19:13 GMT
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.

> 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
[quoted text clipped - 3 lines]
> Thanks in advance,
> Rick
Andy - 30 May 2007 19:55 GMT
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.
Steven Cheng[MSFT] - 31 May 2007 04:51 GMT
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.aspx#notif
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.
Tamas Demjen - 01 Jun 2007 22:19 GMT
> 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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.