Opt.AutosaveDirectory = Format in which file is to be saved. Set parameters for saving the generating pdf automatically to a directory. If printer is started successfully set the options for the printer. String parameters = "/NoProcessingAtStartup" Ĭonsole.WriteLine("Unable to start PDFCreator.") Ĥ. Create new instance for PDFCreator and start using the code.ĬlsPDFCreator creator = new clsPDFCreator() Add reference to PDFCreator and Word object.ģ. In this example we'll also see how to create a single pdf from multiple word documents (or any documents).Ģ. Code will be in C# and application will be a console application. In this code I'll be using Word Application to convert a word document to PDF document. Choose the printer created above and ask it to print. You can use this printer from any document. After installation a new printer will be installed on your machines.Ħ. So if you are using the code as it is then you need to give this name.ĥ. You can use any name but this is the name that I have used in the code. Give the name of the printer as “PDFCreator”. You can use any mode while installing (standard or server) but the server mode needs more configuration so better go for standard mode.Ĥ. Run the installer and install PDFCreator. If you have already installed GhostScript go for installer which doesn’t have ghost script installer embedded else go for the installer that will install ghost script also.ģ. It uses GhostScript for creating PDF which is again distributed free under GPL license.ġ. In this article we'll see how we can use PDFCreator for printing/creating pdfs. Finally, I found great open source tool PDFCreator which lets you create pdf, merge pdf, automatically save them to a directory, set options via code etc etc. It should also have ability to merge the documents or pdfs together. Long time no post, was busy with office work and most of the time was searching for an open source tool that reliably prints or creates pdf from any document.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |