Free Support Forum - aspose.com

Error saving to PDF

I was saving a word document to a PDF and got the following error. Can you tell me what it means?

Error during processing of Word Document
Error Messages - The record is expected to be a shape container.
Stack Trace - at Aspose.Escher.x.a(am A_0)
at Aspose.Escher.x.a(am A_0, Byte[]& A_1, ImageFormat& A_2)
at Aspose.Word.Writer.c.a(am A_0, Boolean A_1, Int32 A_2, Int32 A_3, String& A_4, ImageFormat& A_5)
at Aspose.Word.Writer.Pdf.e.a(am A_0, z A_1, Int32 A_2)
at Aspose.Word.Writer.Pdf.e.b(t A_0)
at Aspose.Word.Model.t.a(Object A_0)
at Aspose.Word.Model.d.b(Object A_0)
at Aspose.Word.Model.z.a(Object A_0)
at Aspose.Word.Model.d.b(Object A_0)
at Aspose.Word.Model.a.a(Object A_0)
at Aspose.Word.Model.d.b(Object A_0)
at Aspose.Word.Model.h.a(Object A_0)
at Aspose.Word.Model.d.b(Object A_0)
at Aspose.Word.Model.d.a(Object A_0)
at Aspose.Word.Model.p.a(Object A_0)
at Aspose.Word.Model.d.b(Object A_0)
at Aspose.Word.Model.q.a(Object A_0)
at Aspose.Word.Model.d.b(Object A_0)
at Aspose.Word.Model.g.a(Object A_0)
at Aspose.Word.Model.d.b(Object A_0)
at Aspose.Word.Model.d.a(Object A_0)
at Aspose.Word.Model.d.b(Object A_0)
at Aspose.Word.Model.d.a(Object A_0)
at Aspose.Word.Model.i.a(Object A_0)
at Aspose.Word.Writer.Pdf.e.a()
at Aspose.Word.Writer.Pdf.e.a(i A_0, String A_1)
at Aspose.Word.Document.Save(String fileName, SaveFormat fileFormat)
at PHGWord.PHGAspose.GenerateAsposeWord(String DocumentName, String Identifier, String FacilityID, String Printer) in C:\Data\VS.NET Projects\Testing\EasyPRINT\Libraries\PHGWord\PHGAspose.vb:line 41
at PHGWord.CWordManager.ProcessWordDocument(Object Queue, Boolean Aspose) in C:\Data\VS.NET Projects\Testing\EasyPRINT\Libraries\PHGWord\CWordManager.vb:line 391
at PHGForm.CTask.PrintWord(String PrintDocument, Boolean& PrintToPrinter, Boolean& PrintToPDF, Boolean& SaveToFile, Boolean& PrintToImage) in C:\Data\VS.NET Projects\Testing\EasyPRINT\Libraries\PHGForm\CTask.vb:line 966

This is an internal error, caused by some strange structure of your document that 
Aspose.Word cannot deal with. Please email your document to word@aspose.com
and we will address the issue.

I get this same message tring to save a word document to html format. The “The record is expected to be a shape container” part anyway. I’m using the current eval version 2.0.4.0. Has this been addressed?

If you send the file to me to word@aspose.com we will address it asap. Thanks.

Hi Don,

In Aspose.Word 2.0.6 I’ve fixed the exception is no longer thrown and the drawing objects and group shapes are silently ignored when exporting to PDF.

Aspose.Word cannot export all drawing objects, into PDF, it can only export images at the moment.

Even if you ungroup your shape, it consists of several drawing shapes (rectangles) and a WordArt object.

You need to convert your shapes into a picture (or redraw them as a picture) and insert the picture into the document if you want to be able to export it into PDF successfully.