PDF JPG PDF XML STL
  Product Family
PDF

แปลง STL เป็น PDF ผ่าน Java

Native Java Library สำหรับอ่าน เขียน และส่งออก STL เป็น PDF โดยไม่ต้องใช้ Adobe

วิธีแปลง STL เป็น PDF โดยใช้ Java

ในการแสดง STL เป็น PDF เราจะใช้ API ของ Aspose.CAD for Java ซึ่งเป็นคุณลักษณะที่หลากหลาย มีประสิทธิภาพ และใช้งานง่าย เพื่อใช้ Conversion API สำหรับแพลตฟอร์ม Java คุณสามารถดาวน์โหลดเวอร์ชันล่าสุดได้โดยตรงจาก 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>

ขั้นตอนในการแปลง STL เป็น PDF ผ่าน Java

  1. โหลดไฟล์ STL ด้วยวิธี Image.load
  2. ตั้งค่าวัตถุของ CadRasterizationOptions ด้วยความสูง & ความกว้างของหน้า
  3. สร้างอินสแตนซ์ของคลาส PdfOptions และตั้งค่าคุณสมบัติ VectorRasterizationOptions
  4. เรียกเมธอด Image.save ขณะส่งพาธไฟล์ผลลัพธ์ & ออบเจ็กต์ของ PdfOptions

ข้อกำหนดการแปลง

- Microsoft Windows หรือ OS ที่เข้ากันได้กับ Java Runtime Environment สำหรับแอปพลิเคชัน JSP/JSF และแอปพลิเคชันเดสก์ท็อป - รับ Aspose.CAD เวอร์ชันล่าสุดสำหรับ Java โดยตรงจาก Maven
 

STL เป็น PDF Java Conversion Source Code

// load STL in an instance of Image via its Load method
Image image = Image.load("template.stl");
// 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 STL to PDF
image.save("output.pdf", options);
 

แอพฟรีเพื่อแปลง STL เป็น PDF

Convert STL 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 STL file, it will be converted instantly to PDF.
  You will get the download link.