GetContent

Watermarker.GetContent<T> method

반환Content 로드된 문서의 개체.

public T GetContent<T>()
    where T : Content
모수 설명
T 요청된 유형의Content 물체.

반환 값

그만큼Content 로드된 문서의 개체입니다.

워터마크가 추가된 PDF 문서 페이지 래스터화.

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();
}

또한보십시오