DWF Drawings

Exporting DWF Drawings to PDF

Aspose.CAD for Java API can load AutoCAD drawings in DWF format, and convert it to PDF. This topic explains the usage of Aspose.CAD API to achieve the conversion of DWF to PDF format through simple steps as defined ahead.

Convert DWF Files to PDF

The following simple steps are required to convert DWF to PDF.

  1. Load the DWF file into an instance of Image.
  2. Create an object of the CadRasterizationOptions class and set the PageHeight & PageWidth properties.
  3. Create an object of the PdfOptions class and set the VectorRasterizationOptions property.
  4. Call Image.save while passing an object of PdfOptions as the second parameter.

The code sample below shows how to export a DWF Drawings to PDF.

Support of Layers in DWF

Aspose.CAD provides the feature to load AutoCAD DWF drawing entities and render them as an entire drawing to JPG format.

  1. Load DWF drawing file using the Image.load factory method.
  2. Create an object of the CadRasterizationOptions class.
  3. Add desired layers.
  4. Call Image.save while passing an object of JPEGOptions as second parameter.

The code sample below shows how to convert a file using default settings.