How to apply PC3 config file when rendering CAD formats

From 21.2 version you can apply PC3 file configuration. PC3 file is “Plotter Configuration Version 3” – contains settings for a particular plotter, GroupDocs.Viewer can apply width/height of page from PC3 file. To apply PC3 file, please use the following code:

using (Viewer viewer = new Viewer("sample.dwg"))
{
       PngViewOptions options = new PngViewOPtions("result.png");
       options.CadOptions.Pc3File = "small_page.pc3";

       viewer.View(options);
}

PC3 files location

By default, the PC3 files of an Autocad installation will be saved at:
C:\Users\%User Name%\AppData\Roaming\Autodesk\AutoCAD [Version]\[Version Code]\[Language]\Plotters For example, for an English version of Autocad 2021 it would be: C:\Users\%UserName%\AppData\Roaming\Autodesk\AutoCAD 2021\R24.0\enu\Plotters

More resources

View CAD Drawings Online

Along with full-featured .NET library we provide simple but powerful free online Apps. View DXF, DWG, and DWF files online with GroupDocs Viewer App.

GitHub Examples

You may easily run the code above and see the feature in action in our GitHub examples: