Thank you for additional information. Unfortunately I was unable to reproduce your problem (Aspose.Words 126.96.36.199). I used the following code:
License license = new License();<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Document doc = new Document("E:\\test2.docx");
// Save document as DOC in memory
MemoryStream stream = new MemoryStream();
// Reload document as DOC to extract images.
Document doc2 = new Document(stream);
NodeCollection shapes = doc2.GetChildNodes(NodeType.Shape, true);
foreach (Aspose.Words.Drawing.Shape shape in shapes)
if (shape.ShapeType == Aspose.Words.Drawing.ShapeType.TextBox)
shape.ZOrder = 2;
shape.WrapType = Aspose.Words.Drawing.WrapType.None;
shape.ZOrder = 1;
MemoryStream msPdf = new MemoryStream();
Response.ContentType = "application/pdf";
See the attached file test2.pdf.