Výkresy IGES
Contents
[
Hide
]Exportovat IGES do PDF
Aspose.CAD pro Javu umožňuje vývojářům vykreslit soubory IGES do formátu PDF. Následující kód ukazuje, jak přistoupit k souboru IGES a jak ho konvertovat do PDF pomocí CadRasterizationOption a PdfOptions.
Ukázkový kód
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); | |