tags:

views:

694

answers:

2

I am working on a legacy app in VB6 and am wondering what the easiest way would be to implement this requested feature - client wants ability to preview a document being sent to the printer as a PDF. No problem - there are plenty of PDF printer drivers out there that one can use. However, a necessary condition of this feature is absolute transparency - in other words, it should work out of the box after installation of the app, without having to say "To use this feature go to such-and-such website and download this pdf printer driver." In addition, client does not want to see a "Save As..." dialog. The ideal function of the feature is that a button is clicked, and what would have been sent straight to the printer is instead instantly previewed as a PDF that pops up with no further interaction with the user other than the user's initial pressing of a button.

Of course, there are a gazillion PDF packages out there, but they all seem to be along the lines of "here's an API where you can generate PDFs by directly writing lines, circles, graphics, text in specified fonts right to the PDF file". I do not want this - I want something that takes the data that is going right to the printer and pop it up as a PDF without a Save As

Now, CutePDF seems to have something like what I am looking for with their Custom PDF Writer (http://www.cutepdf.com/Solutions/pdfwriter.asp), but a) they do not seem to have an evaluation version; b) they do not seem to have much documentation about it that I can see, and c) it's freakin' expensive

Does anyone know if anything else like CutePDF Custom PDF Writer exists, or is that the only one of its type? I am open to any software as long as it gets this done, be it commercial, shareware, open source, whatever, so long as it satisfies the requirements of:

  • Must be a PDF printer (i.e. take the data going to the printer and turn it into a PDF)
  • must be completely transparent to end user (i.e. user must not have to change their printer settings and then change them back, or deal with a Save As dialog and then open the file they saved - it needs to just pop up)
  • must work with VB6
  • must be able to be packaged and installed along with the app without the end user having to run another setup program

any ideas?

Thanks in advance :)

+1  A: 

We've started using Bio PDF Writer, available here: www.biopdf.com.

It does offer the ability to silently install (which we do). It also offers the capability to write out to a pdf file silently, requiring an ini file to be created first to do so.

However, it is more expensive for a site license than CutePDF is (1,499 vs 299/499). you can buy a single license for 29.99 (USD). This may cover their needs (if it is just one client). Their documentation is pretty decent and they do have a trial version (that, as far as I can tell, has no limitations to it).

Daemonic
A: 

You should be able to use any PDF printer software that provides a silent install option and just set the current printer when you need to print via PDF:

Dim oldPrinter as VB.Printer
Set oldPrinter = Printer
Dim p as VB.Printer
For Each p In VB.Printers
    If p.DeviceName = "PDF Printer Name" Then
        Set Printer = p
    End If
Next
' Print Document Here '
Set Printer = oldPrinter

Note: You will need to ensure distributing and installing isn't in violation the license agreement

rpetrich
this part I already have - I'm looking for the PDF printer that is transparently installed, and can be programmed not to have a "Save As" dialog - the PDF just needs to pop up. Thanks though.
Jordan