IGES Drawings
Contents
[
Hide
]Export IGES to PDF
Aspose.CAD for Java allows developers to render IGES files to PDF. Following is the code demonstrating how to access the IGES file and convert that to PDF using CadRasterizationOption and PdfOptions.
Sample Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String dataDir = Utils.getDataDir(ExportIGEStoPDF.class) + "IGESDrawings/"; | |
String PLTPathToFile = dataDir + "figa2.igs"; | |
Image image = Image.load(PLTPathToFile); | |
//Setting PDF Options | |
PdfOptions pdfOptions = new PdfOptions(); | |
CadRasterizationOptions cadRasterizationOptions = new CadRasterizationOptions(); | |
cadRasterizationOptions.setDrawType(CadDrawTypeMode.UseObjectColor); | |
cadRasterizationOptions.setPageHeight(1000); | |
cadRasterizationOptions.setPageWidth(1000); | |
pdfOptions.setVectorRasterizationOptions(cadRasterizationOptions); | |
//Saving to PDF | |
image.save(dataDir+"figa2.pdf", pdfOptions); | |