ACROBAT NOSPAWN clause not working

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

ACROBAT NOSPAWN clause not working

#1 Post 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

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

Re: ACROBAT NOSPAWN clause not working

#2 Post 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.
The eXpress train is coming - and it has more cars.

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

Re: ACROBAT NOSPAWN clause not working

#3 Post 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

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

Re: ACROBAT NOSPAWN clause not working

#4 Post by rdonnay »

WTF is the same as DCBDEBUG but much easier to remember.

Ok, I'll look into it.
The eXpress train is coming - and it has more cars.

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

Re: ACROBAT NOSPAWN clause not working

#5 Post 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.
Attachments
nospawnfix.zip
(32.61 KiB) Downloaded 661 times
The eXpress train is coming - and it has more cars.

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

Re: ACROBAT NOSPAWN clause not working

#6 Post 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

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

Re: ACROBAT NOSPAWN clause not working

#7 Post by rdonnay »

That's strange. My test program doesn't error. I will look into this.
The eXpress train is coming - and it has more cars.

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

Re: ACROBAT NOSPAWN clause not working

#8 Post by rdonnay »

It appears that you are compiling with an older DCPRINT.CH.

Use the attached file.
Attachments
dcprint_ch.zip
(6.7 KiB) Downloaded 695 times
The eXpress train is coming - and it has more cars.

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

Re: ACROBAT NOSPAWN clause not working

#9 Post 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.

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

Re: ACROBAT NOSPAWN clause not working

#10 Post by rdonnay »

The array size definition is in DCPRINT.CH. The old one had a smaller array, thus the error.
The eXpress train is coming - and it has more cars.

Post Reply