FieldIncludePictureIsLinked Property
Gets or sets whether to reduce the file size by not storing graphics data with the document.

Namespace: Aspose.Words.Fields
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.12
public bool IsLinked { get; set; }

Property Value

Type: Boolean
Shows how to insert images using IMPORT and INCLUDEPICTURE fields.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

FieldIncludePicture fieldIncludePicture = (FieldIncludePicture)builder.InsertField(FieldType.FieldIncludePicture, true);
fieldIncludePicture.SourceFullName = MyDir + @"Images\Watermark.png";

// Here we apply the PNG32.FLT filter
fieldIncludePicture.GraphicFilter = "PNG32";
fieldIncludePicture.IsLinked = true;
fieldIncludePicture.ResizeHorizontally = true;
fieldIncludePicture.ResizeVertically = true;

// We can do the same thing with an IMPORT field
FieldImport fieldImport = (FieldImport)builder.InsertField(FieldType.FieldImport, true);
fieldImport.GraphicFilter = "PNG32";
fieldImport.IsLinked = true;
fieldImport.SourceFullName = MyDir + @"Images\Watermark.png";

doc.Save(ArtifactsDir + "Field.IncludePicture.docx");
See Also