Aspose PDF Output Cannot Be Viewed

We have several PDFs that are be generated via Aspose through the DOC to PDF conversion Aspose supports. Many of them work fine, but we have several that are posing us problems when viewed in Oracle’s Imaging system. While experimenting, we have found that opening the Aspose converted version of the PDF in Adobe Acrobat Pro and, without making any changes, saving it via Adobe Acrobat Pro to another document causes the new document to be readable in Oracle’s imaging system.


I have attached the Aspose version and the resaved version of one of the PDFs in hopes that you could direct me to what might be going wrong here. If there is something we can do via the Aspose API to fix it, an Aspose fix that needs to be made, or a change in the Word document formatting that may change the way the PDF is generated.

Thank you for your help in this matter.

Hello Mark,

Can you please share some information regarding your working environment, the method you are using to generate the PDF files i.e. either you are using the direct to PDF save method of Aspose.Words or you are using the conventional method of converting word files into PDF using Aspose.Pdf and Aspose.Words.

Please share the version of Aspose products that you are using, and also share some sample word files for which you are facing problem, so that we can test the issue at our end.

We apologize for your inconvenience.

Thanks for your help. We use Aspose.Words to do a mail-merge on the word doc and then use Aspose.Pdf to convert it to PDF. I’ve attached to Word doc that it begins from. The Pdf conversion is done using the following code:

using (MemoryStream mergedStream = new MemoryStream())
{
// save to special pdf/xml format
doc.Save(mergedStream, SaveFormat.AsposePdf);
//Seek to the beginning so it can be read by XmlDocument.
mergedStream.Seek(0, SeekOrigin.Begin);
//Load the document into an XmlDocument
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(mergedStream);
//Load the XML document into Aspose.Pdf
Pdf pdf = new Pdf();
//Make sure the images that were saved by Aspose.Words into Windows temporary
//folder are automatically deleted by Aspose.Pdf when they are no longer needed.
pdf.IsImagesInXmlDeleteNeeded = true;
pdf.BindXML(xmlDoc, null);
//*** Aspose.Pdf font cache, see comments below.
pdf.IsTruetypeFontMapCached = false;
//If you convert to PDF multiple files in your application,
//uncomment the following lines to improve the speed of conversion.
//pdf.IsTruetypeFontMapCached = true;
//pdf.TruetypeFontMapPath = <some path where you have read/write access>
//Now produce the PDF file.
pdf.Save(docDataStream);
numberOfPages = pdf.PageCount;
}

Hello Mark,

Sorry for replying to you so late.

I am afraid setting up an Oracle Imaging system is quite difficult and time-consuming.

Besides this, I’ve tried converting the shared document file into PDF using Aspose.Pdf 4.0.0.0 and Aspose.Words 6.4.0.0. Can you please try opening this file at your end and see if the issue still occurs?

Thank you for your help in this matter. We have figured out the issue now. The reason for this was that the logo was added into
the template as a ‘Bitmap Image Object’ rather than a normal image.
Removing the logo or replacing it with an Image rather than an object allows
Oracle I/PM to view the document normally after Aspose creates it.