Some test text!
A stamp in a PDF document is analogous to applying a rubber stamp on a paper document.
PDFTron SDK benefits include:
To stamp an image to a page in a PDF document.
PDFDoc doc = new PDFDoc(fileName); Stamper stamper = new Stamper(StamperSizeType.e_relative_scale, .05, .05); Image image = Image.Create(new SDFDoc(doc), imageName); stamper.SetSize(StamperSizeType.e_relative_scale, 0.5, 0.5); // set position of the image to the center, left of PDF pages stamper.SetAlignment(StamperHorizontalAlignment.e_horizontal_left, StamperVerticalAlignment.e_vertical_center); ColorPt colorPoint = new ColorPt(0, 0, 0, 0); stamper.SetFontColor(colorPoint); stamper.SetRotation(180); stamper.SetAsBackground(false); // only stamp first 2 pages PageSet pageSet = new PageSet(1, 2); stamper.StampImage(doc, image, pageSet);
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).
Stamper can be used for 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.
Get the answers you need: Support
Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.
Select a platform to get started with your free trial.
Unlimited usage. No email address required.