Re: Display PDF in GUI

"valery_vi" <[email protected]>
Newsgroups gmane.comp.windows.autoit.user
Message-ID <[email protected]>
gadzail wrote PDF viewer:
http://www.autoitscript.com/forum/index.php?showtopic=42631

I like it. 

Maybe this one would be easy (to learn?):

#include <GUIConstants.au3>

;Declare objects
$oPDF = ObjCreate("AcroPDF.PDF.1")
if not IsObj($oPDF) then exit
;Main Gui
GuiCreate("PDF Object", 800, 600,(@DesktopWidth-802)/2, 
(@DesktopHeight-590)/2, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + 
$WS_CLIPSIBLINGS)
$GUI_ActiveX = GUICtrlCreateObj ($oPDF, 10, 10, 780, 580)
GUICtrlSetStyle ($GUI_ActiveX,  $WS_VISIBLE)
GUICtrlSetResizing ($GUI_ActiveX,$GUI_DOCKAUTO)
$File = FileOpenDialog( "Choose a PDF", @ScriptDir, "PDF file 
(*.pdf)", 1)
if $File = '' then exit
$oPDF.src = $File
GuiSetState(@SW_SHOW)    
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    EndSelect
WEnd
$oPDF = ""
$GUIActiveX = ""
Exit

Valery
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.