Rysunki PLT
Eksportuj PLT do obrazu
Aspose.CAD dla .NET umożliwia programistom renderowanie plików PLT do formatu JPEG. Poniżej znajduje się kod ilustrujący, jak uzyskać dostęp do pliku PLT i przekonwertować go na JPEG za pomocą CadRasterizationOption oraz 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); | |
} |
Eksportuj PLT do PDF
Aspose.CAD dla .NET umożliwia programistom renderowanie plików PLT do formatu PDF. Poniżej znajduje się kod ilustrujący, jak uzyskać dostęp do pliku PLT i przekonwertować go na PDF za pomocą CadRasterizationOption oraz 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); | |
} |