Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active December 23, 2021 06:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/928696a8b451afc499d21ec14df832a8 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/928696a8b451afc499d21ec14df832a8 to your computer and use it in GitHub Desktop.
Convert IGS IGES to PDF Programmatically using Java
String file = "figa.igs";
// Load input IGES/IGS file
Image image = Image.load(file);
// Setting output PDF Options
PdfOptions pdfOptions = new PdfOptions();
CadRasterizationOptions cadRasterizationOptions = new CadRasterizationOptions();
cadRasterizationOptions.setDrawType(CadDrawTypeMode.UseObjectColor);
cadRasterizationOptions.setPageHeight(1000);
cadRasterizationOptions.setPageWidth(1000);
pdfOptions.setVectorRasterizationOptions(cadRasterizationOptions);
// Convert IGES/IGS to PDF file.
image.save("figa.pdf", pdfOptions);
String file = "figa.igs";
// Load input IGES/IGS file
Image image = Image.load(file);
// Initialize Pdfoptions class object
PdfOptions pdfOptions = new PdfOptions();
// Convert IGES/IGS to PDF file
image.save("figa.pdf", pdfOptions);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment