การวาด DWFx
Contents
[
Hide
]การวาด DWFx
DWFx เป็นเวอร์ชันล่าสุดของรูปแบบไฟล์ DWF ไฟล์ DWFx เป็นการวาดภาพ 2D หรือ 3D ที่สร้างขึ้นด้วยซอฟต์แวร์ Autodesk CAD มันอิงจาก XML Paper Specification (XPS) และสามารถดูและพิมพ์ได้ด้วย Microsoft XPS Viewer
Aspose.CAD สำหรับ Java อนุญาตให้นักพัฒนาสามารถเปิดและส่งออกไฟล์ DWFx เป็นรูปแบบ PDF นี่คือโค้ดที่แสดงวิธีการเปิดไฟล์ DWFx และบันทึกไว้ในรูปแบบ PDF
This file contains hidden or 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
// For complete examples and data files, please go to https://github.com/aspose-cad/Aspose.CAD-for-Java | |
String SourceDir = Utils.getDataDir_DWFXDrawings(); | |
String OutputDir = Utils.getDataDir_Output(); | |
String filePath = SourceDir + "Tyrannosaurus.dwfx"; | |
Image cadImageDwf = Image.load(filePath); | |
CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions(); | |
rasterizationOptions.setPageWidth(cadImageDwf.getSize().getWidth()); | |
rasterizationOptions.setPageHeight(cadImageDwf.getSize().getHeight()); | |
PdfOptions CADf = new PdfOptions(); | |
CADf.setVectorRasterizationOptions(rasterizationOptions); | |
cadImageDwf.save(OutputDir + "OpenDwfxFile_out.pdf", CADf); |