PLT Çizimleri
PLT’yi Görüntüye Aktar
Aspose.CAD for .NET, geliştiricilerin PLT dosyalarını JPEG’e dönüştürmelerine olanak tanır. Aşağıda, PLT dosyasına nasıl erişileceğini ve bunu JPEG’e dönüştürmek için CadRasterizationOption ve JpegOptions kullanarak nasıl yapılacağını gösteren kod bulunmaktadır.
// 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’yi PDF’ye Aktar
Aspose.CAD for .NET, geliştiricilerin PLT dosyalarını PDF’ye dönüştürmelerine olanak tanır. Aşağıda, PLT dosyasına nasıl erişileceğini ve bunu PDF’ye dönüştürmek için CadRasterizationOption ve PdfOptions kullanarak nasıl yapılacağını gösteren kod bulunmaktadır.
// 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); | |
} |