FieldImportSourceFullName Property |
Namespace: Aspose.Words.Fields
Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); FieldIncludePicture fieldIncludePicture = (FieldIncludePicture)builder.InsertField(FieldType.FieldIncludePicture, true); fieldIncludePicture.SourceFullName = ImageDir + "Transparent background logo.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\Transparent background logo.png"; doc.UpdateFields(); doc.Save(ArtifactsDir + "Field.INCLUDEPICTURE.docx");