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