การส่งออก PLT เป็นภาพ
ส่งออก PLT เป็นภาพ
Aspose.CAD สำหรับ .NET ช่วยให้นักพัฒนาสามารถเรนเดอร์ไฟล์ PLT เป็น JPEG ได้ ต่อไปนี้คือโค้ดที่แสดงให้เห็นว่าคุณจะเข้าถึงไฟล์ PLT และแปลงเป็น JPEG โดยใช้ CadRasterizationOption และ JpegOptions.
// The path to the documents directory. | |
string MyDir = RunExamples.GetDataDir_PLTDrawings(); | |
string sourceFilePath = MyDir + "50states.plt"; | |
using (Image cadImage = Image.Load(sourceFilePath)) | |
{ | |
ImageOptionsBase imageOptions = new JpegOptions(); | |
CadRasterizationOptions options = new CadRasterizationOptions | |
{ | |
PageHeight = 500, | |
PageWidth = 1000, | |
}; | |
imageOptions.VectorRasterizationOptions = options; | |
cadImage.Save(MyDir+ "50states.jpg", imageOptions); | |
} |
ส่งออก PLT เป็น PDF
Aspose.CAD สำหรับ .NET ช่วยให้นักพัฒนาสามารถเรนเดอร์ไฟล์ PLT เป็น PDF ได้ ต่อไปนี้คือโค้ดที่แสดงให้เห็นว่าคุณจะเข้าถึงไฟล์ PLT และแปลงเป็น PDF โดยใช้ CadRasterizationOption และ PdfOptions.
// The path to the documents directory. | |
string MyDir = RunExamples.GetDataDir_PLTDrawings(); | |
string sourceFilePath = MyDir + "50states.plt"; | |
using (Image cadImage = Image.Load(sourceFilePath)) | |
{ | |
CadRasterizationOptions options = new CadRasterizationOptions | |
{ | |
PageHeight = 1600, | |
PageWidth = 1600, | |
DrawType= CadDrawTypeMode.UseObjectColor, | |
BackgroundColor=Color.White | |
}; | |
PdfOptions pdfOptions = new PdfOptions(); | |
pdfOptions.VectorRasterizationOptions = options; | |
cadImage.Save(MyDir+ "50states.pdf", pdfOptions); | |
} |