Strange error creating PDF files

This forum is for eXpress++ general support.
Post Reply
Message
Author
sstone
Posts: 17
Joined: Tue May 25, 2010 7:57 pm

Strange error creating PDF files

#1 Post by sstone »

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
Attachments
Demo.zip
(1.51 KiB) Downloaded 795 times

bwolfsohn
Posts: 649
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Strange error creating PDF files

#2 Post by bwolfsohn »

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..
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

sstone
Posts: 17
Joined: Tue May 25, 2010 7:57 pm

Re: Strange error creating PDF files

#3 Post by sstone »

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

User avatar
rdonnay
Site Admin
Posts: 4775
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Strange error creating PDF files

#4 Post by rdonnay »

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.

User avatar
Auge_Ohr
Posts: 1422
Joined: Wed Feb 24, 2010 3:44 pm

Re: Strange error creating PDF files

#5 Post by Auge_Ohr »

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++
greetings by OHR
Jimmy

bwolfsohn
Posts: 649
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Strange error creating PDF files

#6 Post by bwolfsohn »

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++
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..
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

sstone
Posts: 17
Joined: Tue May 25, 2010 7:57 pm

Re: Strange error creating PDF files

#7 Post by sstone »

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

skiman
Posts: 1195
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Strange error creating PDF files

#8 Post by skiman »

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.
Best regards,

Chris.
www.aboservice.be

Post Reply