DOCX to PDF file conversion gets one page more

U-RT-50-E-0003-0.zip (8.1 MB)

I currently have aspose.total in version 17.11.0 and am converting the attached docx file to pdf as follows

using (MemoryStream msOrigem = new MemoryStream(arquivoOrigem))
{
using (MemoryStream msPDF = new MemoryStream())
{
if (!string.IsNullOrEmpty(extensao))
{
try
{
if (extensao.ToUpper() == “.DOC” || extensao.ToUpper() == “.DOCX”)
{
Aspose.Words.License license = new Aspose.Words.License();
license.SetLicense(“Aspose.Total.lic”);

                            //Export the DOC to PDF                               
                            Aspose.Words.Document document = new Aspose.Words.Document(msOrigem);

                            //Ajuste do tamanho das páginas
                            foreach (Aspose.Words.Section section in document.Sections)
                            {
                                section.PageSetup.PaperSize = document.Sections[0].PageSetup.PaperSize;
                            }

                            document.Save(msPDF, Aspose.Words.SaveFormat.Pdf);
                        }
                    }
                    catch (Exception ex)
                    {
                        return GerarPDFErro();
                    }
                }

                return msPDF.ToArray();
            }
        }

The problem is that with this file attached you are freezing one page more than the original when converted to pdf.

I tested the same file with the newer version, with a temporary license and the same problem occurred.

I await a return

@bresol,

Thanks for reporting this problem to us. We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-19405. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-19405) have been fixed in this Aspose.Words for .NET 20.5 update and this Aspose.Words for Java 20.5 update.