PLT Drawings
Export PLT to Image
Aspose.CAD for .NET allows developers to render PLT files to JPEG. Following is the code demonstrating how to access the PLT file and convert that to JPEG using CadRasterizationOption and 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); | |
} |
Export PLT to PDF
Aspose.CAD for .NET allows developers to render PLT files to PDF. Following is the code demonstrating how to access the PLT file and convert that to PDF using CadRasterizationOption and 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); | |
} |