ptrex Posted July 12, 2008 Posted July 12, 2008 (edited) PDF Reader in AU3During my time around here. I've seen a lot of people strugling to get a PDF file properly opened in AU3.Well the obvious thing to do is to use the Acrobat Reader. But unfortunately, like a lot a AU3 users posted, it's not possible.Unless you embed the reader in an IE object or use the Acrobat Writer (payed version) objects.Well if you can't use the real thing, you will have to try your luck somewhere else !!Therefor I use Foxit Reader (which is smaller, faster and if you ask me better than the real thing).What you need it to download the ActiveX Control.Foxit Reader ActiveX V2.3Some secret to you all.If you this version it has a disadvantage that is will show a label when opening the reader.That you can only use it for Evaluation purposes. This label is also printed on each page Here comes the solution.Download the older version V1.0, if you need to print a lot.And don't forget to register it !!It shows the label when reading, but not when printing. muttleyFoxit Reader ActiveX V1.0What can we say more then,Enjoy !!Foxit_Reader.au3Regards,ptrex Edited September 14, 2012 by ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
ReFran Posted July 12, 2008 Posted July 12, 2008 (edited) ".......But unfortunately, like a lot a AU3 users posted, it's not possible. Unless you embed the reader in an IE object or use the Acrobat Writer (payed version) objects." Mmmmh, I have no problem with that. The only problem is that Adobe not only changed the name (to Adobe Reader) but also the active X, starting with version 7. The newer is documented in SDK. However its always good to have an alternative, especially with a much smaller program. Thanks for that, Reinhard PS: Have a look at the eXpert PDF Reader, the only free reader which can write bookmarks. Edited July 12, 2008 by ReFran
ptrex Posted July 13, 2008 Author Posted July 13, 2008 @RefranI have no problem with that. The only problem is that Adobe not only changed the name (to Adobe Reader) but also the active X, starting with version 7.The newer is documented in SDK.Thanks for the feefback.But it would be nicer to post some examples as well.Regards,ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
ReFran Posted July 13, 2008 Posted July 13, 2008 ............. But it would be nicer to post some examples as well.No problem. I just saw i note it as an example from you (Is that correct?). For me it works.Here a link to further discusssion: http://www.autoitscript.com/forum/index.ph...=42631&st=0Here the link to the Adobe SDK (Developing with Reader): http://www.adobe.com/devnet/acrobat/pdfs/reader_overview.pdfBest regards, Reinhard; Author: ptrex; AutoIt Version: 3.1.1.103; Description: Very Simple example: Embedding Acrobat PDF object; Needs: Acrobat Reader to be installed; Date: 25 jan 2006#include <GUIConstants.au3>#NoTrayIcon;VarsDim $oMyErrorDim $FileDim $Version$File="C:\Test.pdf";Declare objects$oPDF = ObjCreate("AcroPDF.PDF.1");;Main GuiGuiCreate("PDF Object", 802, 590,(@DesktopWidth-802)/2, (@DesktopHeight-590)/2 ) $oPDF.src=("C:\Test.pdf") ;should be used rather then .LoadFile$GUI_ActiveX = GUICtrlCreateObj ($oPDF, 10, 10 , 780 , 550)GUICtrlSetStyle ( $GUI_ActiveX, $WS_VISIBLE )GUICtrlSetResizing ($GUI_ActiveX,$GUI_DOCKAUTO) ; Auto Resize Object GuiSetState()While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelectWEnd$oPDF = ""$GUIActiveX = ""Exit
ptrex Posted July 13, 2008 Author Posted July 13, 2008 @Refran I all forgot about this one. Indead I did post it long time ago. I seem to reinvent myself at some times ? muttley Anyhow the Foxit Reader is a good alternative though. Regards, ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
enaiman Posted September 9, 2008 Posted September 9, 2008 Thanks for sharing this ptrex I've downloaded Foxit and started to play with. I've used your example and I tried to open a file - no matter what I tried I got always the same message: The requested action with this object has failed.: $PDFViewer.OpenFile(@ScriptDir&"100189.pdf", "") $PDFViewer.OpenFile(@ScriptDir&"100189.pdf", "")^ ERROR Here is the script: #include<GUIConstantsEx.au3> #include<WindowsConstants.au3> Dim $objApp $PDFViewer = ObjCreate("Foxit.FoxitReaderSDKCtrl.1") If Not IsObj($PDFViewer) Then $PDFViewer = ObjCreate("Foxit.FoxitReaderSDKCtrl.2") If Not IsObj($PDFViewer) Then Exit EndIf EndIf ; Create GUI $Gui = GUICreate ( "Foxit PDF Reader", 830, 580,(@DesktopWidth-830)/2, (@DesktopHeight-580)/2 , _ Bitor($WS_OVERLAPPEDWINDOW ,$WS_VISIBLE , $WS_CLIPSIBLINGS)) ;Creates an ActiveX control in the GUI. $GUIActiveX = GUICtrlCreateObj ( $PDFViewer, -1, -1, @DesktopWidth, @DesktopHeight) GUICtrlSetResizing ( $GUIActiveX, $GUI_DOCKAUTO) ; Show GUI GUISetState () $PDFViewer.OpenFile(@ScriptDir&"100189.pdf", "") While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend GUIDelete() I know that I'm doing something wrong but I can't figure what. Can you help me please? Thanks. SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :)
ptrex Posted September 9, 2008 Author Posted September 9, 2008 @enaimanI noticed this too ?Maybe there is a bug in the Foxitreader COM object or either AU3 does not handle this method correct ?As you can see it should work in VB6FoxitReader OpenFIleregards,ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
Moderators SmOke_N Posted September 9, 2008 Moderators Posted September 9, 2008 I would imagine:$PDFViewer.OpenFile(@ScriptDir&"100189.pdf", "")To be:$PDFViewer.OpenFile(@ScriptDir&"\100189.pdf", "") Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
ptrex Posted September 9, 2008 Author Posted September 9, 2008 @SmOke_N I tried with the full path in there, but no go. Thanks Regards ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
enaiman Posted September 9, 2008 Posted September 9, 2008 Thank you very much, I thought I've been using the OpenFile in a wrong way (I'm only a novice regarding to COM objects), indeed it looks like the usage was correct. I'll have a look at other pdf COM. Basically I'm interested in finding a text string within a pdf file and to display the page where it is found. @SmOke_N - thank you for noticing that; it might have been a common mistake but I had my script located on the root of my C drive and I've tried both with or without "\" with the same result (I even put a FileExists statement before attempting to open the file). Any idea about what can I use to continue my project? Thank you, SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :)
davidkim Posted December 13, 2010 Posted December 13, 2010 ptrex See the notice water which is linked.There is question to about foxit.It requests a help.When to help it will thankPlease. ptrex I interest am many quite in AutoitScript.From that is [http://cafe.naver.com/autoitscript[/color]] Korea of cafe(blog) to be operating, [size="2"][color="#ff00ff"]English cannot well[/size].Many help it requests.To read, it stands it thanks.
ptrex Posted December 13, 2010 Author Posted December 13, 2010 @davidkim1 st you have to register (maybe pay) to use the COM object at Foxit website.2 workaround, read my first post carefully.Here comes the solution.Some secret to you all. If you this version it has a disadvantage that is will show a label when opening the reader. That you can only use it for Evaluation purposes. This label is also printed on each page Here comes the solution.Download the older version V1.0, if you need to print a lot. Rgdsptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
davidkim Posted December 13, 2010 Posted December 13, 2010 (edited) @ptrex@davidkim1 st you have to register (maybe pay) to use the COM object at Foxit website.2 workaround, read my first post carefully.Here comes the solution.Some secret to you all. If you this version it has a disadvantage that is will show a label when opening the reader. That you can only use it for Evaluation purposes. This label is also printed on each page Here comes the solution.Download the older version V1.0, if you need to print a lot. RgdsptrexHere comes the solution.Download the older version V1.0, if you need to print a lot. |-------------> It informs a download address and it requestsTo reply, it thanksIt will be able to provide the annual festival which relates maybe in Foxit_PDF_SDK_DLL20.1021_enu(DLL) uses (DLL Call Sample Code)When the program is completed, it buys the choice goods. ocx or DLL...... Edited December 13, 2010 by davidkim I interest am many quite in AutoitScript.From that is [http://cafe.naver.com/autoitscript[/color]] Korea of cafe(blog) to be operating, [size="2"][color="#ff00ff"]English cannot well[/size].Many help it requests.To read, it stands it thanks.
davidkim Posted December 13, 2010 Posted December 13, 2010 @ptrexAutoitscript studies the cold region 5 years is.If under it is easy it stands and, in detail it sees it is difficult too a structure,English also it does not know in addition well.You and annoyingly it is sorry.Frequently question it becomes the chart in about this problem.The grammar does not hit well not to be, as well it is sorry. I interest am many quite in AutoitScript.From that is [http://cafe.naver.com/autoitscript[/color]] Korea of cafe(blog) to be operating, [size="2"][color="#ff00ff"]English cannot well[/size].Many help it requests.To read, it stands it thanks.
ptrex Posted December 13, 2010 Author Posted December 13, 2010 @davidkim Sorry me not understand ! rgds ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
trancexx Posted December 13, 2010 Posted December 13, 2010 @davidkimSorry me not understand !rgdsptrexdavidkim said that your sorry ass is annoying....I don't know but I think he doesn't like you. ♡♡♡ . eMyvnE
davidkim Posted December 13, 2010 Posted December 13, 2010 (edited) To ptrex and trancexx.trancexx and me will be wrong and they like, to have an interest, it stands they thank.It is basic, the answer which is sincerity in question grudge only.I cannot English well.I am serious, It wants a reply in within question the before.Please, reply it wishes in within question. ptrex, trancexx I respect two people. Edited December 13, 2010 by davidkim I interest am many quite in AutoitScript.From that is [http://cafe.naver.com/autoitscript[/color]] Korea of cafe(blog) to be operating, [size="2"][color="#ff00ff"]English cannot well[/size].Many help it requests.To read, it stands it thanks.
UEZ Posted December 13, 2010 Posted December 13, 2010 Try Google Translator Br,UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
davidkim Posted December 13, 2010 Posted December 13, 2010 @UEZ I sent the question which relates in ActiveX. The Google search already. Must search with what? Thanks UEZ I interest am many quite in AutoitScript.From that is [http://cafe.naver.com/autoitscript[/color]] Korea of cafe(blog) to be operating, [size="2"][color="#ff00ff"]English cannot well[/size].Many help it requests.To read, it stands it thanks.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now