Page 1 of 1

ACROBAT NOSPAWN clause not working

Posted: Sun Sep 09, 2012 11:27 am
by sstone
Hi All,

Has anyone been successful in using the NOSPAWN clause when generating ACROBAT files? The pdf files are being generated but I do not want/need to display the files on creation since these files are being emailed immediately. Here is the code:

DCPRINT ON NAME 'Bullzip PDF Printer' SIZE 60,120 TO oPrinter ACROBAT NOSPAWN FIXED TOFILE ;
OUTFILE &cOutfile
Incidentally, the Bullzip printer has an option that is determine whether the pdf file is displayed on creation. It has no effect in my case.

S Lorde

Re: ACROBAT NOSPAWN clause not working

Posted: Mon Sep 10, 2012 3:41 pm
by rdonnay
I looked at my code and I don't see anything wrong here.

The DC_SpawnUrl() function is called in DC_PrintPreviewAcrobat() if the NOSPAWN clause is NOT used.

I think that Acrobat is getting spawned by the Bullzip print driver.

To be sure about this, put a WTF 'spawn' command in _DCPRC.PRG, before the call to DC_SpawnUrl(), around line 4845.
Rebuild dclipx.dll by running build19_sl1.bat. If the debugger comes up, then I am wrong and will look further.

Re: ACROBAT NOSPAWN clause not working

Posted: Mon Sep 10, 2012 8:11 pm
by sstone
Hi Roger,

I am not familiar with the WTF facility but I inserted WTF 'spawn' before the 'DC_SpawnUrl(cPDFName)' at line 4845 and the debugger did come up.

I failed to mention that I am doing my testing with release 256. Also, I tried using the Win2pdf driver and got the same result.

Shelstone

Re: ACROBAT NOSPAWN clause not working

Posted: Mon Sep 10, 2012 8:15 pm
by rdonnay
WTF is the same as DCBDEBUG but much easier to remember.

Ok, I'll look into it.

Re: ACROBAT NOSPAWN clause not working

Posted: Tue Sep 11, 2012 10:10 pm
by rdonnay
I figured out the problem. I seldom make this coding mistake (in _DCPRC.PRG) :

Was:

Code: Select all

  IF !lNoSpawn .AND. Trim(aOptions[7]) = 'Win2PDF' .OR. Trim(aOptions[7]) = 'Bullzip PDF Printer' .OR. ;
              AScan(XbpPrinter():new():list(), {|c|Upper(c)=='MICROSOFT OFFICE DOCUMENT IMAGE WRITER'}) == 0
Is:

Code: Select all

  IF !lNoSpawn .AND. (Trim(aOptions[7]) = 'Win2PDF' .OR. Trim(aOptions[7]) = 'Bullzip PDF Printer' .OR. ;
              AScan(XbpPrinter():new():list(), {|c|Upper(c)=='MICROSOFT OFFICE DOCUMENT IMAGE WRITER'}) == 0)
Here's a new _DCPRC.PRG file. Copy it to \exp19\source\dclipx and rebuild dclipx.dll by running build19_sl1.bat.

This fix will be in build 258.

Re: ACROBAT NOSPAWN clause not working

Posted: Sun Sep 16, 2012 10:38 pm
by sstone
Roger,
Thanks for that prompt fix. The pdf file was created but not displayed with the ACROBAT NOSPAWN clause.

However, I encountered another problem with line 151 of the _dcprc.prg (lNoSpawn := aOptions[66]). It generates an 'error in array index". For some reason the array length appears to be 65 in spite of the '#define DCPRINT_OPTIONARRAY_SIZE 67' line in \exp19256\dcprint.ch. I double-checked the environment settings to verify that the correct version of dcprint.ch is being used.

When I disabled lines 151 AND 152 in _dcprc.prg the array error disappeared.
Thanks for checking this as well.

S Lorde

Re: ACROBAT NOSPAWN clause not working

Posted: Mon Sep 17, 2012 6:51 am
by rdonnay
That's strange. My test program doesn't error. I will look into this.

Re: ACROBAT NOSPAWN clause not working

Posted: Mon Sep 17, 2012 7:43 am
by rdonnay
It appears that you are compiling with an older DCPRINT.CH.

Use the attached file.

Re: ACROBAT NOSPAWN clause not working

Posted: Mon Sep 17, 2012 6:46 pm
by sstone
It seemed that way to me also even though current settings of the environment variables suggested that the correct version from Exp19256 was being used. However, I rebuilt Dclipx and recompiled and all is well - no array error. Unless, environment variables are case sensitive in WIN XP, I am not sure why the version of dcprint.ch seemed to be a problem. Changing the case of the INCLUDE variable was the only change I made.

Re: ACROBAT NOSPAWN clause not working

Posted: Mon Sep 17, 2012 7:49 pm
by rdonnay
The array size definition is in DCPRINT.CH. The old one had a smaller array, thus the error.