<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Specify Paper Size (Canonical Media Name) When Publishing in C# in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/specify-paper-size-canonical-media-name-when-publishing-in-c/m-p/11467152#M11485</link>
    <description>&lt;P&gt;The Publish API is only meant to publish EXISTING layouts, that is, the the Layouts have had their plotsettings configured.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dsd file to the Publish API is like a plotting script, which does not provide ways for Publish API to go into an existing Layout to manipulate its PlotSetting details.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to set up the PlotSettings dynamically, you can go through the process of configuring PlotSettings and then use PlotEngine to to the plot (thus, do not need to use Publish API), or you have to update the layout's PlotSettings and save the change, then use Publish API to publish&lt;/P&gt;</description>
    <pubDate>Thu, 06 Oct 2022 22:22:39 GMT</pubDate>
    <dc:creator>norman.yuan</dc:creator>
    <dc:date>2022-10-06T22:22:39Z</dc:date>
    <item>
      <title>Specify Paper Size (Canonical Media Name) When Publishing in C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/specify-paper-size-canonical-media-name-when-publishing-in-c/m-p/11467042#M11484</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;newFile.Append("PaperSize=&lt;SPAN class=""&gt;ANSI&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;expand B (11.00 x 17.00 Inches)&lt;/SPAN&gt;\r\n");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;                using (DsdData dsdDataFile = new DsdData())
                {
                    dsdDataFile.ReadDsd(FileName);
                    PlotConfig acPlCfg = PlotConfigManager.SetCurrentConfig("DWG to PDF.PC3");
                    Autodesk.AutoCAD.ApplicationServices.Application.Publisher.PublishExecute(dsdDataFile, acPlCfg);
                }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 21:15:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/specify-paper-size-canonical-media-name-when-publishing-in-c/m-p/11467042#M11484</guid>
      <dc:creator>mcoH3VZV</dc:creator>
      <dc:date>2022-10-06T21:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: Specify Paper Size (Canonical Media Name) When Publishing in C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/specify-paper-size-canonical-media-name-when-publishing-in-c/m-p/11467152#M11485</link>
      <description>&lt;P&gt;The Publish API is only meant to publish EXISTING layouts, that is, the the Layouts have had their plotsettings configured.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dsd file to the Publish API is like a plotting script, which does not provide ways for Publish API to go into an existing Layout to manipulate its PlotSetting details.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to set up the PlotSettings dynamically, you can go through the process of configuring PlotSettings and then use PlotEngine to to the plot (thus, do not need to use Publish API), or you have to update the layout's PlotSettings and save the change, then use Publish API to publish&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 22:22:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/specify-paper-size-canonical-media-name-when-publishing-in-c/m-p/11467152#M11485</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2022-10-06T22:22:39Z</dc:date>
    </item>
  </channel>
</rss>

