Message 1 of 2
Specify Paper Size (Canonical Media Name) When Publishing in C#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, in the below code, I am publishing a list of drawings using the standard DWG to PDF pc3. I am wondering if you can specify per drawing or per set, the CanonicalMediaName? maybe as a setting similar to this?
newFile.Append("PaperSize=ANSI expand B (11.00 x 17.00 Inches)\r\n");
I've even tried changing the default in the DWG to PDF.pc3 on my C drive, and it doesn't seem to take. Either way, I'd prefer to do this with code.
Thanks,
using (DsdData dsdDataFile = new DsdData())
{
dsdDataFile.ReadDsd(FileName);
PlotConfig acPlCfg = PlotConfigManager.SetCurrentConfig("DWG to PDF.PC3");
Autodesk.AutoCAD.ApplicationServices.Application.Publisher.PublishExecute(dsdDataFile, acPlCfg);
}