Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

ASP.net VB.net open pdf in new browser at 100%

Posted on 2014-03-24
6
1,151 Views
Last Modified: 2014-03-27
Hi
I am using the following code to open a pdf file in a new browser
It opens at 143%
How do  get it to rather open at 100%

 Try
            Response.Clear()
            Dim filePath As String = "~/Resources/GREAT.pdf"
            Response.ContentType = "application/pdf"
            Response.WriteFile(filePath)
        Catch ex As Exception
            Response.Write(ex.Message)
        End Try

Open in new window

0
Comment
Question by:murbro
  • 3
  • 2
6 Comments
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 39950409
Are you sure this happens to everyone, or just you?
0
 

Author Comment

by:murbro
ID: 39950434
Good question. Can only speak for myself :)
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 39950449
Going by the documentation, it looks you should be able to use the parameter zoom. Try appending that to your URL:

e.g.

Dim filePath As String = "~/Resources/GREAT.pdf#zoom=100"

Open in new window

0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

Author Comment

by:murbro
ID: 39950630
1
Thanks kaufmed but I get this error
0
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 39950661
It may just be the way you have your PDF viewer configured, and not a problem with the file itself at all.  I'd look into it.
0
 

Author Closing Comment

by:murbro
ID: 39959639
thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question