Discussions related to Visual Prolog
Gela Chankvetadze
Posts: 7
Joined: 12 Dec 2006 16:01

Print HTML

Unread post by Gela Chankvetadze »

Hy,
Is posible print html document without print dialog?
User avatar
Tonton Luc
VIP Member
Posts: 204
Joined: 16 Oct 2001 23:01

Unread post by Tonton Luc »

Gela Chankvetadze
Posts: 7
Joined: 12 Dec 2006 16:01

Unread post 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?
Post Reply