Returns: An instance of the appropriate descendant of Content.
Example
importgroupdocs.watermarkasgwimportgroupdocs.watermark.contents.pdfasgwc_pdfimportgroupdocs.watermark.watermarksasgwwwatermark=gww.TextWatermark("This is WaterMark on Attachment",gww.Font("Arial",19.0))withgw.Watermarker("document.pdf")aswatermarker:pdf_content=watermarker.get_content(gwc_pdf.PdfContent)forattachmentinpdf_content.attachments:withattachment.create_watermarker()asattached:attached.add(watermark)attached.save()```## create_watermarker {#load_options}Loadsacontentfromtheattachedfilewiththespecifiedloadoptions.```pythondefcreate_watermarker(self,load_options):...
Parameter
Type
Description
load_options
LoadOptions
Additional options to use when loading an attachment content.
Returns: Content: The instance of appropriate descendant of Content class.
Example
importgroupdocs.watermarkasgwimportgroupdocs.watermark.contents.pdfasgwc_pdfimportgroupdocs.watermark.watermarksasgwwfromgroupdocs.watermark.commonimportFileTypewatermark=gww.TextWatermark("This is WaterMark on Attachment",gww.Font("Arial",19.0))load_options=gw.PdfLoadOptions()withgw.Watermarker("document.pdf",load_options)aswatermarker:pdf_content=watermarker.get_content(gwc_pdf.PdfContent)forattachmentinpdf_content.attachments:info=attachment.get_document_info()ifinfo.file_type!=FileType.UNKNOWNandnotinfo.is_encrypted:withattachment.create_watermarker()asattached:attached.add(watermark)attached.save()watermarker.save("document.pdf")
create_watermarker
Loads a content from the attached file with the specified load options and settings.