Hello all,
We are experiencing issues with file conversion when using Aspose.Words within .net C#.
The integration was relatively seemless and intial testing showed excellent results. However after deployment the client has noticed that many of their documents fail what we could call acceptable conversion standards.
When converting to PDF i have noted:
Images are over-run with text, as are text based tabled.
Table of contents pages are re-numbered to incorrect pages numbers.
Some images are missing completely.
And i am aware that the client is experiencing other issues as well, this is only what I have found within the sample document they have provided.
HTML coversions are mostly flawless with the exception of Table of Contents aligning to the right for certain sections, but otherwise it is acceptable.
My main query is this, does Aspose support a more direct conversion method that we are not using. Direct printing to PDF renders the results much better, this does not, however, integrate well with our requirements.
Kind Regards,
Thomas Knight - Lead Developer.
Sample Images (Converted version on right):
http://www.objectify.com.au/temp2/asposeSamples/2.jpg
- Overrun field area
http://www.objectify.com.au/temp2/asposeSamples/3.jpg
- Incorrect page numbers
http://www.objectify.com.au/temp2/asposeSamples/4.jpg
- More incorrect page numbers in appendixes
http://www.objectify.com.au/temp2/asposeSamples/5.jpg
- Overrun image
http://www.objectify.com.au/temp2/asposeSamples/HTML_TOC.jpg
- HTML TOC sample (Conversion only, refer to 3.jpg for original)
Sample Code Snippet:
void init()
{
License.InitLicenses();
}
…
…
…
public static byte[] ConvertToPDF(byte[] originalDoc)
{
MemoryStream ms = new MemoryStream(originalDoc);
Aspose.Words.Document doc = new Aspose.Words.Document(ms);
MemoryStream stream = new MemoryStream();
doc.SaveOptions.ExportImagesFolder = getTempFolder().FullName;
doc.Save(stream, SaveFormat.AsposePdf);
stream.Seek(0, SeekOrigin.Begin);
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(stream);
Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();
pdf.IsImagesInXmlDeleteNeeded = true;
pdf.BindXML(xmlDoc, null);
pdf.IsTruetypeFontMapCached = false;
byte[] output = pdf.GetBuffer();
return output;
}