Tutorial :Is there a good ActiveX/COM component to “print” to PDF?


Clutching at straws here, I think I remember seeing a solution to this somewhere but can't find it now.

The issue is that I need a Windows application (not .Net) to be able to generate PDFs. The "standard" solution is to use something like PDF995 or CutePDF which create a dummy printer that your application can then print to and it is redirected to a PDF file. The problem is that to control those printers requires updating INI files or registry keys and that is error prone and often runs into concurrency problems.

Building the PDF file programmatically isn't an option, it needs to be able to take the output that would normally be sent to a printer, or possibly convert directly from an Excel file.

Ideally, I'd just pass the Excel file to a COM/ActiveX object and it would write to a file I specify. Next best option would be for it to create a separate printer per print job or have some reasonable way of guaranteeing the filename I give will have the document I print.

This Excel to PDF Batch converter might do the trick as at least it has a command line mode, has anyone tried that? It would only solve the problem for Excel files though.

So, is there a better solution?

(As a side note, for Visual FoxPro reports XFRX works really well, it converts the report directly to a PDF without needing a printer driver.)


You might want to look at BullZip (google it because I cannot add hyperlinks yet). We recently had Jody Meyer present this tool at the Detroit Area Fox User Group (previously shown at the Grand Rapids Area Fox User Group too). It was a great session.

She showed how to use the COM object to automate a ton of the BullZip features including the name of the file and properties like author and keywords. Watermarks are a snap too. It is simple and straightforward and her example was rock solid. Tons of features already done for you so you can simply re-engineer the demo form.

You can download it on the DAFUG Web site, in the downloads folder. File name is BullZipDemo.zip (google Detroit Area Fox User Group) and add the folder and filename.



For this scenario I would recommend Amyuni PDF Converter. It provides a Microsoft Certified PDF Printer and ActiveX/.Net controls to communicate with it. Concurrency issues can be avoided by using these controls. Disclaimer: I am part of the development team of this product.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »