Message 1 of 19
C# Print to PDF without PDF AddIn.SaveCopyAs
Not applicable
11-26-2012
06:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I would like to use Drag2PDF to create my PDF, and I want to automate the printing process. I want to print all sheets as a one PDF file. I have created a simple C# code, which prints to PDF, but I have one problem... When I submit the print a dialogue will appear (from the Drag2PDF) which asks for the file to be saved (location and name) How can I automate this?
I may not use pdfAddIn.SaveCopyAs, it makes my PDF not good.
public void PrintDrawingToPDF()
{
Inventor.DrawingPrintManager oPrintMgr = (Inventor.DrawingPrintManager)InventorOpen._invApp.ActiveDocument.PrintManager;
oPrintMgr.Printer = "Drag2PDF";
oPrintMgr.PaperSize = PaperSizeEnum.kPaperSizeA3;
oPrintMgr.PrintRange = PrintRangeEnum.kPrintAllSheets;
oPrintMgr.SubmitPrint();
}
