Gdpicture. in addition to document display, Twain Scanning Image Acquisition, image processing, and optical character recognition, net can also add watermarks to documents. The following describes how to use gdpicture.. net adds a watermark to a PDF file.CodeExample:
"Download the gdpicture. Net trial version.
Const text as string = "watermark" const textsize as integer = 100 const rotation as single = 320 'note: rotation is anti-clockwise const font as string = "Arial" using gdpicturepdf as new gdpicturepdf. loadfromfile ("C: \ inputexample", false) gdpicturepdf. setmeasurementunit (gradient measurementunit. pdfmeasurementunitpoint) gdpicturepdf. selectpage (1) Using gdpicturepdfback as new gdpicturepdf gdpicturepdfback. newpdf () dim pagewidth as single = gdpicturepdf. getpagewidth () dim pageheight as single = gdpicturepdf. getpageheight () gdpicturepdfback. clonepage (gdpicturepdf, 1) gdpicturepdf. setorigin (pdforigin. pdforigintopleft) gdpicturepdf. clearpagecontent () dim fontresname as string = gdpicturepdf. addtruetypefont (font, true, false, false) gdpicturepdf. settextsize (textsize) gdpicturepdf. drawrotatedtext (fontresname, 0, gdpicturepdf. gettextheight (fontresname, textsize), text, rotation) gdpicturepdf. savegraphicsstate () gdpicturepdf. setblendmode (pdfblendmode. pdfblendmodenormal) gdpicturepdf. setfillalpha (200) dim status as gdpicturestatus = gdpicturepdf. drawpage (gdpicturepdfback, 1, 0, pageheight, pagewidth, pageheight) gdpicturepdf. resetgraphicsstate () gdpicturepdf. savetofile ("C: \ output.pdf") End using end using