Re: Printing Excel Document to PDF from 4D - Windows

2020-02-21 Thread John DeSoi via 4D_Tech
The best PDF generation I have found is using Chrome headless via Puppeteer 
(https://developers.google.com/web/tools/puppeteer). For most reports, I 
generate a single source document in HTML that works with web browsers, Excel, 
and PDF. 

Since you are already generating Excel documents, perhaps Excel -> HTML -> 
Puppeteer/PDF might be an option. I guess it all depends on Excel automation 
options. I have not done much on that end other than asking Excel to open HTML 
documents.

Side note: 4D 18 includes some nice Zip commands. If you are willing to slog 
through a lot of details, 4D 18 can create Excel files using the XML and Zip 
commands without any plugins.


John DeSoi, Ph.D.


> On Feb 21, 2020, at 4:18 PM, rooftop99--- via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> From within 4D, programmatically I need to grab an existing Excel document 
> and print it to PDF…  (or “magically" transform it to PDF, if that option is 
> available.)
> 
> We create Excel documents from 4D using Rob Laveaux’s powerful XL Plugin.  We 
> print PDFs in 4D using the plugin:  4D PDF Printer.  We now want to 
> automatically create both Excel and PDFs of the same data using the same 
> format.  Rather than building two processes (forms, methods, etc) to handle 
> each flavor of a report, I would like to create and save the Excel doc first 
> then use that doc to create a PDF…. Anyone doing this or have ideas on how 
> this could be done?  

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Printing Excel Document to PDF from 4D - Windows

2020-02-21 Thread rooftop99--- via 4D_Tech
Hi All,

system: 4D v16, All Windows Client/Server

From within 4D, programmatically I need to grab an existing Excel document and 
print it to PDF…  (or “magically" transform it to PDF, if that option is 
available.)

We create Excel documents from 4D using Rob Laveaux’s powerful XL Plugin.  We 
print PDFs in 4D using the plugin:  4D PDF Printer.  We now want to 
automatically create both Excel and PDFs of the same data using the same 
format.  Rather than building two processes (forms, methods, etc) to handle 
each flavor of a report, I would like to create and save the Excel doc first 
then use that doc to create a PDF…. Anyone doing this or have ideas on how this 
could be done?  

Thanks in advance!
Kirk
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**