English | 日本
BCL Technologies
Shopping CartContact Us
BCL easyPDF SDK

Processing PDF Form Fields in C++

Benefits

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

Sample Projects

Code Snippet

Download the input.pdf form (highlighted below)

// this example takes the first two fields in a PDF template
// which are Name and Address
// and populates them with values of "BCL Technologies" and "Santa Clara, CA"
 
EasyPDFDocument::IPDFDocumentPtr oDocument;
oDocument.CreateInstance("easyPDF.PDFDocument.7");
 
oDocument->Open("C:\\input.pdf");
 
// get all form fields from the PDF
EasyPDFDocument::IFormFieldsPtr oFormFields = oDocument->FormFields;
 
// get the first form field
EasyPDFDocument::IFormFieldPtr oFormField = oFormFields->Item[0];
 
EasyPDFDocument::ITextFieldPtr oTextField;
 
if (oFormField->Type == EasyPDFDocument::DOC_FRMTYPE_TEXT && oFormField->Name == _bstr_t("Name"))
	{
	// set Name to "BCL Technologies"
	oTextField = oFormField;
	oTextField->Value = "BCL Technologies";
	}
 
// get the second form field
oFormField = oFormFields->Item[1];
 
if (oFormField->Type == EasyPDFDocument::DOC_FRMTYPE_TEXT && oFormField->Name == _bstr_t("Address"))
	{
	// set Address to "Santa Clara, CA"
	oTextField = oFormField;
	oTextField->Value = "Santa Clara, CA";
	}
	oDocument->SaveAs("C:\\output.pdf");
                  

 

Download Free Trial

Request Pricing

Comprehensive PDF Features
C++ Sample Projects

Download C++ Sample Projects

screenshot

Documentation
Testimonials from Our Customers
  • We use easyPDF SDK technology for PDF conversion and it works very well. We knew BCL is a solid company. We have also looked at several competitors and tried to use their products, but we like easy PDF SDK the best. When we talked to BCL Technologies’ design engineering team, we knew they had the knowledge and confidence to solve our problems.” 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
-
 
BCL
© 1993 - , BCL Technologies.
All other trademarks are the property of their respective owners.