Solved

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

Posted on 2014-03-24
6
1,141 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

773 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