Display PDF into a WindowTag(s): WinAPI/Registry


Insert the "Adobe Acrobat ActiveX control" OLE control on the window.

Then to load a document from Powerscript

ole_1.object.LoadFile("C:\realhowto-pdf")

With a tool to explore the pdf.ocx, there are more functions :

function LoadFile(none fileName: WideString): WordBool [dispid $00000002]; stdcall;
procedure setShowToolbar(none On: WordBool) [dispid $00000003]; stdcall;
procedure gotoFirstPage [dispid $00000004]; stdcall;
procedure gotoLastPage [dispid $00000005]; stdcall;
procedure gotoNextPage [dispid $00000006]; stdcall;
procedure gotoPreviousPage [dispid $00000007]; stdcall;
procedure setCurrentPage(none n: Integer) [dispid $00000008]; stdcall;
procedure goForwardStack [dispid $00000009]; stdcall;
procedure goBackwardStack [dispid $0000000A]; stdcall;
procedure setPageMode(none pageMode: WideString) [dispid $0000000B]; stdcall;
procedure setLayoutMode(none layoutMode: WideString) [dispid $0000000C]; stdcall;
procedure setNamedDest(none namedDest: WideString) [dispid $0000000D]; stdcall;
procedure Print [dispid $0000000E]; stdcall;
procedure printWithDialog [dispid $0000000F]; stdcall;
procedure setZoom(none percent: Single) [dispid $00000010]; stdcall;
procedure setZoomScroll(none percent, left, top: Single) [dispid $00000011]; stdcall;
procedure setView(none viewMode: WideString) [dispid $00000012]; stdcall;
procedure setViewScroll(none viewMode: WideString; none offset: Single) [dispid $00000013]; stdcall;
procedure setViewRect(none left, top, width, height: Single) [dispid $00000014]; stdcall;
procedure printPages(none from, to: Integer) [dispid $00000015]; stdcall;
procedure printPagesFit(none from, to: Integer; none shrinkToFit: WordBool) [dispid $00000016]; stdcall;
procedure printAll [dispid $00000017]; stdcall;
procedure printAllFit(none shrinkToFit: WordBool) [dispid $00000018]; stdcall;
procedure setShowScrollbars(none On: WordBool) [dispid $00000019]; stdcall;
procedure AboutBox [dispid $FFFFFDD8]; stdcall;
But there is no documentation about them. You can download a free SDK (you need to register) but I believe that you need the Acrobat package to fully use it.

http://partners.adobe.com/asn/acrobat/download.jsp#fullinstall


blog comments powered by Disqus