Learn how to remove watermarks from Word documents in Python
Created
April 16, 2024 04:20
-
-
Save aspose-com-gists/83d40dc2d5ad8588dcc0940ff1f6ad72 to your computer and use it in GitHub Desktop.
Remove Watermark from Word Document in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This code example demonstrates how to remove a text watermark from a Word document. | |
# Load a Watermarked Word document | |
doc = aw.Document("ImageWatermark.docx") | |
# Remove a text watermark from | |
if (doc.watermark.type == aw.WatermarkType.IMAGE) : | |
doc.watermark.remove() | |
# Save the file | |
doc.save("RemoveImageWatermark_out.docx") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This code example demonstrates how to remove a text watermark from a Word document. | |
# Load a Watermarked Word document | |
doc = aw.Document("WatermarkText.docx") | |
# Remove a text watermark from | |
if (doc.watermark.type == aw.WatermarkType.TEXT) : | |
doc.watermark.remove() | |
# Save the file | |
doc.save("RemoveWatermarkText_out.docx") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment