views:

518

answers:

7
+2  Q: 

printing to pdf

The existing system has many reports . Using a free pdf printer like dopdf or cutepdf the user can open the report , choose the pdf printer , type in the filename and save the report as a pdf file.This seems a bit tedious

It would be nice to have the report directly saved as a pdf file just on click of a button. Unfortunately the reporting tool component doesnt have pdf export functionality. . Is there a way to programatically do this function using a third party component.

The printing should be silent , so that the user is not asked for a filename.Report 1 when clicked will make a file called c:\1.pdf for example. something like this ActivatePdfPrinter(c:\1.pdf); printreport; ClosePdfPrinter;

or any other method .

I use delphi but if you suggest any other tools that work in other programming languages then I can search in the right direction.

A: 

Pragnaan has a PDF Export Device for ReportBuilder: Report Builder Export Devices

Stijn Sanders
Hello Stijn ,thank you for your reply. But I think that would require us to convert all our existing reports over to reportbuilder isnt it ? or have I understood wrong ?
Anna
You didn't really state which reporting tool(s) you were using so I took a guess.
Stijn Sanders
A: 

You don't say how you are generating your reports but Gnostice have a number of tools that may of help to you.

Simon Temlett
Hi Simon , The system has about 120 reports , some of them are quickreport , some reportbuilder version 5 , gnostice only supports the new reportvuilder version , and some reports are even printed using Excel. so that is why its a bit of a hassle to convert to reportbuilder
Anna
Anna Gnostice Quick Reports as well. Specicially you need to look at the eDocEngine product.http://www.gnostice.com/eDocEngine_VCL.asp#goto_3rd-Party___Reporting_tools_Support
Robert Love
With the mix of report formats I think, as others have said, your best bet is to go down the printer route.
Simon Temlett
A: 

Following up on Stijn Sanders's reply: The latest version of ReportBuilder from Digital Metaphors now includes native PDF export, as well as "silent" saving of the PDF, and e-mailing of the report. You are correct, however, in that you would have to convert all of your reports to ReportBuilder. It may be worth looking into, though, depending on the complexity and number of reports in your project. We converted ours from Rave Reports and never looked back.

Johnula
Hi John , thank you . I will have to look into this as a last resort. The system has about 120 reports , so that is why its a bit of a hassle to convert to reportbuilder
Anna
+1  A: 

Install Adobe Acrobat Professional and choose "Adobe PDF" as the printer.

samir105
A: 

I use PDFFactory. Is a software similar to others thar work like a virtual printer. Is not very expensive. The particularity is that you can control (using the windows registry) some parámeters to print any document without the user intervention.

I use it in my Delphi application.

  1. Select the default printer (PDFFactory)
  2. Write the FileName,... on the registry key
  3. Send to print.

The user should not write anything and not view any config window.

Geetings.


Neftali -Germán Estévez-

Neftalí
perfect answer Neftali, I will use this. I think this will solve my problem . Thanks a lot
Anna
This is the link with detailled explanation. http://www.fineprint.com/developers/index.html
Neftalí
A: 

Anna, as an aside in the comments you mention you're using an older version of ReportBuilder - have you looked at the Waler TExtraDevices component? I don't have it to hand but I seem to recall back in the day we used this to get output from ReportBuilder to PDF, and because of the way it makes ReportBuilder think it's a text device, you can do this without any previewing or interaction on the part of the end user.

Having said that, you're looking for a general-purpose method that would work with QuickReport and Excel. I really think you're going to end up with some kind of 'PDF Printer' and forcing your reports to this 'named printer'. You might be able to set-up PDF Factory such that it takes the output filename from the document title, etc - but I do think you're always going to have a bit of user interaction no matter how hard you try. :-(

Do let us know what you do, as this is a problem I've had myself and never managed a very satisfactory solution. I'd be interested to see what you choose to do!

robsoft
Hi Rob ,Thank you for the input. I like Neftalis answer , I think that will solve my problem
Anna
+6  A: 

The free, open source PDFCreator can function as a virtual printer but it's also usable via COM. The default setup even includes COM examples.

You can check the COM samples in the SourceForge SVN repository right here: http://pdfcreator.svn.sourceforge.net/viewvc/pdfcreator/trunk/COM/

Delphi and ActiveX get along superbly so you should not have much trouble.

Mihai Limbășan
Mihai thanks a million. I think this will be a great solution
Anna
Welcome, glad this helped.
Mihai Limbășan
+1 - This method works very well for the general cases, and is something I have done myself with this specific product. Where I had it break down was in extremely large documents (thousands of pages, using very small fonts -- spacing was critical) where it was better to use a PDF specific tool such as PDFBox, or Gnostice.
skamradt
I use PDFCreator all the time. It's back end is implemented using RedMon which is useful in many other contexts as well.
David Taylor