I am building a tool to plot layout content of drawing to PDF/DWF file. The issue I have is that the required output paper size is not a standard paper size (i.e. the paper size does not exists in paper list when the "DWG To PDF.pc3" is selected.
In order to plot programmatically, we have to create a PlotSettingsValidator and call
PlotSettingsValidator.SetPlotConfigurationName(plotSettings, plotDeviceName, mediaName)
For the 3 required arguments:
plotSettings: it is copied from current Layout
plotDeviceNameL it will be "DWG To PDF.pc3"
mediaName: ? this is the one I could not decide, because with the available paper list there isn't one that matches the paper size required by the layout.
When doing plot to PDF manually in AutoCAD, user would get prompted for using the selected device (PDF.pc3)'s default paper or use a cutom paper size. If choosing to use custom paper size, AutoCAD add a custom paper size into PDF.pc3 in memory. Here is what I could not find: the corresponding API of adding custom paper size to PDF/DWF pc3 device to match required layout paper size.
All the PDF plotting samples I can find online (such as Kean's posts on plotting) use a know paper size when SetPlotConfigurationName() is called, thus, not helpful.
Does anyone have clue on this?
Norman Yuan
Solved! Go to Solution.
Solved by SENL1362. Go to Solution.
Can you please elaborate on your workaround solution?
I would to try it but don't know where to start
Thanks!
Can't find what you're looking for? Ask the community or share your knowledge.