Word to pdf conversion error with big (1000px x 1000px) images on header

I have some word documents on an Oracle Database when they become final, I have to convert them to pdf files. I am using Aspose words for Java, works fine but when the header contains a big (1000px+) image the converted document’s header comes out with a distorted black version of the image.

Small images work fine.

Aspose Words v10.

Anybody seen this before? any parameters to correct it?

Thanks,

PDF conversion code:

private static ByteArrayOutputStream convert_DOCX_PDF(InputStream documento_DOCX) throws Exception
{
ByteArrayOutputStream resultado_doc = new ByteArrayOutputStream();
if (documento_DOCX != null)
{
// Document to memory.
Document documento = new Document(documento_DOCX);

// adding PDF options.
PdfOptions opciones = new PdfOptions();

//OS.
String os = System.getProperty(“os.name”).toLowerCase();

//if it’s linux or unix.
if(os.indexOf( “nix”) >=0 || os.indexOf( “nux”) >=0){
//Relative to absolute path.
String ruta = FacesUtils.ConvertirRutas("/fonts");
opciones.setTrueTypeFontsFolder(ruta);
}
// PDF conversion.
documento.saveToPdf(0,documento.getPageCount(), resultado_doc, opciones);
}
else
{
// if empty.
throw new Exception(“No se puede convertir a PDF, el documento no posee valores.”);
}
return resultado_doc;
}

Hi
Alberto,


Thanks for your inquiry.

You’re using an older version of Aspose.Words. With Aspose.Words v11.1.0, I was unable to reproduce this issue on my side. I would suggest you please upgrade to the latest version of Aspose.Words i.e. v11.1.0. Moreover, please read the following article on How-to: Migrate to Aspose.Words 10.5 or Higher:

I hope, this will help.

Best Regards,