SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Acrobat Reader and DDE

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Acrobat Reader and DDE
Author Message
Robert Conatser



Joined: 02 Feb 2000
Posts: 28

Post Acrobat Reader and DDE Reply with quote

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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Re: Acrobat Reader and DDE Reply with quote

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 View user's profile Send private message
Robert Conatser



Joined: 02 Feb 2000
Posts: 28

Post Re: Acrobat Reader and DDE Reply with quote

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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Re: Acrobat Reader and DDE Reply with quote

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 View user's profile Send private message
Robert Conatser



Joined: 02 Feb 2000
Posts: 28

Post Re: Acrobat Reader and DDE Reply with quote

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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Re: Acrobat Reader and DDE Reply with quote

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 View user's profile Send private message
Robert Conatser



Joined: 02 Feb 2000
Posts: 28

Post Re: Acrobat Reader and DDE Reply with quote

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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Re: Acrobat Reader and DDE Reply with quote

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 View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.