BCL Technologies

we know PDF ..... inside and out

BCL easyPDF SDK

Processing PDF Form Fields in ASP.NET

Benefits

  • Extract, insert, and update data in PDF Forms.

Code Snippet

Download the input.pdf form (line 27 below)

  1. ...
  2. 'this example takes the first two fields in a PDF template
  3. 'which are Name and Address and populates them with values
  4. 'of "BCL Technologies" and "Santa Clara, CA"
  5. Dim oLoader As Loader = Server.CreateObject("easyPDF.Loader.7")
  6. Dim oConverter As PDFDocument = oLoader.LoadObject("easyPDF.PDFDocument.7")
  7. oDocument.Open(Server.MapPath("../input.pdf"))
  8. 'get all form fields from the PDF
  9. Dim oFormFields As FormFields = oDocument.FormFields
  10. 'get the first form field
  11. Dim oFormField As FormField = oFormFields.Item(0)
  12. Dim oTextField As TextField
  13. If oFormField.Type = docFormFieldType.DOC_FRMTYPE_TEXT And oFormField.Name = "Name" Then
  14. 'set Name to "BCL Technologies"
  15. oTextField = oFormField
  16. oTextField.Value = "BCL Technologies"
  17. End If
  18. 'get the second form field
  19. oFormField = oFormFields.Item(1)
  20. If oFormField.Type = docFormFieldType.DOC_FRMTYPE_TEXT And oFormField.Name = "Address" Then
  21. 'set Address to "Santa Clara, CA"
  22. oTextField = oFormField
  23. oTextField.Value = "Santa Clara, CA"
  24. End If
  25. oDocument.SaveAs(Server.MapPath("./output.pdf"))

Request Pricing

PDF Features

Documentation

Testimonials from Our ASP.NET Customers

"easyPDF SDK setup was very straightforward, unlike our experience with other products. We wrote just a few lines of code to start using it." Read the case study

"We evaluated many PDF tools and drivers. We even wrote our own. Except for BCL's easyPDF SDK, all had limitations we couldn’t live with. Some only converted from MS Office and not very well. Others could not do annotation or text stamping on PDF documents. None were as easy to use and as easy to integrate." Read the case study

© 1993 - , BCL Technologies.

All other trademarks are the property of their respective owners.