 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
Robert Conatser
Joined: 02 Feb 2000 Posts: 28
|
|
Acrobat Reader and DDE |
|
I'm running the follow script to print PDF using Adobe Acrobat Reader 4.06. The PDF prints and then I get the Error "DDE Error. Request denied". I'm running Windows NT 4 (SP5) and 24x7 version 1.6.3 Thanks --------------------------------- Dim rtn, boolean Dim Reader, string Dim channel, number SET Reader, "C:\\Program Files\\Adobe\\Acrobat 4.0\\Reader\\AcroRd32.exe" IsTaskRunning("AcroRd32.exe", rtn) If (rtn , PRINT_IT,RUN_IT) RUN_IT: RUN (Reader,"",rtn) PRINT_IT: DDEOpen("acroview","control", channel) DDEExecute(channel,"[FilePrintSilentEx(\"D:\\PDFTest\\PDF257.FDF\")]") DDEClose(channel)
|
|
Wed Feb 02, 2000 10:29 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
Re: Acrobat Reader and DDE |
|
Except from the Acrobat Reader documentation: FilePrintSilentEx is a special DDE command that returns true right away and does the action during idle time. This is to make sure that no DDE commands are dropped when printing a large number of files at once. Because this command is processed somehow later, such approach does not work well with the 24x7, which does a lot of various error checking for all sorsts of JAL statments. I suggest you should simply enable "ignoring errors" for this job. Also, instead of using DDE you can try running Acrobat with "/p" and "PDF file" command line parameters. "/p" tells Acrobat to print the file. : I'm running the follow script to print PDF using Adobe Acrobat Reader 4.06. : The PDF prints and then I get the Error "DDE Error. Request : denied". : I'm running Windows NT 4 (SP5) and 24x7 version 1.6.3 : Thanks : --------------------------------- : Dim rtn, boolean : Dim Reader, string : Dim channel, number : SET Reader, "C:\\Program Files\\Adobe\\Acrobat : 4.0\\Reader\\AcroRd32.exe" : IsTaskRunning("AcroRd32.exe", rtn) : If (rtn , PRINT_IT,RUN_IT) : RUN_IT: RUN (Reader,"",rtn) : PRINT_IT: DDEOpen("acroview","control", channel) : : DDEExecute(channel,"[FilePrintSilentEx(\"D:\\PDFTest\\PDF257.FDF\")]") : DDEClose(channel)
|
|
Wed Feb 02, 2000 12:35 pm |
|
 |
Robert Conatser
Joined: 02 Feb 2000 Posts: 28
|
|
Re: Acrobat Reader and DDE |
|
The FilePrintSilent command waits till the command is complete to return fails the same way. Why does 24x7 care what a program does after it returns from a DDE command? Ignoring the error does not solve the problem because there is still a lag time between the time the DDE command is sent till it returns. This is about 10 secs and greater increases the time it takes to print the PDFs. Also it causes the print to pause between printouts which adds additional time. I will try the "/p", but I would prefer to use the DDE commands. : Except from the Acrobat Reader documentation: FilePrintSilentEx is a special : DDE command that returns true right away and does the action during idle : time. This is to make sure that no DDE commands are : dropped when printing a large number of files at once. : Because this command is processed somehow later, such approach does not work : well with the 24x7, which does a lot of various error checking for all : sorsts of JAL statments. : I suggest you should simply enable "ignoring errors" for this job. : Also, instead of using DDE you can try running Acrobat with "/p" : and "PDF file" : command line parameters. "/p" tells Acrobat to print the file.
|
|
Wed Feb 02, 2000 5:25 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
Re: Acrobat Reader and DDE |
|
As we found out, it does not care what a program does after it returns from a DDE command, the problem is that the program does not return from a DDE command in time, causing a DDE timeout (24x7 defauls to 10 seconds). It appears to be a bug in Acrobat. Here is the alternative way to print a PDF file using Windows Shell functions Dim( winhandle, number ) Dim( rc, number ) WindowFind( "24x7%", winhandle ) Call("shell32.dll", "ShellExecuteA", "lSSlSll", True, & winhandle, "print", & "C:\WINNT\Profiles\dxe\Desktop\TransactSQL.pdf", & 0, "C:\WINNT\Profiles\dxe\Desktop", rc ) SendKeys("{ENTER}") : The FilePrintSilent command waits till the command is complete to return : fails the same way. Why does 24x7 care what a program does after it : returns from a DDE command? : Ignoring the error does not solve the problem because there is still a lag : time between the time the DDE command is sent till it returns. This is : about 10 secs and greater increases the time it takes to print the PDFs. : Also it causes the print to pause between printouts which adds additional : time. : I will try the "/p", but I would prefer to use the DDE commands.
|
|
Thu Feb 03, 2000 6:05 pm |
|
 |
