Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8827049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:17:21+00:00 2026-06-14T07:17:21+00:00

Background I have an ASP.NET web application with a VB.NET back end. In this

  • 0

Background
I have an ASP.NET web application with a VB.NET back end. In this application users can create payment requests which must be approved by a manager before they are sent to accounts payable for further processing. Within my request page (the page where the user enters the request information) I have a button that links to a separate .aspx page which provides a print preview of the request. When the request is approved by all of the required approvers, I have a VB.NET function that contains a WebBrowser object that navigates to the print preview page behind the scenes and takes a snap shot of it, then saves it as a .tiff file to an internal file share which is then picked up by a internal process and imported into another internal application called OnBase to go through processing for accounts payable.

The Problem
My problem is that when the my function takes the snap shot of the print preview page, the saved tiff has a lower resolution than desired. In other words, it looks kind of crappy when it is viewed through OnBase and when it is printed out.

The Question
How do I increase the resolution of the generated .tiff file at the time that the snapshot of the webpage is generated?

The Code

    Private Sub CaptureWebPage()
    Try
        Dim tiffFileName As String
        tiffFileName = OnBasePath & "CheckRequest_" & CurrentRequestId & ".tiff"

        Dim impersonateCode As New AliasAccount("TheUsername", "ThePassword")
        impersonateCode.BeginImpersonation()

        Dim browser As Windows.Forms.WebBrowser = New Windows.Forms.WebBrowser
        browser.ScrollBarsEnabled = False
        browser.ScriptErrorsSuppressed = True
        browser.Navigate(OnBasePath & htmlFileName)

        While browser.ReadyState <> Windows.Forms.WebBrowserReadyState.Complete
            System.Windows.Forms.Application.DoEvents()
        End While

        System.Threading.Thread.Sleep(1500)
        browser.ClientSize = New Size(950, 768)
        Dim Height As Integer = browser.Document.Body.ScrollRectangle.Bottom
        browser.ClientSize = New Size(950, Height)
        Dim bmp As Bitmap = New Bitmap(browser.Bounds.Width, Height)

        browser.DrawToBitmap(bmp, browser.Bounds)

        If File.Exists(tiffFileName) Then
            File.Delete(tiffFileName)
        End If

        If File.Exists(OnBasePath & htmlFileName) Then
            File.Delete(OnBasePath & htmlFileName)
        End If

        bmp.Save(tiffFileName.ToString(), ImageFormat.Tiff)
        bmp.Dispose()

        impersonateCode.EndImpersonation()

    Catch ex As Exception
        Throw
    End Try
End Sub

Additional Information
I have tried to use the .SetResolution method of my bitmap object, but it doesn’t actually change the resolution of the generated .tiff file. I have tried to Google this numerous times find a solution, but haven’t found anything useful.

Thanks In Advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T07:17:23+00:00Added an answer on June 14, 2026 at 7:17 am

    Screen “resolution” is much lower than print “resolution”. Typically desktop monitors are around 100ppi, where a normal printer on a desk might be 600dpi.

    The only suggestion I have for getting a higher resolution rendering of the web page would be configure what is grabbing the screenshot to use a resolution 3x what you are using now, and then set its zoom to 300%. Text elements and vector graphics will be rendered smoothly. Images will still be their web resolutions, and you may even lose image quality through interpolation when sizing up.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background : I currently have a Web Forms, ASP.NET 3.5/C# application which I'm interested
How can I run FxCop against an ASP.net Web-site? Background I have an ASP.net
I am Developing a web Application in ASP.NET 3.5. I have to create UI
I have an ASP.NET MVC 3 (.NET 4) web application. This app fetches data
I have simple web application (asp.net - ajax) I have a web form which
I have an ASP.NET web application, which operates just fine on IE7, IE8, IE8(Compatibility
Background We have an asp.net 4.0 web application written in C# that calls a
I have an Asp.Net background and trying to learn Silverlight. Can you explain, what
In my 3.5 .net web application I have a background thread that does a
First, a little background. I have two ASP.NET web applications that use SQLServer session

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.