WatermarkerGetContentT Method |
Returns the
Content object for the loaded document.
Namespace: GroupDocs.WatermarkAssembly: GroupDocs.Watermark (in GroupDocs.Watermark.dll) Version: 20.7.0
Syntaxpublic T GetContent<T>()
where T : Content
Public Function GetContent(Of T As Content) As T
public:
generic<typename T>
where T : Content
T GetContent()
member GetContent : unit -> 'T when 'T : Content
Type Parameters
- T
- The requested type of a Content object.
Return Value
Type:
TThe
Content object for the loaded document.
Examples
Rasterize pdf document page with added watermark.
PdfLoadOptions loadOptions = new PdfLoadOptions();
using (Watermarker watermarker = new Watermarker(@"C:\doc.pdf", loadOptions))
{
using (ImageWatermark watermark = new ImageWatermark(@"C:\watermark.png"))
{
watermarker.Add(watermark);
}
PdfContent content = watermarker.GetContent<PdfContent>();
content.Rasterize(300, 300, PdfImageConversionFormat.Png);
watermarker.Save();
}
See Also