Robert Conatser
Joined: 02 Feb 2000 Posts: 28
|
|
Re: Acrobat Reader and DDE |
|
I get the following message when I run the call to Shell32.dll: "An error occured while executing ShellExecuteA: Error 8 - Not enough storage is available to process this command." I'm running Win NT 4.0 (SP5) with 128MB of RAM. IF I reboot with nothing running, but 24x7 the script runs. : As we found out, it does not care what a program does after it : returns from a DDE command, the problem is that the program does not return : from a DDE command in time, causing a DDE timeout (24x7 defauls to 10 : seconds). It appears to be a bug in Acrobat. : Here is the alternative way to print a PDF file using Windows Shell functions : Dim( winhandle, number ) : Dim( rc, number ) : WindowFind( "24x7%", winhandle ) : Call("shell32.dll", "ShellExecuteA", "lSSlSll", : True, & : winhandle, "print", & : "C:\WINNT\Profiles\dxe\Desktop\TransactSQL.pdf", & : 0, "C:\WINNT\Profiles\dxe\Desktop", rc ) : SendKeys("{ENTER}")
|
|
Wed Feb 09, 2000 4:06 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
Re: Acrobat Reader and DDE |
|
Take a look at http://support.microsoft.com/support/kb/articles/Q126/4/01.asp : I get the following message when I run the call to Shell32.dll: "An : error occured while executing ShellExecuteA: Error 8 - Not enough storage : is available to process this command." : I'm running Win NT 4.0 (SP5) with 128MB of RAM. IF I reboot with nothing : running, but 24x7 the script runs.
|
|
Wed Feb 09, 2000 4:34 pm |
|
 |
Robert Conatser
Joined: 02 Feb 2000 Posts: 28
|
|
Re: Acrobat Reader and DDE |
|
I read over the article and checked the PagedPoolSize parameter and it was set to 0. According to Microsoft this problem was corrected in NT 3.51 and don't affect NT workstation. I'm running NT 4.0 workstation. Any other suggestions. thnaks. : Take a look at : http://support.microsoft.com/support/kb/articles/Q126/4/01.asp
|
|
Thu Feb 10, 2000 11:19 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
Re: Acrobat Reader and DDE |
|
This Shell command basically should do the same thing as a right-click on the icon then select "print" from the pop-up menu but apparantly it does not do that. I sent this issue to the MS tech.support and still waiting for their response. I also did a search on MS support site and here is the link you can use to get the same list of found results http://search.microsoft.com/us/Default.asp?so=RECCNT&qu=Not+Enough+Server+Storage+is+Available+to&boolean=PHRASE&intCat=0&intCat=1&intCat=2&intCat=3&intCat=4&intCat=5&intCat=6&intCat=7&intCat=8&intCat=9&p=1&nq=NEW : I read over the article and checked the PagedPoolSize parameter and it was : set to 0. According to Microsoft this problem was corrected in NT 3.51 and : don't affect NT workstation. I'm running NT 4.0 workstation. Any other : suggestions. : thnaks.
|
|
Thu Feb 10, 2000 1:56 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|