Skip to main content

Has anyone used Microsoft Print to PDF to generate PDF's dynamically?  For example, our application produces a text file from which we want to create a PDF.  Using C#, the following could be used:

PrintDocument.PrinterSettings.PrinterName = "Microsoft Print to PDF";
PrintDocument.PrinterSettings.PrintToFile = true;
PrintDocument.PrinterSettings.PrintFileName = "pdf_filename";

However, I'm having difficulty generating a def file for the System.Drawing and System.Drawing.Common dll's.



------------------------------
Ken Schwartz
Senior Engineer, Development
Southware Innovations, Inc
Opelika US
------------------------------

Has anyone used Microsoft Print to PDF to generate PDF's dynamically?  For example, our application produces a text file from which we want to create a PDF.  Using C#, the following could be used:

PrintDocument.PrinterSettings.PrinterName = "Microsoft Print to PDF";
PrintDocument.PrinterSettings.PrintToFile = true;
PrintDocument.PrinterSettings.PrintFileName = "pdf_filename";

However, I'm having difficulty generating a def file for the System.Drawing and System.Drawing.Common dll's.



------------------------------
Ken Schwartz
Senior Engineer, Development
Southware Innovations, Inc
Opelika US
------------------------------

When you want to print something, just use win$printer to choose the printer for "Microsoft Print to PDF". Like the sample program do:



------------------------------
Stone Liao
Manager
Channelmaker Technology Co., Ltd.
Taipei TW
------------------------------