You don’t specify but what version of 4D.I think you may have rot use PDF 
center 1.2 to make this work.
I also don’t see in your code any new area command so perhaps that is the 
problem


Regards

Chuck

------------------------------------------------------------------------------------------------
 Chuck Miller Voice: (617) 739-0306
 Informed Solutions, Inc. Fax: (617) 232-1064       
 mailto:cjmiller<AT SIGN>informed-solutions.com 
 Brookline, MA 02446 USA Registered 4D Developer                
       Providers of 4D and Sybase connectivity
          http://www.informed-solutions.com  
------------------------------------------------------------------------------------------------
This message and any attached documents contain information which may be 
confidential, subject to privilege or exempt from disclosure under applicable 
law.  These materials are intended only for the use of the intended recipient. 
If you are not the intended recipient of this transmission, you are hereby 
notified that any distribution, disclosure, printing, copying, storage, 
modification or the taking of any action in reliance upon this transmission is 
strictly prohibited.  Delivery of this message to any person other than the 
intended recipient shall not compromise or waive such confidentiality, 
privilege or exemption from disclosure as to this communication. 

> On Mar 1, 2019, at 12:01 PM, Bill Hutten via 4D_Tech <[email protected]> 
> wrote:
> 
> Hi all - Apologies in advance - if this has been discussed and I'm just 
> missing it, please point me to the archives.
> 
> I need to print 4D Write docs (not 4D Write Pro), on Windows 10, to PDF, 
> using the built-in "Microsoft Print to PDF" printer. This is the code I 
> curently have, cobbled togeather from various sources:
> 
> SET CURRENT PRINTER("Microsoft Print to PDF")
> SET PRINT OPTION(Spooler document name option;$fname)
> SET PRINT OPTION(Destination option;2;$path)  
> WR SET PRINT OPTION ($area;wr spooler document name option;$fname)
> WR SET PRINT OPTION ($area;wr destination option;wr send to file;0;$path)
> OPEN PRINTING JOB
> WR PRINT ($area;0;1)
> CLOSE PRINTING JOB
> 
> It works, in that a PDF is created, with the right $fname, at the right 
> $path. It doesn't work, in that the PDF is 0 bytes in size.
> 
> 
> Anyone have tested code that solves this problem?
> 
> - bill

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

Reply via email to