Tim,

As I mentioned in my original message, I cannot use PDFCreator. So this does 
not work for me on Windows:
> SET PRINT OPTION(Destination option;3;fileName)

as per documentation, but that was why I mentioned that I wasn't using 
PDFCreator.

As per docs, It works fine on Mac, but not Windows. Which is ok. I was having 
issues getting to the other drivers.

For years we’ve been doing this with 4D Write by simply changing printers to
        Adobe PDF
        Win2PDF
        PDF995

Each of these print drivers provides a way to programmatically set the document 
name so the driver works.

So I have managed to make this block of code work for all drivers but Adobe PDF:

        GET PRINT OPTION(Destination option;$saveDestination;$savePath) 
        SET PRINT OPTION(Destination option;2;$tFullDocumentPath)

        WP PRINT($WriteArea;wk 4D Write Pro layout)

        SET PRINT OPTION(Destination option;$saveDestination;$savePath)

I still have to use the mechanisms that each of the printer drivers themselves 
require for giving the driver the document path, but WP PRINT still requires me 
to use the SET PRINT OPTION command to set the path or it puts up the save as 
dialog to get a name even though the printer driver itself doesn’t need it or 
use it.

So now all I have to do is figure out what the heck is wrong with Acrobat PDF. 
It works fine and produces a proper PDF if I manually print and choose Acrobat 
PDF, but generates a corrupt PDF if try to do the above code programmatically.

The file is not readable by any application (except a text editor) AND it’s 
11MB in size, where the other printer drivers product a 209KB file.

Fun. Fun. Fun.

Getting there, though.

Randy

----------------------------------------------------------------------
Randy Jaynes
Senior Programmer and Customer Support

http://printpoint.com <http://printpoint.com/> • 845.687.3741 • PrintPoint, Inc 
• 57 Ludlow Lane • Palisades, NY 10964 
Please send all email contacts to [email protected] 
<mailto:[email protected]>




> On Jun 19, 2018, at 7:13 PM, Timothy Penner <[email protected] 
> <mailto:[email protected]>> wrote:
> 
> Hi Randy
> 
>> However, I don’t seem to be able to do my 4D Write way of change
>> - switch printer to Adobe PDF / Web2Print / PDF995
>> - WR Print XXXX
>> - switch back to normal printer
> 
> Where are you setting the filename?
> 
> Typically this is done with SET PRINT OPTION:
> http://doc.4d.com/4Dv16R4/4D/16-R4/SET-PRINT-OPTION.301-3318228.en.html 
> <http://doc.4d.com/4Dv16R4/4D/16-R4/SET-PRINT-OPTION.301-3318228.en.html>
> 
> {
> Using a PDF option code (Windows)
> In order to be able to use a PDF option code in the option parameter, you 
> must have installed the PDFCreator driver in your 4D environment (for more 
> information, refer to the Integration of PDFCreator driver under Windows 
> section). Moreover, in order for option codes to be taken into account, you 
> need to have enabled control of PDF printing for 4D using the following 
> statement:
> 
> SET PRINT OPTION(Destination option;3;fileName)
> }
> 
> This KB article about printing 4D Write (not Pro) also seems to use the SET 
> PRINT OPTION:
> http://kb.4d.com/assetid=77200
> 
> -Tim
> 
> 
> 
> Timothy Penner
> Senior Technical Services Engineer
> 
> 4D Inc
> 95 S. Market Street, Suite #240
> San Jose,CA 95113
> United States
> 
> Telephone: +1-408-557-4600
> Fax:       +1-408-271-5080
> Email:     [email protected]
> Web:       www.4D.com
> 

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to