We use BullZip. Something similar to Stephen's code:
(note that will not work as posted, other requirements/variables/etc. not
shown)
*
* Print to PDF
*
oPDF = CREATEOBJECT("Bullzip.PDFPrinterSettings")
WITH oPDF
.SetValue("ShowSettings","never")
.SetValue("ShowSaveAS","never")
.SetValue("ShowProgress","no")
.SetValue("ShowProgressFinished","no")
.SetValue("ShowPDF","no")
.SetValue("ConfirmOverwrite","no")
m.cfile = this.pdffile && put your PDF file name you want
here (full path name).
.SetValue("output",m.cFile)
.WriteSettings(.t.)
ENDWITH
And we print from Excel via automation (later versions of Excel can print
to .PDF directly, but we were using an old version):
*
* Set printer for Excel for PDF
*
LOCAL m.cOldXLPrinter, m.cPDFPrinter, wss, m.cPort
m.cOldXLPrinter = oX.ActivePrinter
m.cPDFPrinter = "Bullzip PDF Printer"
wss = CREATEOBJECT("wscript.shell")
m.cPort = wss.RegRead("HKCU\Software\Microsoft\Windows
NT\CurrentVersion\Devices\"+m.cPDFPrinter)
* [\\server\][printer name][ on ][port] && server is optional if printer
name is local
oX.ActivePrinter = m.cPDFPrinter + " on " + RIGHT(m.cPort,5) && oX is
the object reference to Excel
IF EMPTY(m.tcType) && Whole workbook or just selected sheets
oX.ActiveWorkbook.PrintOut()
ELSE
oX.ActiveWindow.SelectedSheets.PrintOut()
ENDIF
Fred
On Thu, Dec 3, 2015 at 2:38 PM, Gene Wirchenko <[email protected]> wrote:
> Dear Vixens and Reynards:
>
> I am trying to get Bullzip PDF printer to work. I have an existing
> app that uses Adobe's PDF printer driver, but it is awkward to use with
> onerous licencing. Before modifying my program to work with Bullzip, I
> would like to see that Bullzip works.
>
> Step one is to get some output to a named file. Step two is to get
> some output to a named file from VFP. Step three is integration with my
> app.
>
> I am stuck on step one.
>
> I have created a runonce.ini in what is apparently the correct
> directory. (I assume so as this file gets deleted when I try to print
> through Bullzip.) The directory is C:\Users\Owner\AppData\Local\PDF
> Writer\Bullzip PDF Printer
>
> From c:\cbs2dev, I opened Notepad and created a short text file (not
> saved).
>
> The runonce.ini is:
> ***** Start of File *****
> [PDF Printer]
> Output=c:\cbs2dev\bullzip\test.pdf
> ConfirmOverwrite=no
> ConfirmNewFolder=no
> ShowSaveAS=never
> ShowPDF=yes
> ***** End of File *****
>
> Note that the directory for where the file is to go is a subdirectory
> of where Notepad opened from. The c:\cbs2dev\bullzip directory does exist.
>
> The dialog for selecting the filename et al comes up with c:\cbs2dev
> (not c:\cbs2dev\bullzip) and with the name test.pdf. As far as I can see,
> I have configured that dialog to not show up.
>
> If I change the filename in the runonce.ini, the new name shows up in
> the dialog. The directory is still wrong.
>
> Somehow, I got it to work once before, but now, no.
>
> No, I am not forgetting to recreate the runonce.ini on subsequent
> tries.
>
> Any ideas?
>
> Sincerely,
>
> Gene Wirchenko
>
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/cajcbksrq-1trdpgka5pe1rbsvmxblqsxk+0pgwp0behkpv9...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.