I have been having a persistent error when using the DCPRINT ON command with the ACROBAT clause to generate several pdf files consecutively. The most common error is "Error Base/2266 Receiver of message is not an object:Atsay". I have also got on some occasions "Error copying document to destination file". I have created a small program to simulate what is happening in my application and have discovered that the error condition seems to have something to do with the rate at which the files are being generated. I have used the SLEEP(100) command in the demo program to overcome this error but have not been successful when applying this approach in the actual application.
Additionally, the file is still generated in spite of the error when BREAKing out of the error message. You will notice too in the sample that without the SLEEP command, some files may be skipped without generating an error. In short the results are variable.
Is there something happening behind the scenes which may be responsible for this strange behaviour?
S Lorde
Strange error creating PDF files
Strange error creating PDF files
- Attachments
-
- Demo.zip
- (1.51 KiB) Downloaded 796 times
Re: Strange error creating PDF files
I've had to put a sleep in at certain points in our software when creating pdf files. in our case, we tested for the existence of the filename in a do while !fexists() before continuing.
xbase++ is probably going faster than the filesystem..
xbase++ is probably going faster than the filesystem..
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Re: Strange error creating PDF files
I am using a similar approach - trying to slow down the generation of the pdf and testing for its existence before continuing but the 'Receiver of message is not an object:AtSay' error occurs almost immediately after the DCPRINT ON command while a simple @ row, col DCPRINT SAY line is being executed. I was wondering if there is another way to force the writing of pdf file apart from using DCPRINT OFF PRINTER oPrinter.
What makes this problem particularly difficult to track down is its inconsistency. The error does not occur with the creation of each file and the file is generated in spite of the error. Is it possible that it is a synchronisation problem between Xbase and the Bullzip driver?
S Lorde
What makes this problem particularly difficult to track down is its inconsistency. The error does not occur with the creation of each file and the file is generated in spite of the error. Is it possible that it is a synchronisation problem between Xbase and the Bullzip driver?
S Lorde
Re: Strange error creating PDF files
Have you tried putting a Sleep(100) in your code after the DCPRINT ON command?
The eXpress train is coming - and it has more cars.
Re: Strange error creating PDF files
hi,
what ACROBAT Version are you using ?
there are some Version ( e.g. 9.3 / 10 ) which does not work correct with OCX.
if you are using lates "Adobe Reader XI (11.0)" try Alaska Demo Sample if it run before run Express++
what ACROBAT Version are you using ?
there are some Version ( e.g. 9.3 / 10 ) which does not work correct with OCX.
if you are using lates "Adobe Reader XI (11.0)" try Alaska Demo Sample if it run before run Express++
greetings by OHR
Jimmy
Jimmy
Re: Strange error creating PDF files
I don't think the problem is with the version of acrobat.. If you re-read the original message, the problem occurs when several pdfs are generated consecutively. there is no problem with individual pdf's..Auge_Ohr wrote:hi,
what ACROBAT Version are you using ?
there are some Version ( e.g. 9.3 / 10 ) which does not work correct with OCX.
if you are using lates "Adobe Reader XI (11.0)" try Alaska Demo Sample if it run before run Express++
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises
Re: Strange error creating PDF files
Roger,
I have placed the SLEEP(100) after the DCPRINT ON. I have also tried it at other points and have also increased the sleep time. The results are pretty much the same. It generates about three files and then produces the aforementioned error. I do not think it has anything to do with the version of acrobat. When a single file is required it creates it without error. The issue surrounds the generation of several files consecutively.
S Lorde
I have placed the SLEEP(100) after the DCPRINT ON. I have also tried it at other points and have also increased the sleep time. The results are pretty much the same. It generates about three files and then produces the aforementioned error. I do not think it has anything to do with the version of acrobat. When a single file is required it creates it without error. The issue surrounds the generation of several files consecutively.
S Lorde
Re: Strange error creating PDF files
Hi,
Put a sleep(100) or higher between each document or after each dcprint OFF.
It's just a timing issue. Xbase is sending too fast to the printer driver. I you would printing 10 different Word document to the driver in a few seconds, it would also have the same problem.
Put a sleep(100) or higher between each document or after each dcprint OFF.
It's just a timing issue. Xbase is sending too fast to the printer driver. I you would printing 10 different Word document to the driver in a few seconds, it would also have the same problem.