-
Nov 27th, 2013, 02:13 PM
#1
Thread Starter
Addicted Member
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.
-
Nov 27th, 2013, 03:34 PM
#2
Thread Starter
Addicted Member
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.
-
Nov 28th, 2013, 01:18 AM
#3
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.
-
Dec 4th, 2013, 02:29 PM
#4
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|