Automatic page orientation stopped working for XLSX to PDF conversion .NET

Automatic detection of page orientation seems to have stopped working in version 24.4 or 24.5 of GroupDocs.Conversion.
Previously, converting some Excel file to PDF was respecting the orientation configured in the workseeht.
With 24.5 (or 24.4) it only seems to consider the “Orientation” option of “PdfConvertOptions”.

Excel orientation problem.zip (137.3 KB)

Setting ‘Orientation’ to null did not have any effect either.
Can you please take a look a the issue?

1 Like

@Clemens_Pestuka

Could you please share the complete conversion code?
Secondly, if we look at Portrait.xlsx, in Protrait24.3.pdf the last column is extended to second page but in Portrait24.5.pdf all columns are properly rendered. Could you please highlight the issue as well? We’ll appreciate your cooperation in this regard.

1 Like

@atir.tahir

I’ve heard from Paid support, that they have reproduced the problem already.

We’re using just minimal conversion code as well in most cases.
We have an optional parameter for PDFA format and for “forcing” landscape orientation:

        var options = new PdfConvertOptions();
        if (convParams.Format == GroupDocsConvertFormat.PDFA)
        {
            options.PdfOptions = new PdfOptions()
            {
                PdfFormat = ConvOpts.PdfFormats.PdfA_1B
            };
        };
        if (convParams.ForceLandscape)
        {
            options.PageOrientation = PageOrientation.Landscape;
        }

        var settings = new ConverterSettings();
        settings.FontDirectories.Clear();
        using (var conv = new Converter(sInputFile, () => settings))
        {
            conv.Convert(sOutputFile, options);
        }

Yes, I’ve noticed this as well and I prefer the way it works in 24.5 now.
There is no problem with Portrait mode, only with Landscape conversion.
I should not have included this conversion attempt in the ZIP, sorry for the confusion.

@Clemens_Pestuka

Thanks for the clarification.

Paid support team will notify you as there’s any further progress.

1 Like