Foxit PDF SDK for Web

How to Create Stamp Annotations with Foxit PDF SDK for Web

The stamp annotation feature displays text or graphics intended to look as if they were stamped on the page with a rubber stamp.

Foxit PDF SDK for Web allows you to use this feature by adding the simple code below:

//add stamp resource to pdfui
pdfui.addIcon({
 annotType: "Stamp",
 catagory: "catagory",
 name: "customStampName1",
 fileType: "png",
 url: "http://localhost:8780/docs/test.png"
})
//add this stamp to the page
pdfDoc.getPageByIndex(0).then(page=>{
 page.addAnnot({type: "stamp",
 rect: {bottom: 580,left: 58,right: 280,top: 630},
 //Use the parameter 'name' of the addIcon method
 icon: "customStampName1",
 //Use the parameter 'catagory' of the addIcon method
 iconCatalog: "catagory"
 })
})

Updated on August 21, 2019

Was this article helpful?
Thanks for your feedback. If you have a comment on how to improve the article, you can write it here: