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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Generating format other than PDF on Bullzip PDF Printer programmatically

Status
Not open for further replies.

foxyland

Programmer
Apr 27, 2010
6
ID
Greetings all,

I use to create a PDF directly from my VFP apps using Bullzip PDF Printer. It works like charm. The code I use is something like this:
Code:
lcStatusFile = FullPath(Curdir()) + Sys(2015) + ".TXT"
BZWriter = CREATEOBJECT("BullZip.PDFPrinterSettings")
WITH BZwriter
[indent].RemoveSettings(.t.)
 .SetValue ("output", lcFilename)
.SetValue ('ShowSettings', 'NEVER')
.SetValue ('ConfirmOverwrite', "No")
.SetValue ('ShowPDF', "No")
.SetValue ('StatusFile', lcStatusFile)
.WriteSettings(.T.)
[/indent]
EndWith

lcPrintername = "Bullzip PDF Printer"
		
If File(lcStatusFile)
[indent]Delete File (lcStatusFile)[/indent]
EndIf
		
Set Printer to NAME (lcPrintername)
Select [tmpxlabel2]
Set Century off 
Set Nulldisplay To ""
Report Form barcode_label_3 to printer noconsole

Problem is: now I need to generate BMP image instead of PDF. I tried to to search on Bullzip doc but found nothing about changing output format.
Question: Does anybody know what settings should I tweak?

Thanks in advance,

foxyland
 
I don't know any way of doing it in Bullzip, but there are many utilities around that will convert a PDF to a graphic file such as a BMP - either on a page-by-age basis, or by extracting images from the PDF and saving them in separate files. A quick Google search should turn up some possiblities. For example, see
Of course, you will need to choose a utility that can be driven from the command line or a configuration file (as opposed to one that is entirely interactive), in order to execute it programmatically from your app. I have never used this type of tool myself, so I cannot give a specific recommendation.

By the way, just because I said that I don't know any way of generating BMPs from Bullzip, it doesn't mean that it can't be done. It's possible someone else here will be able to tell you if it's feasible, and if so how to go about it.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
I don't know why you would even consider Bullzip for creating an output other than PDF. That is what it does!

I have not used Foxypreviewer, so I cannot say anything about it.

But you might want to look at XFRX (eqeus.com)
XFRX is a tool for transforming Visual FoxPro reports to electronic formats. It can be incorporated into Visual FoxPro applications to provide the following functionality:
* Convert reports output to various output formats (Currently supported output formats are: PDF, DOC, RTF, XLS, HTML, MHT, ZIP, TXT, ODT (OpenOffice Writer), XML, XFF (DBF), BMP, PNG, JPEG, GIF and multipage TIFF).​

While very functional and their support was good when I needed it, its biggest drawback is that it is not Free.

NOTE - while I use XFRX for some of my client work, I have no personal business relation with them.

Good Luck,
JRB-Bldr
 
I endorse JRB's recommendation for XFRX - as I'm sure others here will too. It's true that it's not free, but it is a very good investment. I bought a copy about five years ago, and it has paid for itself many times over. (I orginally purchased a one year maintenance contract which included all updates; I haven't bothered to buy any upgrades since then.)

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
As JRB-Bldr said, a PDF printer is mainly just that, a PDF printer, but indeed I know PDF Creator can be configured to other formats too:

pdfcreator_sxbga2.png


So why don't you read the manual of Bullzip about other formats?

Feature list says it does support formats BMP, JPEG, PCX, PDF, PNG, and TIFF. I'd say give it a try to simply name the output file output.bmp instead of output.pdf and see what you get.

Bye, Olaf.
 
Thank you all for your reply. Yes, I'm aware that foxypreviewer would do the job --- even more neat than BullZip PDF. I might go that way. It's just I already use to utilize Bullzip, and I wondered if anyone here know something I might've missed out.

@Olaf: I read the manual, but unfortunately, it said nothing about exporting to BMP format. I tried to change the output filename. Well, it did create the BMP file, but it is still in PDF format (with BMP extension).

Thanks again guys.... Seems like foxypreviewer is the way to go.

Regards,
foxyland
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top