PageWidth - custom page width in points. When set, PageSize automatically changes to Custom.
PageHeight - custom page height in points. When set, PageSize automatically changes to Custom.
Note
Starting with version 26.9, the page size is set only through SizeSettings; the PageSize, PageWidth and PageHeight properties directly on CadConvertOptions were removed.
PageNumber - Specifies the starting page number for conversion.
PagesCount - Specifies the number of pages to convert.
API Structure
The following example shows the API structure for CadConvertOptions:
usingGroupDocs.Conversion.Options;usingGroupDocs.Conversion.Options.Convert;usingGroupDocs.Conversion.FileTypes;// Create options objectCadConvertOptionsoptions=newCadConvertOptions{Format=CadFileType.Dwg,SizeSettings=newPageSizeOptions{PageSize=PageSize.A4},PageNumber=1,// Starting pagePagesCount=10// Number of pages to process};
Conversion Examples
CadConvertOptions supports conversion between CAD formats. The following examples demonstrate common conversions.
DWG to DXF
Convert an AutoCAD DWG file to DXF (Drawing Exchange Format):
usingGroupDocs.Conversion;usingGroupDocs.Conversion.Options;usingGroupDocs.Conversion.Options.Convert;usingGroupDocs.Conversion.FileTypes;stringsourceFile="floor-plan.dwg";stringoutputFile="floor-plan-custom.dxf";using(varconverter=newConverter(sourceFile)){varoptions=newCadConvertOptions{Format=CadFileType.Dxf,SizeSettings=newPageSizeOptions{PageWidth=800,// Width in pointsPageHeight=600// Height in points}};converter.Convert(outputFile,options);}
Format Support Notes
CAD to CAD conversions are supported for select format combinations:
DWG → DXF, DWF
DGN → DXF, DWF
DWT → DXF, DWF
STL → DXF, DWF (limited support)
Other CAD formats → DXF, DWF (varies by format)
Conversions from non-CAD formats (PDF, Word, Excel) to CAD formats are not supported.