Create Interactive Forms with VeryPDF PDF AcroForm Creator API

As the world continues to move towards digitalization, businesses and individuals alike have realized the importance of having efficient tools to create and manage electronic forms. One such tool is the PDF-based fillable form, also known as the AcroForm. An AcroForm is an interactive form with a collection of fields, such as TextBox, Button, CheckBox, etc., which can be filled with data programmatically or manually in order to take information as input from the user. The PDF specification 1.7 (Section 12.7) outlines the format and structure of AcroForms.

image

VeryPDF PDF AcroForm Creator API is a powerful tool that allows developers to create interactive PDF forms. With this API, you can add, get, modify, and delete different form fields. This article will delve into the features and benefits of VeryPDF PDF AcroForm Creator API and highlight how it can help you create dynamic PDF forms.

Features of VeryPDF PDF AcroForm Creator API:

VeryPDF PDF AcroForm Creator API is a feature-rich tool that comes with several functionalities to make creating and managing PDF forms a breeze. Here are some of its notable features:

1. Support for multiple field types: VeryPDF PDF AcroForm Creator API supports a variety of field types, including TextField, CheckBoxField, CombTextField, ComboBoxField, ListBoxField, PushButtonField, RadioButtonField, and SignatureField. This wide range of field types ensures that you can create forms that suit your specific needs.

2. Easy to use: VeryPDF PDF AcroForm Creator API is user-friendly, making it easy to integrate into your existing workflow. The API is well documented, and the library comes with a comprehensive set of instructions, examples, and code snippets to guide you through the process.

3. Compatibility: VeryPDF PDF AcroForm Creator API is compatible with various programming languages, including C#, VB.NET, ASP.NET, Java, and PHP, among others. This makes it easy to integrate into your existing projects, regardless of the platform you are using.

4. Security: VeryPDF PDF AcroForm Creator API supports digital signatures, which ensures the security and authenticity of the forms. This feature is particularly important for forms that contain sensitive information, such as credit card details or medical records.

5. Customization: VeryPDF PDF AcroForm Creator API allows for extensive customization of the form fields, including changing the font, font size, color, and alignment. This feature ensures that the forms look professional and consistent with your brand.

Benefits of VeryPDF PDF AcroForm Creator API:

1. Saves time and resources: VeryPDF PDF AcroForm Creator API enables developers to create interactive PDF forms quickly and easily. This means that you do not have to spend time and resources manually creating and managing forms, which frees up your time for other important tasks.

2. Improves data accuracy: Interactive PDF forms created with VeryPDF PDF AcroForm Creator API are designed to collect data accurately. This means that there is less room for error, reducing the need for manual verification and correction.

3. Enhances user experience: Interactive PDF forms created with VeryPDF PDF AcroForm Creator API provide a seamless user experience. Users can easily fill out the form fields, save, and submit their responses, which makes the process of filling out forms less tedious and more convenient.

4. Increases productivity: With VeryPDF PDF AcroForm Creator API, you can create PDF forms that can be automatically filled with data, saving you time and effort. This feature is particularly useful for businesses that deal with a large volume of forms.

VeryPDF PDF AcroForm Creator API is a powerful tool that enables developers to create dynamic PDF forms quickly and easily. With its wide range of field types, ease of use, compatibility with various programming languages, security features, and customization options, VeryPDF PDF AcroForm Creator API is a valuable tool for businesses and individuals who want to create and manage interactive PDF forms efficiently.

By using VeryPDF PDF AcroForm Creator API, you can save time and resources, improve data accuracy, enhance user experience, and increase productivity. Whether you are creating forms for your business, school, or personal use, VeryPDF PDF AcroForm Creator API is a reliable tool that can help you achieve your goals.

If you are interested in learning more about VeryPDF PDF AcroForm Creator API, you can visit their website to access their documentation, examples, and code snippets. Additionally, their support team is always available to answer any questions or concerns you may have. Overall, VeryPDF PDF AcroForm Creator API is a great choice for anyone looking to create and manage interactive PDF forms efficiently.

Want to buy this VeryPDF PDF AcroForm Creator API product?

Should you be interested in acquiring a license for our product or require assistance in developing a custom software solution based on it, please do not hesitate to reach out to us. Our team is always ready to assist you and provide you with the necessary support.

http://support.verypdf.com/

