the results of my experiments of my question http://www.purebasic.fr/english/viewtopic.php?t=31559 here, for everybody who want to use a PDF files in a PB program with PureDispHelper:
Code: Select all
; Begin-----------------------------------------------------------------
XIncludeFile "DispHelper_Include.pbi"
EnableExplicit
; Main----------------------------------------------------------------
Define oAcro.l
If OpenWindow(0, 0, 0, 640, 480, "Acrobat")
If CreateGadgetList(WindowID(0))
ContainerGadget(1, 10, 10, 620, 460, #PB_Container_Double)
dhInitializeImp()
oAcro = dhCreateObject("AcroPDF.PDF.1", GadgetID(1))
If oAcro
dhPutValue(oAcro, "src = %B", StringToBSTR("file://C:\\Dummy\\README-EN.pdf"))
dhCallMethod(oAcro, "setShowToolbar(%b)", #False)
dhCallMethod(oAcro, "setView(%B)", StringToBSTR("FitH"))
dhCallMethod(oAcro, "setPageMode(%B)", StringToBSTR("none"))
dhCallMethod(oAcro, "setLayoutMode(%B)", StringToBSTR("SinglePage"))
EndIf
EndIf
While WaitWindowEvent() <> #PB_Event_CloseWindow : Wend
If oAcro
dhReleaseObject(oAcro) : oAcro = 0
EndIf
CloseWindow(0)
EndIf
; End-------------------------------------------------------------------
End
http://www.adobe.com/devnet/acrobat/int ... ation.html.
The PureDispHelp you find here:
http://www.purearea.net/pb/showcase/show.php?id=413, great module

Cheers
Stefan