ODG to PDF conversion issue throws exception (C# .NET)

Hello,

Open Office’s *.odg format is in the Apose.Imaging’s supported formats list
We created one and tried to convert it to PDF and it fails

File example: ODG_file.odg.zip (219.0 KB)

Code example

        public void FileToPdf(Stream input, Stream output)
    {
        using (var image =  Image.Load(input))
        {
            var exportOptions = new PdfOptions
            {
                PdfDocumentInfo = new Aspose.Imaging.FileFormats.Pdf.PdfDocumentInfo()
            };

            image.Save(output, exportOptions);
        }
    }

Online converter also return us 500 error.

Thanks!

@gwert,

I have worked with sample file shared and have created an issue with ID IMAGINGNET-3823 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

@gwert,

In order to process the ODG files you mustt use VectorRasterizationOptions class. I suggest you to please try using following sample code on your end.

    public void FileToPdf(Stream input, Stream output)
    {
        using (var image = Image.Load(input))
        {
            var exportOptions = new PdfOptions
            {
                PdfDocumentInfo = new Aspose.Imaging.FileFormats.Pdf.PdfDocumentInfo(),
                VectorRasterizationOptions = new OdRasterizationOptions(){PageSize = image.Size}                    
            };

            image.Save(output, exportOptions);
        }
    }