eForm Stamp Example

ABCpdf .net

 
   

This example shows how to stamp eForm fields into a document so that the values are indelibly marked

 

   
Src  

First we create an ABCpdf Doc object and read in our template form.

[C#]
Doc theDoc = new Doc();
theDoc.Read(Server.MapPath("../mypics/form.pdf"));
theDoc.Font = theDoc.AddFont("Helvetica-Bold");

[Visual Basic]
Dim theDoc As Doc = New Doc()
theDoc.Read(Server.MapPath("../mypics/form.pdf"))
theDoc.Font = theDoc.AddFont("Helvetica-Bold")

 

   

Add
 

We set the values of selected fields and then we stamp all field values into the document.

[C#]
theDoc.Form["Day"].Value = "23";
theDoc.Form["Month"].Value = "February";
theDoc.Form["Year"].Value = "2005";
theDoc.Form["State"].Value = "Arizona";
theDoc.Form.Stamp();

[Visual Basic]
theDoc.Form("Day").Value = "23"
theDoc.Form("Month").Value = "February"
theDoc.Form("Year").Value = "2005"
theDoc.Form("State").Value = "Arizona"
theDoc.Form.Stamp()

 

   

Save
 

Finally we save.

[C#]
theDoc.Save(Server.MapPath("eformstamp.pdf"));

[Visual Basic]
theDoc.Save(Server.MapPath("eformstamp.pdf"))

 

   

Results
 

Given the following document.


form.pdf

This is the kind of output you might expect.


eformstamp.pdf