Community Forum

How do I print an HTML document with ScriptX without first displaying it?

Profile Image 2 Posts 2 Karma
CanamSupport posted this 12 December 2012

I'm currently using ScriptX 6.2.433.9 to print and print/preview an html document in my VB6 app using the IE8 WebBrowser control. It works just great. Now I wish to print the html document without displaying it first and I'm having problems. Would you happen to have a code example on how to do this?

P.S. I tried to upgrade to 7.0.0.8 and the base printing started to act up. Each page would start printing 2 lines lower than the previous page until it started to over flow. My 3 page html document ended up on 4 pages. Are there code changes that I need to do to have 7.0.0.8 work exactly like 6.2.433.9.

Thanks, Tom

 

Profile Image 189 Posts 189 Karma
Jerry posted this 13 December 2012

Hi Tom

 

7.0.0.8 is a LOT more compatible with IE8 than  that really old / obsolete version you have deployed, so you need to review what you're doing with ScriptX to troubleshoot the changes you're seeing.

 

ScriptX leverages IE/WebBrowser's printing engine, so start the test *without* ScriptX just to ensure this isn't a browser update artifact.

 

PrintHTML(url) prints the target document at 'url' without having to render it in the browser ... but it's a licensed call, and not available to you if yours is 'free' use of ScriptX.

 

I hope that this helps.

 

Jerry