We look forward to the opportunity of working with you and providing developer assistance if required.
---------------------------------------------

Sample C++ source code to create PDF AcroForm,

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "VSPlatform.h"
#include "VSLibA.h"         /* Use VeryPDF PDF Library */
#include "VSExcept.h"       /* Use Exceptions API */
#include "VSError.h"        /* Use Errors API */
#include "VSTypes.h"        /* Use VeryPDF Type Definitions */
#include "VSDocA.h"         /* Use PDF Document API */
#include "VSPageA.h"        /* Use PDF Page Document API */
#include "VSFontA.h"

#include "VSAcroFormA.h"  /* Use Acro Form API */
#include "VSCanvasA.h"    /* Use Canvas Drawing API */
#include "VSActionA.h"    /* Use PDF Actions API */
#include "VSAnnotA.h"     /* Use PDF Annotation API */

#include "VSBaseA.h"

#define PageWidth 1000      /* Page width definition */
#define PageHeight 500      /* Page height definition */

/* Determination of relative page coordinates, normalized to 100 */
#define PX(a) (PageWidth*a/100)
#define PY(a) (PageHeight*a/100)
/* Determination of relative control ( Acro Object Content ) coordinates, normalized to 100 */
#define OX(a) (PageWidth*a/100)
#define OY(a) (PageHeight*(100-a)/100)


TPDFRect GetPDFRect(ppReal xl, ppReal yl, ppReal xr, ppReal yr)
{
	TPDFRect Rect;
	Rect.xl = xl;
	Rect.yl = yl;
	Rect.xr = xr;
	Rect.yr = yr;
	return Rect;
}


