PDF
JPG
PDF
XML
DWG
PDF
قم بتحويل DWG إلى PDF عبر Java
مكتبة Java الأصلية لقراءة وكتابة وتصدير DWG إلى PDF دون الحاجة إلى Adobe.
كيفية تحويل DWG إلى PDF باستخدام Java
من أجل تقديم DWG إلى PDF ، سنستخدم Aspose.CAD for Java API وهو غني بالميزات وقوي وسهل لاستخدام واجهة برمجة تطبيقات التحويل لمنصة جافا. يمكنك تنزيل أحدث إصدار له مباشرةً من Maven و قم بتثبيته ضمن مشروعك المستند إلى Maven عن طريق إضافة التكوينات التالية إلى ملف pom.xml.
مخزن
<repository>
<id>AsposeJavaAPI</id>
<name>Aspose Java API</name>
<url>https://repository.aspose.com/repo/</url>
</repository>
الاعتماد
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-cad</artifactId>
<version>version of aspose-cad API</version>
<classifier>jdk17</classifier>
</dependency>
خطوات تحويل DWG إلى PDF عبر Java
- قم بتحميل ملف DWG باستخدام طريقة Image.load
- تعيين كائن CadRasterizationOptions مع ارتفاع الصفحة وعرضها
- قم بإنشاء مثيل لفئة PdfOptions وقم بتعيين خاصية VectorRasterizationOptions الخاصة بها
- استدعاء طريقة Image.save أثناء تمرير مسار الملف الناتج وكائن PdfOptions
متطلبات التحويل
- Microsoft Windows أو نظام تشغيل متوافق مع Java Runtime Environment لتطبيق JSP / JSF وتطبيقات سطح المكتب. - احصل على أحدث إصدار من Aspose.CAD لجافا مباشرة من Maven.DWG إلى شفرة مصدر تحويل جافا PDF
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
// load DWG in an instance of Image via its Load method | |
Image image = Image.load("template.dwg"); | |
// create an instance of CadRasterizationOptions and set page height & width | |
CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions(); | |
rasterizationOptions.setPageWidth(1600); | |
rasterizationOptions.setPageHeight(1600); | |
// create an instance of PdfOptions | |
TiffOptions options = new TiffOptions(); | |
// set the VectorRasterizationOptions property as CadRasterizationOptions | |
options.setVectorRasterizationOptions(rasterizationOptions); | |
// export DWG to PDF | |
image.save("output.pdf", options); |
تطبيق مجاني لتحويل DWG إلى PDF
Convert DWG to PDF right now by visiting our Live Demos website.The live demo has the following benefits
No need to download Aspose API.
No need to write any code.
Just upload your DWG file, it will be converted instantly to PDF.
You will get the download link.