Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1262
  • Last Modified:

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

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
Murray Brown
Asked:
Murray Brown
  • 3
  • 2
1 Solution
 
Paul MacDonaldDirector, Information SystemsCommented:
Are you sure this happens to everyone, or just you?
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Good question. Can only speak for myself :)
0
 
käµfm³d 👽Commented:
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
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
1
Thanks kaufmed but I get this error
0
 
Paul MacDonaldDirector, Information SystemsCommented:
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
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now