Solved

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

Posted on 2014-03-24
6
1,117 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 33

Expert Comment

by:paulmacd
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 74

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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

Author Comment

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

Expert Comment

by:paulmacd
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now