Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BullZip - sample code

Status
Not open for further replies.

AndrewMozley

Programmer
Oct 15, 2005
621
GB
I have been looking at BullZip with a view to producing .pdf files from a VFP9 application (without dialogue at run-time) I have looked at the documentation available on the Bullzip site, but it is not quite clear to me what instructions I must issue in my program to direct output (via Bullzip) to a named .pdf file.

If anyone has some sample code which has done this, I would be very grateful.

Thanks. Andrew
 
So thread184-1745978 didn't really help?
And what about thread184-1721882 (or more direct thread184-1633942)?

Code:
oBullzipPrintersettings = CREATEOBJECT("BullZip.PDFPrinterSettings")
oBullzipPrintersettings.SetValue("output", "d:\pdfs\your.pdf") 
oBullzipPrintersettings.WriteSettings(.T.)

Bye, Olaf.
 
Thank you Olaf. That is a great help and has set me on the right track.

My code (as part of a test) is at present :

Code:
   oBullzipPrintsettings = CREATEOBJECT("BullZip.PDFPrinterSettings")
   oBullzipPrintsettings.SetValue("output", "C:\myfolder\hmp\mine.pdf") 
   oBullzipPrintsettings.WriteSettings(.T.)
   oBullzipPrintsettings.SetValue("ShowSettings","Never")
   lName = "Bullzip PDF Printer"
   SET PRINTER TO NAME (lName)
   REPORT FORM TempCust NOCONSOLE TO PRINTER

This certainly produces a .pdf file. However there are a couple of things which I need to correct.
[ol 1]
[li]At run-time the dialogue appears, asking me to accept the choice of output filename. How can I suppress that? I have optimistically include the Setvalue("Showsettings") instruction, but I don't think I have understood it properly.[/li].
[li]The Setvalue ("output" instruction is being obeyed up to a point. It is certainly setting the filename (mine.pdf), but the folder name C:\myfolder\hmp is being ignored, and the file is actually going to C:\dev\mine.pdf. I feel that the C:\dev expression - which is a valid folder on my system - is a default setting within my installation of Bullzip. Do you know how I can change it?[/li]

[/ol]
Thanks. Andrew
 
I don't install everything just to be abe to test.
Why don't you save the ShowSettings setting via oBullzipPrintersettings.WriteSettings(.T.)
It seems to me this line is persisting the changes and without it setting changes are not committed and thus not having effect?

Bye, Olaf.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top