Free Support Forum - aspose.com

Can't convert word document to PDF with Aspose.Words 7.0.0 (works with 5.3.0)

Hi,

When trying to convert the attached file to PDF I get an exception (see below).

I’m now using Aspose.Words 7.0.0. Testing with Aspose.Words 5.3.0 it works fine.

My code is the following:

Aspose.Words.Document doc = new Aspose.Words.Document(fileStream);
using (MemoryStream stream = new MemoryStream())
{
document.SaveToPdf(0, document.PageCount, stream, new PdfOptions());

array = stream.GetBuffer();
}

The exception I’m getting is the following:

Exception occurred. Parameters: DocID=581. Details: Buffer cannot be null. Parameter name: buffer Stack: at System.IO.MemoryStream…ctor(Byte[] buffer, Boolean writable) at System.IO.MemoryStream…ctor(Byte[] buffer) at ?.?.?(Fill ?) at ?.?.get_?() at ?.?.get_?() at ?.?.get_?() at ?.?.?(? ?, Int32 ?) at ?.?.?(? ?, Int32& ?) at ?.?.?(Shape ?, Matrix ?, Single ?, Single ?, Single ?) at ?.?.?(ShapeBase ?) at ?.?.?(ShapeBase ?, PointF ?, Color ?, ? ?) at ?.?.?(Boolean ?, ? ?) at ?.?.?() at ?.?.?(ShapeBase ?, Shape ?, ? ?, SizeF ?, Color ?) at ?.?.?(String ?, Shape ?, ? ?, SizeF ?) at ?.?.?(Shape ?) at ?.?.?(Shape ?) at ?.?.?(Shape ?) at ?.?.?(Shape ?) at ?.?.VisitShapeStart(Shape shape) at Aspose.Words.Drawing.Shape.Accept(DocumentVisitor visitor) at Aspose.Words.CompositeNode.?(DocumentVisitor ?) at Aspose.Words.Paragraph.Accept(DocumentVisitor visitor) at Aspose.Words.CompositeNode.?(DocumentVisitor ?) at Aspose.Words.Body.Accept(DocumentVisitor visitor) at ?.?.?(Section ?) at ?.?.<(? >) at Aspose.Words.Document.?(Stream ?, String ?, SaveFormat ?) at Aspose.Words.Document.Save(Stream stream, SaveFormat saveFormat)

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is fixed.

Best regards,

The issues you have found earlier (filed as 10996) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.