Some test text!



Stamp a PDF Page

A stamp in a PDF document is analogous to applying a rubber stamp on a paper document.

PDFTron SDK benefits include:

  • Stamp PDF pages with text, images, or with other PDF pages.
  • Embed fonts and images and how to copy graphical elements from one page to another.

linkStamp a PDF Page

To stamp an image to a page in a PDF document.

Stamper can be used to PDF pages with text, images, or with other PDF content in only a few lines of code. Although Stamper is very simple to use compared to ElementBuilder/ElementWriter it is not as powerful or flexible. In case you need full control over PDF creation use ElementBuilder/ElementWriter to add new content to existing PDF pages as shown in the ElementBuilder sample project.

PDFDoc doc = new PDFDoc(input_path + input_filename + ".pdf");
Stamper s = new Stamper(Stamper.SizeType.e_relative_scale, .05, .05)

Image img = Image.Create(doc, input_path + "peppers.jpg");
s.SetSize(Stamper.SizeType.e_relative_scale, 0.5, 0.5);

// set position of the image to the center, left of PDF pages
s.SetAlignment(Stamper.HorizontalAlignment.e_horizontal_left, Stamper.VerticalAlignment.e_vertical_center);
s.SetFontColor(new ColorPt(0, 0, 0, 0));

// only stamp first page
s.StampImage(doc, img, new PageSet(1));

Stamp a PDF File
Full code sample which shows how to stamp PDF pages with text, images, or with other PDF pages and how to add new content (or watermark).

Get the answers you need: Support


Stamp a PDF Page