• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1237
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

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