Reputation: 763
I have a customer who wants to print to PDF and Physical printer at the same time. They don't want to print the physical copy from the PDF, why I don't know. I tried saving as a temporary RTF file and calling ShellExecute to print to Adobe but doesn't appear this works.
Does anyone have a way without a 3rd party PDF library to print to PDF from a file?
UPDATE: To clarify a bit the user is working with a dynamic document creator. They see preview text on the screen in a TRichEdit and the current print method is the TRichEdit's print command (RichEdit.Print). The first attempt to a pdf was by saving the contents of this rich edit to a temp.rtf file.
Upvotes: 0
Views: 5726
Reputation: 43033
You can use our Open Source SynPdf library to export a RichEdit content into a pdf file.
See this forum post for some sample code.
It won't require any printer to be installed. And it will allow easy print preview, custom footer & header, additional title or text, if needed.
Upvotes: 4
Reputation: 1622
I have used PDFForge in the past. It installs a virtual printer, and printing into this printer creates a PDF. However, it also has options to also immediately print to a physical printer, hence you will be producing a PDF and physicall copy simultaneously. See documentation here if it help you:
http://www.pdfforge.org/content/print
Upvotes: 1