Fabry Posted August 21, 2009 Share Posted August 21, 2009 Hi, I am writting a program to show and print the bulletin of Lotto and SuperEnalotto. I have made a html page whith IE UDF and now I want to print. I export the html page in html file and use _PrintFile() Func _PrintFile($filetoprint) RunWait(@ComSpec & ' /c rundll32.exe ' & @SystemDir & '\mshtml.dll,PrintHTML "' & $filetoprint, @TempDir, @SW_HIDE) EndFunc ;==>_PrintFile Using this function, it prints headers and footings (number of page, URL, date and Time) and the print area is reduced. How can I change margins? And how can I delete headers? With print preview You can do this things, I know, but I want to be done in comand line. A lan chat (Multilanguage)LanMuleFile transferTank gameTank 2 an online game[center]L'esperienza è il nome che tutti danno ai propri errori.Experience is the name everyone gives to their mistakes.Oscar Wilde[/center] Link to comment Share on other sites More sharing options...
Manjish Posted August 21, 2009 Share Posted August 21, 2009 (edited) Hi Why don't u use the print udf to print ur file.. That will definately solve all ur problems Search this forum to find it!! Edited August 21, 2009 by Manjish [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com Link to comment Share on other sites More sharing options...
Fabry Posted August 21, 2009 Author Share Posted August 21, 2009 You intend this UDF.I have already an html with a table in. How can I write this table with that udf? A lan chat (Multilanguage)LanMuleFile transferTank gameTank 2 an online game[center]L'esperienza è il nome che tutti danno ai propri errori.Experience is the name everyone gives to their mistakes.Oscar Wilde[/center] Link to comment Share on other sites More sharing options...
ResNullius Posted August 22, 2009 Share Posted August 22, 2009 How can I change margins? And how can I delete headers?With print preview You can do this things, I know, but I want to be done in comand line.Have a look at the registry key: HKCU\Software\Microsoft\Internet Explorer\PageSetupBest approach is to read and store the old values, write the new ones, invoke the print function, and then restore the old values.If you invoke printing with something like $oIE.document.parentwindow.Print(), then you can reset the values immediately after that call; your custom values will be used for that instance of the print dialogue.I wrote myself a UDF for this, but it's not really fit for public consumption at this time. Link to comment Share on other sites More sharing options...
Fabry Posted August 22, 2009 Author Share Posted August 22, 2009 Have a look at the registry key: HKCU\Software\Microsoft\Internet Explorer\PageSetupBest approach is to read and store the old values, write the new ones, invoke the print function, and then restore the old values.I understand this.If you invoke printing with something like $oIE.document.parentwindow.Print(), then you can reset the values immediately after that call; your custom values will be used for that instance of the print dialogue.Instead, how can I reset the values? Using the registry key?Thanks a lot, I will use the first solution. A lan chat (Multilanguage)LanMuleFile transferTank gameTank 2 an online game[center]L'esperienza è il nome che tutti danno ai propri errori.Experience is the name everyone gives to their mistakes.Oscar Wilde[/center] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now