[英]How can I get all unloaded images in word document using Aspose.Word
我已經解決了我的問題。 我在這里發布我的答案,也許對其他人有幫助。
var doc = new Document();
var shapeCollection = doc.GetChildNodes(Word.NodeType.Shape, true);
// getting all images from Word document.
foreach (Shape shape in shapeCollection)
{
if (shape.ShapeType == ShapeType.Image)
{
//Unloaded image alwasy have 924 imagebytes
if (shape.ImageData.ImageBytes.Length == 924)
{
shape.Width = 72.0;
shape.Height = 72.0;
}
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.