Hello.
Thank you for additional information. Unfortunately I was unable to reproduce your problem (Aspose.Words 9.7.0.0). I used the following code:
License license = new License();<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
license.SetLicense("Aspose.Words.lic");
Document doc = new Document("E:\\test2.docx");
// Save document as DOC in memory
MemoryStream stream = new MemoryStream();
doc.Save(stream, SaveFormat.Doc);
// 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;
}
else
{
shape.WrapType = Aspose.Words.Drawing.WrapType.None;
shape.ZOrder = 1;
}
}
MemoryStream msPdf = new MemoryStream();
doc2.Save(msPdf, SaveFormat.Pdf);
Response.ContentType = "application/pdf";
Response.BinaryWrite((byte[])msPdf.ToArray());
Response.End();
See the attached file test2.pdf.