The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum. |
Need to speed up Word script |
Post Reply |
Author | |
scott ballinger
Newbie Joined: October 13 2005 Location: United States Status: Offline Points: 22 |
Post Options
Thanks(0)
Posted: August 29 2018 at 3:03pm |
I have a Universe site where I use the following Accuterm script to convert a DOCX file into a PDF using Word. The script is executed repeatedly against a list of DOCX files (sometimes thousands).
SCR = "" SCR<-1> = 'Set WordApp = CreateObject("Word.Application")' SCR<-1> = 'On Error Resume Next' ;* per PJS 05-30-18 SCR<-1> = 'WordApp.Documents.Open(FileName:="':DOS.PATH:DOCUMENT:'", ReadO nly:=True)' SCR<-1> = 'If Err Then Exit Sub' ;* per PJS 05-30-18 SCR<-1> = 'WordApp.ActiveDocument.ExportAsFixedFormat OutputFileName:="':D OS.PATH:DOC.PDF:'", ' SCR := 'ExportFormat:=17, OpenAfterExport:=False, OptimizeFor:=0, ' SCR := 'Range:=0, From:=1, To:=99, ' SCR := 'Item:=0, IncludeDocProps:=True, KeepIRM:=True, ' SCR := 'CreateBookmarks:=0, DocStructureTags:=True, ' SCR := 'BitmapMissingFonts:=True, UseISO19005_1:=True' SCR<-1> = 'WordApp.ActiveDocument.Close False' SCR<-1> = 'WordApp.Quit' SCR<-1> = 'Set WordApp = Nothing' SCR<-1> = 'Set WordDoc = Nothing' CONVERT @AM TO CHAR(25) IN SCR ;* EM character PRINT CHAR(27):CHAR(2):'P':SCR:CHAR(13): This works fine and is very reliable. However on my old Windows 7 PC it runs at about 2 seconds per document. On a new Windows 10 PC (that the client purchased explicitly to run this job) it runs much slower, about 6 seconds per document. (?) Both PCs are running Accuterm 7.2a. The faster Windows 7 PC is a DELL i7-4790 dual core CPU @ 3.60GHz with 8GB of RAM. The slower Windows 10 PC is an HP AMD PRO A12-9800 quad core CPU @ 3.80GHz with 16GB of RAM. Is it possible that the 3x performance difference is due to the different CPUs? You would think that the AMD is faster from the specs, but PassMark CPU benchmarks rate the Intel i7 at 9952 vs the AMD at 6199. Or is is possible that Windows 7 is just that much faster than Windows 10 when launching and running Word repeatedly? Any suggestions re: CPU for a new PC to host this application? Thanks, /Scott |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |