An ADN partner had once inquired about retrieving paper sizes for a DWF Export using the API. They researched into UIDocument.Document.PrintManager.PaperSizes to retrieve the paper sizes but this provided paper sizes which were different from what was being shown via the UI for DWF export.
Using the ViewPrinter SDK sample, we can use the PrintManager class to list various paper sizes. So for different printers, we get a list of paper sizes which is different from what we get if we select a different printer. This is for the usual print tasks.
Now, to perform DWF exports using the APIs, we have to use the Document.Export() method and use the overload which exports to DWF(x). And use DWF(x)ExportOptions to set the properties as shown below -
DWFXExportOptions options = new DWFXExportOptions();
options.ExportObjectData = m_exportObjectData;
options.ExportingAreas = m_exportAreas;
options.MergedViews = m_exportMergeFiles;
options.ImageFormat = m_dwfImageFormat;
options.PaperFormat = ExportPaperFormat.ISO_A3;
options.ImageQuality = m_dwfImageQuality;
exported = m_activeDoc.Export(m_exportFolder, m_exportFileName, views,
As you might have realized, the list of paper sizes is predetermined in the case of DWF export and is accessible from the API using the ExportPaperFormat enumeration. This is standard list of paper sizes and fixed for all DWF exports. Thus, the approach of using the Document.PrintManager.PaperSizes does not work for DWF exports.