4

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.

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
Anna
  • 61
  • 2
  • 5
  • 1
    Don't use 'dotnet' for a tag - use '.net' instead. Please pay attention the suggest prompts when tagging your question - any tag with a number < 10 after the name should probably be avoided. – Joel Coehoorn Jun 05 '09 at 14:19

9 Answers9

8

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
  • 64,368
  • 4
  • 48
  • 59
  • Mihai thanks a million. I think this will be a great solution – Anna May 29 '09 at 13:15
  • 1
    +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 May 29 '09 at 17:50
  • 1
    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 May 30 '09 at 02:47
  • I've used PDF creator with some fairly complex multipage graphical output and it works fine. Was planning to do some automation of it via COM so that I can add a 'one-click' save to PDF feature (same as the OP mentions they wanted). – dodgy_coder Dec 12 '11 at 08:00
1

Win2PDF 10 does all of that and more.

Check out the registry functions:

https://www.win2pdf.com/doc/registryoverview.html

Feature Comparison Chart:

https://www.win2pdf.com/features.html#Win2PDF-Product-Comparison

I've been using Win2PDF Pro for at least 20 years at home and on my workstation at work; and have always found it reliable and speedy. I just downloaded the latest version service pack and will be updating my installation at next reboot. Enjoy.

jim
  • 61
  • 3
1

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

samir105
  • 949
  • 11
  • 16
0

Win2PDF also has a registry API to print to PDF with no user interaction. From Delphi, you just need to set the "PDFFileName" registry key to the PDF file and then print to the Win2PDF printer.

Craig Lebakken
  • 1,853
  • 15
  • 10
0

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

Stijn Sanders
  • 35,982
  • 11
  • 45
  • 67
  • 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 May 29 '09 at 11:16
  • You didn't really state which reporting tool(s) you were using so I took a guess. – Stijn Sanders May 29 '09 at 21:01
0

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
  • 2,397
  • 2
  • 17
  • 17
  • 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 May 29 '09 at 12:04
  • 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 May 29 '09 at 12:58
  • With the mix of report formats I think, as others have said, your best bet is to go down the printer route. – Simon Temlett May 29 '09 at 16:38
0

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
  • 54
  • 3
  • 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 May 29 '09 at 12:05
0

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.

Jim Puls
  • 79,175
  • 10
  • 73
  • 78
  • perfect answer Neftali, I will use this. I think this will solve my problem . Thanks a lot – Anna May 29 '09 at 12:45
  • This is the link with detailled explanation. http://www.fineprint.com/developers/index.html – Germán Estévez -Neftalí- Jun 02 '09 at 08:34
  • Just a quick note, I've just tried PDF factory with some simple graphics and its vastly inferior in terms of quality of output compared to PDF Creator. – dodgy_coder Dec 12 '11 at 07:57
  • The application has quite a few configuration parameters, including those relating to the quality of graphics. It is possible that for this reason the quality was not the optimal. See link (http://tinyurl.com/cav9b9u). Thanks for the link exchange. – Germán Estévez -Neftalí- Dec 12 '11 at 10:27
  • @Neftalí thanks for the heads up - I agree that PDFFactory is a nice solution - it was just the graphics quality that put me off initially. I will revisit it again. – dodgy_coder Dec 14 '11 at 03:08
0

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
  • 5,525
  • 4
  • 35
  • 47
  • Hi Rob ,Thank you for the input. I like Neftalis answer , I think that will solve my problem – Anna May 29 '09 at 13:10