I am trying to convert some of the CDR files to PDF using asose imaging .net library 20.11. PDF generated are corrupted in most of the cases or not containing the correct output .
Please download the unsupported files from the following link:
https://drive.google.com/drive/folders/1NSqEcbvhKCn9MNLkZHOVI6FQUppkfNbC?usp=sharing
There a file in that link name as Rajgan Auto. When i tried to convert it it’s generating the pdf but output in PDF is not correct. For rest of the files in folder corrupt PDF is generated.
Using the following source code for converting files:
Source Code:
using (var img = Aspose.Imaging.Image.Load(filePath + “.cdr”))
{
CdrRasterizationOptions rasterizationOptions = new CdrRasterizationOptions();
rasterizationOptions.PageWidth = img.Width;
rasterizationOptions.PageHeight = img.Height;
// Save image to Pdf
PdfOptions exportOptions = new PdfOptions();
exportOptions.VectorRasterizationOptions = rasterizationOptions;
img.Save(filePath + ".pdf", exportOptions);
return filePath + ".pdf";
}