Results 1 to 4 of 4

Thread: Questions about interacting with printer/page setup when printing a webbrowser window

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2013
    Location
    Overland Park Kansas
    Posts
    183

    Questions about interacting with printer/page setup when printing a webbrowser window

    Currently we have people who are printing websites for item pricing on invoices. The item pricing and invoice information is only available on several different websites. I have an application that helps them get to the websites that are needed.

    We are taking these dozens of pieces of paper and hand writing a 15-20 digit invoice number on the upper left hand corner of each paper that's printed and a page number on the upper right of each piece of paper.

    I know that, when printing a website, you can go into the page setup and create a custom header with the invoice number before printing. Can anyone point me in a direction I could go to in order to find out how to change the page setup settings before I print the webbrowser?

    At the very least i would like to change the invoice part of the header to whatever invoice they are working on so when they print it they don't have to handwrite a 20 digit invoice number a dozen times for one invoice.
    Last edited by iamcpc; Nov 27th, 2013 at 02:16 PM.

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Jan 2013
    Location
    Overland Park Kansas
    Posts
    183

    Re: Questions about interacting with printer/page setup when printing a webbrowser wi

    I found this http://www.vbforums.com/showthread.p...-browser-print which helped the the document which are being printed directly off of the webbrowser. Some documents open in the webbrowser as PDF files and I can't add a header to them this way.

  3. #3
    Frenzied Member KGComputers's Avatar
    Join Date
    Dec 2005
    Location
    Cebu, PH
    Posts
    2,020

    Re: Questions about interacting with printer/page setup when printing a webbrowser wi

    I dont know if integrating iTextSharp to Webbrowser control would be possible.
    Such as reading pdf files and modifying the contents.
    CodeBank: VB.NET & C#.NET | ASP.NET
    Programming: C# | VB.NET
    Blogs: Personal | Programming
    Projects: GitHub | jsFiddle
    ___________________________________________________________________________________

    Rating someone's post is a way of saying Thanks...

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jan 2013
    Location
    Overland Park Kansas
    Posts
    183

    Re: Questions about interacting with printer/page setup when printing a webbrowser wi

    Now is it possible to intercept this print event so I can use the attached code to put the correct header

    Code:
    My.Computer.Registry.SetValue("HKEY_current_user\software\Microsoft\Internet Explorer\PageSetup", "header", branch & Strings.Left(invoice, 7) & Format(Now(), "MMddyyyy"))

    Each employee is putting the branch number, the left 7 digits of the invoice number and today's date on top of every website they print.

    The line of code i'm using to change the header so that if they print the website it will have the correct header. The thing is that if the employee prints a google website then the header needs to be branch, invoice, date, and google. Is there a way to intercept the printing of a IE window to change the header right before the website prints?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width