Page 1 of 1

Print HTML

Posted: 10 Jan 2014 20:26
by Gela Chankvetadze
Hy,
Is posible print html document without print dialog?

Posted: 11 Jan 2014 16:40
by Tonton Luc

Posted: 23 Jan 2014 20:09
by Gela Chankvetadze
I faund solution in webbrowser control 7.2

Code: Select all

     print() :- % brower is the instance created in the customIE         IWebBrowser2_import = webBrowser_V1_ctl:get_IWebBrowser2_import(),         Dispatch = IWebBrowser2_import:get_Document(), % this interface gives access to the whole document loaded         _ = Dispatch:queryInterface(iOleCommandTarget_native::iid,  LpIn), % asks for the OLE interface         LpOleCommandTarget = uncheckedConvert(iOleCommandTarget_native,LpIn), % converts it from an unknown for VP         _ = LpOleCommandTarget:exec(uncheckedconvert(guid, null),6, 0, null,null),         _ =LpOleCommandTarget:release() % releases the interface     .
change sentece

Code: Select all

LpOleCommandTarget:exec(uncheckedconvert(guid, null),6, 0, null,null),

with

Code: Select all

        _ = LpOleCommandTarget:exec(uncheckedconvert(guid, null),6, 2, null,null),
but I have one prolblem: is posibe in webbrowser control set specified printer without printDialog?