Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 217
Anna Avatar asked Dec 29 '22 23:12

Anna


2 Answers

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.

like image 87
Mihai Limbășan Avatar answered Jan 09 '23 09:01

Mihai Limbășan


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

like image 40
samir105 Avatar answered Jan 09 '23 11:01

samir105