int main(int argc, char* argv[])
{
	PDFLibHandle	    PDFLibrary;         /* PDF Library Handle */
	PDFDocHandle	    Doc = NULL;         /* PDF Document Handle */
	PDFAnnotationHandle StampAnnot;         /* PDF Annotation Handle fot Stamp Annotations Example */
	PDFAnnotationHandle TextAnnot;          /* PDF Annotation Handle for Text Annotations Example */
	PBXHandle           PaintBox;           /* Handle of Paint Box for Content Drawing */
	ppInt32             ErrorCode;          /* Check Error Code */
	ppInt32             fi, Page;           /* Variable counter */
	char			    ErrBuff[256];
	ppUns32			    Acro;
	/*ppReal			TextWidth; */
	char* Wrk;
	char* Text;               /* Text String for Annotation Text*/

	PDFLibrary = InitPDFLibrary(NULL, NULL);/* Initialize PDF Library */
	PDFTRY(PDFLibrary)/* On error keep exception */
		Doc = PDFDocCreate(PDFLibrary);
#ifdef WINDOWS_PLATFORM        
	PDFDocSetAutoLaunch(Doc, true);/* Launch destination PDF file after work */
#endif
	Page = PDFDocAppendPage(Doc, PageWidth, PageHeight); /* Create new page in PDF document */
	PaintBox = PDFPageCreatePaintBox(Doc, Page, 72); /* Create Page Content PaintBox with default resolution ( 72 dpi )*/

	/* Save the current graphics state on the graphics state stack. */
	PBXStateStore(PaintBox);
	/* Set the line 1 point width. */
	PBXSetLineWidth(PaintBox, 1);
	/* Set the line cap style in the graphics state. */
	PBXSetLineCap(PaintBox, 1);
	/* Set the line join style in the graphics state. */
	PBXSetLineJoin(PaintBox, 1);
	/* Set the filling Color space to DeviceRGB and Color as White to use for filling operations */
	PBXSetFillColor(PaintBox, ULRGBToColor(0.98, 0.95, 0.92));
	/* Append a rectangle to the current path as all active area. */
	PBXRectangle(PaintBox, 0, 0, PX(100), PY(100));
	/* Fill the path, using the nonzero winding number rule to determine the region to fill.
	Any subpaths that are open are implicitly closed before being filled.*/
	PBXFill(PaintBox);
	/* Set the stroking Color as Dark Maroon */
	PBXSetStrokeColor(PaintBox, ULRGBToColor(0.3, 0.0, 0.0));
	/* Set Rectangle Border around whole area */
	PBXRectangle(PaintBox, 0, 0, PX(100), PY(100));
	/* Draw Rectangle Border */
	PBXStroke(PaintBox);
	/* Set the stroking Color as Light Maroon */
	PBXSetStrokeColor(PaintBox, ULRGBToColor(0.6, 0.0, 0.0));
	/* Set Rectangle Border in previous Rectangle */
	PBXRectangle(PaintBox, 1, 1, PX(100) - 1, PY(100) - 1);
	/* Draw Rectangle Border */
	PBXStroke(PaintBox);
	/* Set the stroking Color as Red */
	PBXSetStrokeColor(PaintBox, ULRGBToColor(1.0, 0.0, 0.0));
	/* Set Rectangle Border in previous Rectangle */
	PBXRectangle(PaintBox, 2, 2, PX(100) - 2, PY(100) - 2);
	/* Draw Rectangle Border */
	PBXStroke(PaintBox);

	fi = PDFFontStandardAppend(Doc, stdfHelvetica, etWinAnsiEncoding);
	PBXSetActiveFont(PaintBox, fi, PY(8), false, false);
	PBXSetFillColor(PaintBox, ULRGBToColor(0.3, 0.0, 0.0));
	PBXTextOut(PaintBox, PX(02), PY(02), 0, "Intention Form");
	/* Set filling color as Dark Maroon */
	PBXSetFillColor(PaintBox, ULRGBToColor(0.3, 0.0, 0.0));
	/* Set narrow rectangle under text caption */
	PBXRectangle(PaintBox, PX(02), PY(10) + 1, PX(98), PY(10) + 2);
	/* Fill rectangle by Dark Maroon Color */
	PBXFill(PaintBox);

	PBXSetActiveFont(PaintBox, fi, PY(2), false, false);
	PBXSetFillColor(PaintBox, ULRGBToColor(0.0, 0.5, 0.0));
	PBXTextOut(PaintBox, PX(75), PY(5), 0, "Thallium Software Group \251 2005");

	fi = PDFFontStandardAppend(Doc, stdfCourierBold, etWinAnsiEncoding);
	PBXSetActiveFont(PaintBox, fi, PY(2.5), false, false);
	PBXSetFillColor(PaintBox, ULRGBToColor(0.3, 0.2, 0.0));
	PBXTextOut(PaintBox, PX(02), PY(12), 0, "Contact Person");
	PBXTextOut(PaintBox, PX(02), PY(22), 0, "Company Name");
	PBXTextOut(PaintBox, PX(02), PY(32), 0, "Department");
	PBXTextOut(PaintBox, PX(21), PY(32), 0, "Phone");
	PBXTextOut(PaintBox, PX(41), PY(32), 0, "E-Mail");
	PBXTextOut(PaintBox, PX(2), PY(42), 0, "Street Address");
	PBXTextOut(PaintBox, PX(2), PY(62), 0, "City");
	PBXTextOut(PaintBox, PX(31), PY(62), 0, "State");
	PBXTextOut(PaintBox, PX(41), PY(62), 0, "ZIP");
	PBXTextOut(PaintBox, PX(2), PY(71), 0, "Which purposes are you pursuing?");

	fi = PDFFontStandardAppend(Doc, stdfHelvetica, etWinAnsiEncoding);
	PBXSetActiveFont(PaintBox, fi, PY(3), false, false);
	PBXSetFillColor(PaintBox, ULRGBToColor(0.8, 0.1, 0.1));
	PBXTextOut(PaintBox, PX(4), PY(91.5), 0, "I wanna to subscribe news about yours products");
	PBXTextOut(PaintBox, PX(4), PY(95.5), 0, "I wanna to contact with yours managers");

	PBXSetActiveFont(PaintBox, fi, PY(5), false, false);
	PBXSetFillColor(PaintBox, ULRGBToColor(0.3, 0.0, 0.0));
	PBXTextOut(PaintBox, PX(62), PY(21), 0, "Which library pack");
	PBXTextOut(PaintBox, PX(62), PY(25), 0, "are you interested?");

	/************************************************************************/
	/*  Draw Contact person edit box                                        */
	/************************************************************************/
	Acro = PDFPageAppendEditBox(Doc, Page, GetPDFRect(OX(02), OY(15), OX(60), OY(20)), "cp");
	PDFAcroObjectSetBorder(Doc, Acro, ULRGBToColor(0.0, 0.3, 0.0), ULRGBToColor(0.95, 1.0, 0.9), 2.0);
	//PDFAcroObjectSetFlag ( Acro, )
	PDFAcroEditBoxSetMaxLen(Doc, Acro, 0);
	PDFAcroEditBoxSetAlign(Doc, Acro, PDFAcroQuaddingLeft);
	PDFAcroObjectSetFont(Doc, Acro, PDFFontStandardAppend(Doc, stdfHelvetica, etWinAnsiEncoding),
		PY(3), ULRGBToColor(0.0, 0.4, 0.0));

	/************************************************************************/
	/*  Draw Company name                                                   */
	/************************************************************************/
	Acro = PDFPageAppendEditBox(Doc, Page, GetPDFRect(OX(02), OY(25), OX(60), OY(30)), "cn");
	PDFAcroObjectSetBorder(Doc, Acro, ULRGBToColor(0.0, 0.3, 0.0), ULRGBToColor(0.95, 1.0, 0.9), 2.0);
	//PDFAcroObjectSetFlag ( Acro, )
	PDFAcroEditBoxSetMaxLen(Doc, Acro, 0);
	PDFAcroEditBoxSetAlign(Doc, Acro, PDFAcroQuaddingLeft);
	PDFAcroObjectSetFont(Doc, Acro, PDFFontStandardAppend(Doc, stdfHelvetica, etWinAnsiEncoding),
		PY(3), ULRGBToColor(0.0, 0.4, 0.0));

	/************************************************************************/
	/*  Draw phone edit box                                      */
	/************************************************************************/
	Acro = PDFPageAppendEditBox(Doc, Page, GetPDFRect(OX(21), OY(35), OX(40), OY(40)), "ph");
	PDFAcroObjectSetBorder(Doc, Acro, ULRGBToColor(0.0, 0.3, 0.0), ULRGBToColor(0.95, 1.0, 0.9), 2.0);
	//PDFAcroObjectSetFlag ( Acro, )
	PDFAcroEditBoxSetMaxLen(Doc, Acro, 0);
	PDFAcroEditBoxSetAlign(Doc, Acro, PDFAcroQuaddingLeft);
	PDFAcroObjectSetFont(Doc, Acro, PDFFontStandardAppend(Doc, stdfHelvetica, etWinAnsiEncoding),
		PY(3), ULRGBToColor(0.0, 0.4, 0.0));

	/************************************************************************/
	/*  Draw phone edit box                                      */
	/************************************************************************/
	Acro = PDFPageAppendEditBox(Doc, Page, GetPDFRect(OX(41), OY(35), OX(60), OY(40)), "em");
	PDFAcroObjectSetBorder(Doc, Acro, ULRGBToColor(0.0, 0.3, 0.0), ULRGBToColor(0.95, 1.0, 0.9), 2.0);
	//PDFAcroObjectSetFlag ( Acro, )
	PDFAcroEditBoxSetMaxLen(Doc, Acro, 0);
	PDFAcroEditBoxSetAlign(Doc, Acro, PDFAcroQuaddingLeft);
	PDFAcroObjectSetFont(Doc, Acro, PDFFontStandardAppend(Doc, stdfHelvetica, etWinAnsiEncoding),
		PY(3), ULRGBToColor(0.0, 0.4, 0.0));


	/************************************************************************/
	/*  Draw address edit box                                               */
	/************************************************************************/
	Acro = PDFPageAppendEditBox(Doc, Page, GetPDFRect(OX(2), OY(45), OX(60), OY(60)), "ad");
	PDFAcroObjectSetBorder(Doc, Acro, ULRGBToColor(0.0, 0.3, 0.0), ULRGBToColor(0.95, 1.0, 0.9), 2.0);
	PDFAcroObjectSetFlag(Doc, Acro, PDFACRO_MULTILINE);
	PDFAcroEditBoxSetMaxLen(Doc, Acro, 0);
	PDFAcroEditBoxSetAlign(Doc, Acro, PDFAcroQuaddingLeft);
	PDFAcroObjectSetFont(Doc, Acro, PDFFontStandardAppend(Doc, stdfHelvetica, etWinAnsiEncoding),
		PY(3), ULRGBToColor(0.0, 0.4, 0.0));

	/************************************************************************/
	/*  Draw city    edit box                                               */
	/************************************************************************/
	Acro = PDFPageAppendEditBox(Doc, Page, GetPDFRect(OX(2), OY(65), OX(30), OY(70)), "ct");
	PDFAcroObjectSetBorder(Doc, Acro, ULRGBToColor(0.0, 0.3, 0.0), ULRGBToColor(0.95, 1.0, 0.9), 2.0);
	PDFAcroEditBoxSetMaxLen(Doc, Acro, 0);
	PDFAcroEditBoxSetAlign(Doc, Acro, PDFAcroQuaddingLeft);
	PDFAcroObjectSetFont(Doc, Acro, PDFFontStandardAppend(Doc, stdfHelvetica, etWinAnsiEncoding),
		PY(3), ULRGBToColor(0.0, 0.4, 0.0));

	/************************************************************************/
	/*  Draw zip edit box                                                   */
	/************************************************************************/
	Acro = PDFPageAppendEditBox(Doc, Page, GetPDFRect(OX(40), OY(65), OX(60), OY(70)), "zp");
	PDFAcroObjectSetBorder(Doc, Acro, ULRGBToColor(0.0, 0.3, 0.0), ULRGBToColor(0.95, 1.0, 0.9), 2.0);
	PDFAcroEditBoxSetMaxLen(Doc, Acro, 0);
	PDFAcroEditBoxSetAlign(Doc, Acro, PDFAcroQuaddingLeft);
	PDFAcroObjectSetFont(Doc, Acro, PDFFontStandardAppend(Doc, stdfHelvetica, etWinAnsiEncoding),
		PY(3), ULRGBToColor(0.0, 0.4, 0.0));

	/************************************************************************/
	/*  Draw department combo box                                           */
	/************************************************************************/
	Acro = PDFPageAppendComboBox(Doc, Page, GetPDFRect(OX(02), OY(35), OX(20), OY(40)), "dp");
	PDFAcroObjectSetBorder(Doc, Acro, ULRGBToColor(0.0, 0.3, 0.0), ULRGBToColor(0.95, 1.0, 0.9), 2.0);
	PDFAcroObjectSetFont(Doc, Acro, PDFFontStandardAppend(Doc, stdfHelvetica, etWinAnsiEncoding),
		PY(2.5), ULRGBToColor(0.0, 0.4, 0.0));
	PDFAcroObjectSetCaption(Doc, Acro, "< select department, please >");
	PDFAcroObjectAppendItem(Doc, Acro, "100 Management");
	PDFAcroObjectAppendItem(Doc, Acro, "101 Administration");
	PDFAcroObjectAppendItem(Doc, Acro, "102 Accounting");
	PDFAcroObjectAppendItem(Doc, Acro, "103 Information Department");
	PDFAcroObjectAppendItem(Doc, Acro, "104 Technology Department");
	PDFAcroObjectAppendItem(Doc, Acro, "105 Personal Management");
	PDFAcroObjectAppendItem(Doc, Acro, "110 Customer Service");
	PDFAcroObjectAppendItem(Doc, Acro, "120 External Relations");
	PDFAcroObjectAppendItem(Doc, Acro, "121 Analog Proofs");
	PDFAcroObjectAppendItem(Doc, Acro, "150 System Analytic Department");
	PDFAcroObjectAppendItem(Doc, Acro, "200 Research Department");
	PDFAcroObjectAppendItem(Doc, Acro, "201 Development");
	PDFAcroObjectAppendItem(Doc, Acro, "202 Software Department");
	PDFAcroObjectAppendItem(Doc, Acro, "999 Other");


	/************************************************************************/
	/*  Draw state combo box                                           */
	/************************************************************************/
	Acro = PDFPageAppendComboBox(Doc, Page, GetPDFRect(OX(31), OY(65), OX(39), OY(70)), "st");
	PDFAcroObjectSetBorder(Doc, Acro, ULRGBToColor(0.0, 0.3, 0.0), ULRGBToColor(0.95, 1.0, 0.9), 2.0);
	PDFAcroObjectSetFont(Doc, Acro, PDFFontStandardAppend(Doc, stdfHelvetica, etWinAnsiEncoding),
		PY(2.5), ULRGBToColor(0.0, 0.4, 0.0));
	PDFAcroObjectSetCaption(Doc, Acro, "<select>");
	PDFAcroObjectAppendItem(Doc, Acro, "AL");
	PDFAcroObjectAppendItem(Doc, Acro, "AR");
	PDFAcroObjectAppendItem(Doc, Acro, "AZ");
	PDFAcroObjectAppendItem(Doc, Acro, "CA");
	PDFAcroObjectAppendItem(Doc, Acro, "CO");
	PDFAcroObjectAppendItem(Doc, Acro, "HA");
	PDFAcroObjectAppendItem(Doc, Acro, "KE");
	PDFAcroObjectAppendItem(Doc, Acro, "MA");
	PDFAcroObjectAppendItem(Doc, Acro, "NE");
	PDFAcroObjectAppendItem(Doc, Acro, "NY");
	PDFAcroObjectAppendItem(Doc, Acro, "OH");
	PDFAcroObjectAppendItem(Doc, Acro, "OL");
	PDFAcroObjectAppendItem(Doc, Acro, "OR");
	PDFAcroObjectAppendItem(Doc, Acro, "PE");
	PDFAcroObjectAppendItem(Doc, Acro, "TX");


	Acro = PDFPageAppendListBox(Doc, Page, GetPDFRect(OX(2), OY(90), OX(60), OY(75)), "pu");
	PDFAcroObjectSetBorder(Doc, Acro, ULRGBToColor(0.0, 0.3, 0.0), ULRGBToColor(0.95, 1.0, 0.9), 2.0);
	PDFAcroObjectSetFlag(Doc, Acro, PDFACRO_MULTISELECT);
	PDFAcroObjectSetFont(Doc, Acro, PDFFontStandardAppend(Doc, stdfHelvetica, etWinAnsiEncoding),
		PY(2.5), ULRGBToColor(0.0, 0.4, 0.0));
	PDFAcroObjectAppendItem(Doc, Acro, "I wanna buy one copy for me");
	PDFAcroObjectAppendItem(Doc, Acro, "I wanna buy library for my company");
	PDFAcroObjectAppendItem(Doc, Acro, "I wanna to be reseller in own region");
	PDFAcroObjectAppendItem(Doc, Acro, "I wanna testing yours library");
	PDFAcroObjectAppendItem(Doc, Acro, "I looking for similar product in internet");
	PDFAcroObjectAppendItem(Doc, Acro, "I have some questions about yours PDF products");

	Acro = PDFPageAppendCheckBox(Doc, Page, GetPDFRect(OX(2), OY(94), OX(2) + PY(3), OY(91)), "sb", false);
	PDFAcroObjectSetBorder(Doc, Acro, ULRGBToColor(0.0, 0.3, 0.0), ULRGBToColor(0.95, 1.0, 0.9), 2.0);
	PDFAcroObjectSetFont(Doc, Acro, ppMAXUns32, 0, ULRGBToColor(0.0, 0.4, 0.0));
	PDFAcroObjectSetStyle(Doc, Acro, cbsCheck, cbfRectangle);

	Acro = PDFPageAppendCheckBox(Doc, Page, GetPDFRect(OX(2), OY(98), OX(2) + PY(3), OY(95)), "cm", false);
	PDFAcroObjectSetBorder(Doc, Acro, ULRGBToColor(0.0, 0.3, 0.0), ULRGBToColor(0.95, 1.0, 0.9), 2.0);
	PDFAcroObjectSetFont(Doc, Acro, ppMAXUns32, 0, ULRGBToColor(0.3, 0.0, 0.0));
	PDFAcroObjectSetStyle(Doc, Acro, cbsVmark, cbfRectangle);

	PBXSetActiveFont(PaintBox, fi, PY(2), false, false);
	PBXSetFillColor(PaintBox, ULRGBToColor(0.0, 0.3, 0.0));


	PBXTextOut(PaintBox, PX(90), PY(23), 0, "Demo");

	Acro = PDFPageAppendRadioButton(Doc, Page, GetPDFRect(OX(87), OY(26), OX(87) + PY(04), OY(22)), "Demo", "pd", true);
	PDFAcroObjectSetBorder(Doc, Acro, ULRGBToColor(0.0, 0.3, 0.0), ULRGBToColor(0.95, 1.0, 0.9), 2.0);
	PDFAcroObjectSetFont(Doc, Acro, ppMAXUns32, 0, ULRGBToColor(0.3, 0.0, 0.0));
	PDFAcroObjectSetStyle(Doc, Acro, cbsDiamond, cbfCircle);

	PBXTextOut(PaintBox, PX(83), PY(33), 0, "Home Edition");

	Acro = PDFPageAppendRadioButton(Doc, Page, GetPDFRect(OX(80), OY(36), OX(80) + PY(04), OY(32)), "Home", "pd", false);
	PDFAcroObjectSetBorder(Doc, Acro, ULRGBToColor(0.0, 0.3, 0.0), ULRGBToColor(0.95, 1.0, 0.9), 2.0);
	PDFAcroObjectSetFont(Doc, Acro, ppMAXUns32, 0, ULRGBToColor(0.3, 0.0, 0.0));
	PDFAcroObjectSetStyle(Doc, Acro, cbsDiamond, cbfCircle);

	PBXTextOut(PaintBox, PX(77), PY(43), 0, "Standard Edition");

	Acro = PDFPageAppendRadioButton(Doc, Page, GetPDFRect(OX(74), OY(46), OX(74) + PY(04), OY(42)), "Standard", "pd", false);
	PDFAcroObjectSetBorder(Doc, Acro, ULRGBToColor(0.0, 0.3, 0.0), ULRGBToColor(0.95, 1.0, 0.9), 2.0);
	PDFAcroObjectSetFont(Doc, Acro, ppMAXUns32, 0, ULRGBToColor(0.3, 0.0, 0.0));
	PDFAcroObjectSetStyle(Doc, Acro, cbsDiamond, cbfCircle);

	PBXTextOut(PaintBox, PX(72), PY(53), 0, "Professional Edition");

	Acro = PDFPageAppendRadioButton(Doc, Page, GetPDFRect(OX(69), OY(56), OX(69) + PY(04), OY(52)), "Professional", "pd", false);
	PDFAcroObjectSetBorder(Doc, Acro, ULRGBToColor(0.0, 0.3, 0.0), ULRGBToColor(0.95, 1.0, 0.9), 2.0);
	PDFAcroObjectSetFont(Doc, Acro, -1, 0, ULRGBToColor(0.3, 0.0, 0.0));
	PDFAcroObjectSetStyle(Doc, Acro, cbsDiamond, cbfCircle);

	PBXTextOut(PaintBox, PX(68), PY(63), 0, "Enterprise Edition");

	Acro = PDFPageAppendRadioButton(Doc, Page, GetPDFRect(OX(65), OY(66), OX(65) + PY(04), OY(62)), "Enterprise", "pd", false);
	PDFAcroObjectSetBorder(Doc, Acro, ULRGBToColor(0.0, 0.3, 0.0), ULRGBToColor(0.95, 1.0, 0.9), 2.0);
	PDFAcroObjectSetFont(Doc, Acro, -1, 0, ULRGBToColor(0.3, 0.0, 0.0));
	PDFAcroObjectSetStyle(Doc, Acro, cbsDiamond, cbfCircle);

	PBXTextOut(PaintBox, PX(65), PY(73), 0, "Corporate Edition");

	Acro = PDFPageAppendRadioButton(Doc, Page, GetPDFRect(OX(62), OY(76), OX(62) + PY(04), OY(72)), "Corporate", "pd", false);
	PDFAcroObjectSetBorder(Doc, Acro, ULRGBToColor(0.0, 0.3, 0.0), ULRGBToColor(0.95, 1.0, 0.9), 2.0);
	PDFAcroObjectSetFont(Doc, Acro, -1, 0, ULRGBToColor(0.3, 0.0, 0.0));
	PDFAcroObjectSetStyle(Doc, Acro, cbsDiamond, cbfCircle);

	Acro = PDFPageAppendPushButton(Doc, Page, GetPDFRect(0.9 * PageWidth, 10, PageWidth - 10, 10 + 0.05 * PageHeight),
		"SubmitButton");
	PDFAcroObjectSetBorder(Doc, Acro, SetNoPDFColor, ULRGBToColor(0.95, 1.0, 0.9), 2.0);
	PDFAcroObjectSetCaption(Doc, Acro, "Submit Form");
	PDFAcroObjectSetFont(Doc, Acro, PDFFontStandardAppend(Doc, stdfHelvetica, etWinAnsiEncoding), PY(2), ULRGBToColor(0.0, 0.0, 0.0));
	PDFAcroPushButtonSetMiter(Doc, Acro, 0.006 * PageHeight);
	Wrk = "//LocalHost/PDF/fdfserv.php";
	PDFAcroObjectAddAction(Doc, Acro, PDFActionNewSubmitForm(Doc, Wrk, strlen(Wrk), 0), PDFAcroEventTypeActivate);

	Acro = PDFPageAppendPushButton(Doc, Page, GetPDFRect(0.8 * PageWidth, 10, 0.9 * PageWidth - 10, 10 + 0.05 * PageHeight),
		"ExportButton");
	PDFAcroObjectSetBorder(Doc, Acro, SetNoPDFColor, ULRGBToColor(0.95, 1.0, 0.9), 2.0);
	PDFAcroObjectSetCaption(Doc, Acro, "Export Data");
	PDFAcroObjectSetFont(Doc, Acro, PDFFontStandardAppend(Doc, stdfHelvetica, etWinAnsiEncoding), PY(2), ULRGBToColor(0.0, 0.0, 0.0));
	PDFAcroPushButtonSetMiter(Doc, Acro, 0.006 * PageHeight);
	Wrk = "https://www.verypdf.com";
	PDFAcroObjectAddAction(Doc, Acro, PDFActionNewSubmitForm(Doc, Wrk, strlen(Wrk), PDF_SUBMIT_FORM_FLAG_EXPORT_FORMAT),
		PDFAcroEventTypePress);

	Acro = PDFPageAppendPushButton(Doc, Page, GetPDFRect(0.7 * PageWidth, 10, 0.8 * PageWidth - 10, 10 + 0.05 * PageHeight),
		"ResetButton");
	PDFAcroObjectSetBorder(Doc, Acro, SetNoPDFColor, ULRGBToColor(0.95, 1.0, 0.9), 2.0);
	PDFAcroObjectSetCaption(Doc, Acro, "Reset Form");
	PDFAcroObjectSetFont(Doc, Acro, PDFFontStandardAppend(Doc, stdfHelvetica, etWinAnsiEncoding), PY(2), ULRGBToColor(0.0, 0.0, 0.0));
	PDFAcroPushButtonSetMiter(Doc, Acro, 0.006 * PageHeight);
	PDFAcroObjectAddAction(Doc, Acro, PDFActionNewResetForm(Doc, false), PDFAcroEventTypeActivate);
	PDFPageAppendSignatureBox(Doc, Page, GetPDFRect(OX(80), OY(70), OX(80) + PY(14), OY(62)), "SGN");

	PBXStateRestore(PaintBox);
	PBXClose(PaintBox, false); /* Free PaintBox of Page Content */

	/* Create new text annotations */
	Text = "Demo For Text Annotation";
	TextAnnot = PDFPageAppendAnnotationText(Doc, Page, GetPDFRect(OX(0), OY(10), OX(30), OY(0)), Text, strlen(Text), false, atnComment);
	PDFAnnotationSetTitle(TextAnnot, "Text", strlen("Text"));
	PDFAnnotationSetColor(TextAnnot, ULRGBToColor(1, 0, 0));

	/* Create new stamp annotations */
	Text = "Example Stamp Annotation";
	StampAnnot = PDFPageAppendAnnotationStamp(Doc, Page, GetPDFRect(OX(70), OY(90), OX(90), OY(70)), Text, strlen(Text), asnForComment);
	PDFAnnotationSetColor(StampAnnot, ULRGBToColor(0.8, 0.8, 0.8));

	/* Save destination PDF file as "acroform-api-test.pdf" in current path */
	PDFDocSaveToFile(Doc, "C:/AcroFormAPITest.pdf");


	PDFFINALLY(PDFLibrary) /* Do further if haven't PDF Library Exceptions */
		if (Doc) PDFDocClose(Doc); /* Close PDF Document and free memory */
	ErrorCode = PDFLASTERROR(PDFLibrary); /* Check last error, if 0 then finished successfully */
	if (ErrorCode) {
		VSGetErrorStr(ErrorCode, ErrBuff);
		printf("Error: %s\n", ErrBuff);

	}
	else {
		printf("Success...\n");
	}
	DonePDFLibrary(&PDFLibrary);/* Free PDF Library */
	PDFFINALLYEND(PDFLibrary); /* End of try...end block */
	return ErrorCode; /* Return Error Code as program result */
}
VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!