Additional to the Common Attributes, this object has the following attributes:
Attribute Name |
Description |
Type |
Values |
Default Value |
|---|---|---|---|---|
Page |
Page Index where object is located. Page Number is Page Index + 1. |
Integer |
>= 0 |
0 |
Locked |
Object cannot be modified. This proprietary PDF Creator attribute works only with PDF Creator and files saved in Design or ViewAndDesign modes. |
Boolean |
True / False |
False |
ParentFullName |
The fully qualified name of this object' s parent object |
String |
||
Left |
Left position in Twips |
Integer |
0 |
|
Top |
Top position in Twips |
Integer |
0 |
|
Right |
Right position in Twips |
Integer |
0 |
|
Bottom |
Bottom position in Twips |
Integer |
0 |
|
LeftF |
Left position in Twips |
Float |
0.00F |
|
TopF |
Top position in Twips |
Float |
0.00F |
|
RightF |
Right position in Twips |
Float |
0.00F |
|
BottomF |
Bottom position in Twips |
Float |
0.00F |
|
Visible |
Object is visible when document is printed |
Boolean |
True / False |
True |
Editable |
Standard PDF attribute that makes the object editable or not in any viewer. |
Boolean |
True / False |
True |
CanActivate |
User can Activate. |
Boolean |
True/False |
True |
Hidden |
Hidden in certain report states |
Integer |
A binary combination of the following values: 1: Hidden in Run mode 2: Hidden in Design mode 4: Reserved value 8: Hidden in Print preview 16: Hidden in Annotation mode |
0: Always visible |
Annotation |
Object is saved as an annotation as opposed to a drawing within the page contents |
Boolean |
True / False |
False for static objects such as lines, polygons and text. True for dynamic objects such as form fields or high-lighters |
BorderColor |
Color for drawing text border. |
Color |
COLORREF (bbggrr) 000000 to FFFFFF COLORREF (aabbggrr) 00000000 to FFFFFFFF |
000000 (Solid black) |
BorderWidth |
Width of border around text. |
enum IacBorderWidth Units are in points or 12th of an inch. |
0: acBorderWidthNone 1: acBorderWidthSimple 2: acBorderWidthDouble 3: acBorderWidthTriple 4: acBorderWidthQuadruple |
0: acBorderWidthNone |
BackColor |
Color for filling the background of Text object. |
Color |
COLORREF (bbggrr) 000000 to FFFFFF COLORREF (aabbggrr) 00000000 to FFFFFFFF |
FFFFFFFF (Transparent) |
TextColor |
Color for drawing text. |
Color |
COLORREF (bbggrr) 000000 to FFFFFF COLORREF (aabbggrr) 00000000 to FFFFFFFF |
000000 (Solid black) |
TextFont |
Font name and style for drawing text. |
Font |
String in the form of: FontName,FontSize, Weight, Italic,Underline |
NULL |
HorzAlign |
Horizontal text alignment. |
enum IacHorzAlign |
1: acHorzAlignLeft 2: acHorzAlignCenter 3: acHorzAlignRight 4: acHorzJustify |
1: acHorzAlignLeft |
Caption |
Button caption or title. (*) |
String |
NULL |
|
TextDown |
Caption or title of the button when it is pressed. |
String |
This property is specific to Acrobat Reader but has no effect in the PDF Creator. |
NULL |
TextOver |
Caption or title of the button when the cursor is placed over it. |
String |
This property is specific to Acrobat Reader but has no effect in the PDF Creator. |
NULL |
VertAlign |
Vertical text alignment. |
enum IacVertAlign |
1: acVertAlignTop 2: acVertAlignCenter 3: acVertAlignBottom |
2: acVertAlignCenter |
TextPosition |
Text position. |
enum IacTextPosition |
1: acTextPositionLeft 2: acTextPositionRight |
1: acTextPositionLeft |
Values |
It is the value that can be taken by the checkbox or RadioButton. |
String |
This should contain the various values that can be taken by a checkbox or radio-button. The two values should be separated by "OffVal\r\nOnVal". For example: "House\r\nTree" means that when the checkbox is cleared its Value attribute is "House", and it is "Tree" when checked. To change the state of a button we set the new value to the Text property in Design mode and the Value property in Run mode. |
Off/r/n/Yes |
Value |
Result of compiling the formula contained in the Text property. |
Text |
When the document is put in run mode, this contains the result of evaluating the Text property. |
NULL |
Text |
Formula or text to determine the state (Off / Yes, or the corresponding two values set in the Values attribute) of the CheckBox or RadioButton. |
Text |
The content of this property are evaluation and the result is put in the Value property. |
NULL |
Modified |
Indicates whether the object is modified and needs to be saved. |
Boolean |
True / False |
False |
Result |
Result of computing the expression in value |
String |
NULL |
|
ButtonType |
Type of button. |
enum IacButtonType |
0: acCheckBox 1: acPushButton 2: acRadioButton |
0: acCheckBox |
AutoRadio |
Flag that indicates if clicking on a radio-button will check/uncheck the button. |
Boolean |
This property is specific to Acrobat Reader but has no effect in the PDF Creator. |
False |
LayerID |
ID layer which belongs the object. |
String |
||
XAML |
XAML representation of the object |
String |
||
BlendMode |
Blends the color object according to a define mode. This blending is also applied to the object when it is saved or printed. |
enum IacBlendMode |
0: acBlendModeNormal 1: acBlendModeMultiply 2: acBlendModeScreen 3: acBlendModeOverlay 4 : acBlendModeDarken 5: acBlendModeLighten 6: acBlendModeColorDodge 7: acBlendModeColorBurn 8: acBlendModeHardLight 9: acBlendModeSoftLight 10: acBlendModeDifference 11: acBlendModeExclusion 12 : acBlendModeHue 13: acBlendModeSaturation 14 : acBlendModeColor 15: acBlendModeLuminosity 16: acBlendModeCompatible |
0: acBlendModeNormal |
(*) The user/developer will need to set the Caption explicitly after setting of "Value" attributes on a CheckBox or RadioButton field.
The "Value" attribute or the "Value" attribute can be used to change the value in the field. However, it is mandatory for "Value" attribute to set the report state to Run before saving the document in order to update the "Value" of the field internally from the "Value".
If we use the "Value" attribute, the value should be one that is present in the list of allowed "Values". By default for check-boxes, the list of allowed "Values" is "Off\r\nYes".
Public Sub Sample()
' Constants for Activation codes
Const strLicenseTo As String = "Amyuni PDF Creator .NET Evaluation"
Const strActivationCode As String = "07EFCDAB0100010025C3B7B351579FF94C49112EAF7368612744C7237C2F6A215A53E83A9ECCFFE54C52063CB05338BDE555773D7B1B"
' Initialize library
' This should be done once
acPDFCreatorLib.Initialize()
' set license key This is needed only with licensed version
acPDFCreatorLib.SetLicenseKey(strLicenseTo, strActivationCode)
' Create a new PDF document
Dim doc As New Amyuni.PDFCreator.IacDocument()
' Create page object
Dim page As Amyuni.PDFCreator.IacPage
' Define first page of PDF document
page = doc.GetPage(1)
' Switch to design mode before adding objects to the document
doc.ReportState = Amyuni.PDFCreator.IacReportState.acReportStateDesign
' Create a CheckBox
With page.CreateObject(Amyuni.PDFCreator.IacObjectType.acObjectTypeCheckBox, "CheckBox1")
' General Attributes
.Attribute("Left").Value = 1000
.Attribute("Right").Value = 5250
.Attribute("Top").Value = 0
.Attribute("Bottom").Value = 500
' CheckBox Attributes
.Attribute("ButtonType").Value = Amyuni.PDFCreator.IacButtonType.acCheckbox
.Attribute("Text").Value = "Yes"
.Attribute("Caption").Value = "Amyuni Technologies" ' Set after Text
.Attribute("HorzAlign").Value = Amyuni.PDFCreator.IacHorzAlign.acHorzAlignLeft
.Attribute("VertAlign").Value = Amyuni.PDFCreator.IacVertAlign.acVertAlignCenter
.Attribute("BorderColor").Value = &HFF00FF
.Attribute("BorderWidth").Value = Amyuni.PDFCreator.IacBorderWidth.acBorderWidthTriple
End With
' Create a RadioButton
With page.CreateObject(Amyuni.PDFCreator.IacObjectType.acObjectTypeCheckBox, "RadioButton1")
' General Attributes
.Attribute("Left").Value = 1000
.Attribute("Right").Value = 5250
.Attribute("Top").Value = 2000
.Attribute("Bottom").Value = 2500
' RadioButton Attributes
.Attribute("ButtonType").Value = Amyuni.PDFCreator.IacButtonType.acRadioButton
.Attribute("Text").Value = "Yes"
.Attribute("Caption").Value = "Amyuni Technologies" ' Set after Text
.Attribute("HorzAlign").Value = Amyuni.PDFCreator.IacHorzAlign.acHorzAlignLeft
.Attribute("VertAlign").Value = Amyuni.PDFCreator.IacVertAlign.acVertAlignCenter
.Attribute("BorderColor").Value = &HFF00FF
.Attribute("BorderWidth").Value = Amyuni.PDFCreator.IacBorderWidth.acBorderWidthTriple
End With
' Create a PushButton
With page.CreateObject(Amyuni.PDFCreator.IacObjectType.acObjectTypeCheckBox, "PushButton1")
' General Attributes
.Attribute("Left").Value = 1000
.Attribute("Right").Value = 5250
.Attribute("Top").Value = 4000
.Attribute("Bottom").Value = 4500
' PushButton Attributes
.Attribute("ButtonType").Value = Amyuni.PDFCreator.IacButtonType.acPushButton
.Attribute("Caption").Value = "Amyuni Technologies"
.Attribute("HorzAlign").Value = Amyuni.PDFCreator.IacHorzAlign.acHorzAlignLeft
.Attribute("VertAlign").Value = Amyuni.PDFCreator.IacVertAlign.acVertAlignCenter
.Attribute("BorderColor").Value = &HFF00FF
.Attribute("BorderWidth").Value = Amyuni.PDFCreator.IacBorderWidth.acBorderWidthTriple
End With
' Refresh the PDF document
doc.Refresh()
' Switch to run mode after objects to the document
doc.ReportState = Amyuni.PDFCreator.IacReportState.acReportStateRun
' Create new stream object
Dim fileWrite As System.IO.Stream = System.IO.File.OpenWrite("C:\temp\CreatePDFDocument_resulting.pdf")
' Save stream
doc.Save(fileWrite, Amyuni.PDFCreator.IacFileSaveOption.acFileSaveView)
' Close the stream
fileWrite.Close()
' terminate library to free resources
acPDFCreatorLib.Terminate()
' destroy objects
doc.Dispose()
page.Dispose()
End Sub
public void Sample()
{
// Constants for Activation codes
const string strLicenseTo = "Amyuni PDF Creator .NET Evaluation";
const string strActivationCode = "07EFCDAB0100010025C3B7B351579FF94C49112EAF7368612744C7237C2F6A215A53E83A9ECCFFE54C52063CB05338BDE555773D7B1B";
// Initialize library
// This should be done once
acPDFCreatorLib.Initialize();
// set license key This is needed only with licensed version
acPDFCreatorLib.SetLicenseKey(strLicenseTo, strActivationCode);
// Create a new PDF document
Amyuni.PDFCreator.IacDocument doc = new Amyuni.PDFCreator.IacDocument();
// Create page object
Amyuni.PDFCreator.IacPage page;
// Define first page of PDF document
page = doc.GetPage(1);
// Switch to design mode before adding objects to the document
doc.ReportState = Amyuni.PDFCreator.IacReportState.acReportStateDesign;
// Create a CheckBox
using (Amyuni.PDFCreator.IacObject oCheckBox = page.CreateObject(Amyuni.PDFCreator.IacObjectType.acObjectTypeCheckBox, "CheckBox1"))
{
// General Attributes
oCheckBox.Attribute("Left").Value = 1000;
oCheckBox.Attribute("Right").Value = 5250;
oCheckBox.Attribute("Top").Value = 0;
oCheckBox.Attribute("Bottom").Value = 500;
// CheckBox Attributes
oCheckBox.Attribute("ButtonType").Value = Amyuni.PDFCreator.IacButtonType.acCheckbox;
oCheckBox.Attribute("Text").Value = "Yes";
oCheckBox.Attribute("Caption").Value = "Amyuni Technologies"; // Set after Text
oCheckBox.Attribute("HorzAlign").Value = Amyuni.PDFCreator.IacHorzAlign.acHorzAlignLeft;
oCheckBox.Attribute("VertAlign").Value = Amyuni.PDFCreator.IacVertAlign.acVertAlignCenter;
oCheckBox.Attribute("BorderColor").Value = 0xFF00FF;
oCheckBox.Attribute("BorderWidth").Value = Amyuni.PDFCreator.IacBorderWidth.acBorderWidthTriple;
}
// Create a RadioButton
using (Amyuni.PDFCreator.IacObject oRadioButton = page.CreateObject(Amyuni.PDFCreator.IacObjectType.acObjectTypeCheckBox, "RadioButton1"))
{
// General Attributes
oRadioButton.Attribute("Left").Value = 1000;
oRadioButton.Attribute("Right").Value = 5250;
oRadioButton.Attribute("Top").Value = 2000;
oRadioButton.Attribute("Bottom").Value = 2500;
// RadioButton Attributes
oRadioButton.Attribute("ButtonType").Value = Amyuni.PDFCreator.IacButtonType.acRadioButton;
oRadioButton.Attribute("Text").Value = "Yes";
oRadioButton.Attribute("Caption").Value = "Amyuni Technologies"; // Set after Text
oRadioButton.Attribute("HorzAlign").Value = Amyuni.PDFCreator.IacHorzAlign.acHorzAlignLeft;
oRadioButton.Attribute("VertAlign").Value = Amyuni.PDFCreator.IacVertAlign.acVertAlignCenter;
oRadioButton.Attribute("BorderColor").Value = 0xFF00FF;
oRadioButton.Attribute("BorderWidth").Value = Amyuni.PDFCreator.IacBorderWidth.acBorderWidthTriple;
}
// Create a PushButton
using (Amyuni.PDFCreator.IacObject oPushButton = page.CreateObject(Amyuni.PDFCreator.IacObjectType.acObjectTypeCheckBox, "PushButton1"))
{
// General Attributes
oPushButton.Attribute("Left").Value = 1000;
oPushButton.Attribute("Right").Value = 5250;
oPushButton.Attribute("Top").Value = 4000;
oPushButton.Attribute("Bottom").Value = 4500;
// PushButton Attributes
oPushButton.Attribute("ButtonType").Value = Amyuni.PDFCreator.IacButtonType.acPushButton;
oPushButton.Attribute("Caption").Value = "Amyuni Technologies";
oPushButton.Attribute("HorzAlign").Value = Amyuni.PDFCreator.IacHorzAlign.acHorzAlignLeft;
oPushButton.Attribute("VertAlign").Value = Amyuni.PDFCreator.IacVertAlign.acVertAlignCenter;
oPushButton.Attribute("BorderColor").Value = 0xFF00FF;
oPushButton.Attribute("BorderWidth").Value = Amyuni.PDFCreator.IacBorderWidth.acBorderWidthTriple;
}
// Switch to run mode after objects to the document
doc.ReportState = Amyuni.PDFCreator.IacReportState.acReportStateRun;
// Create new stream object
System.IO.FileStream fileWrite = new System.IO.FileStream(@"C:\temp\CreatePDFDocument_resulting.pdf",
System.IO.FileMode.Create,
System.IO.FileAccess.Write,
System.IO.FileShare.Read);
// Save stream
doc.Save(fileWrite, Amyuni.PDFCreator.IacFileSaveOption.acFileSaveView);
// Close the stream
fileWrite.Close();
// terminate library to free resources
acPDFCreatorLib.Terminate();
// destroy objects
doc.Dispose();
page.Dispose();
}
Sub Sample()
' Constants for Activation codes
Const strLicenseTo As String = "Amyuni PDF Creator .NET Evaluation"
Const strActivationCode As String = "07EFCDAB0100010025C3B7B351579FF94C49112EAF7368612744C7237C2F6A215A53E83A9ECCFFE54C52063CB05338BDE555773D7B1B"
' Initialize library
' This should be done once
acPDFCreatorLib.Initialize()
' set license key This is needed only with licensed version
acPDFCreatorLib.SetLicenseKey(strLicenseTo, strActivationCode)
' Create a new PDF document
Dim doc As New Amyuni.PDFCreator.IacDocument()
' Create page object
Dim page As Amyuni.PDFCreator.IacPage
' Define first page of PDF document
page = doc.GetPage(1)
' Switch to design mode before adding objects to the document
doc.ReportState = Amyuni.PDFCreator.IacReportState.acReportStateDesign
' RadioButton1 from Group1
With page.CreateObject(Amyuni.PDFCreator.IacObjectType.acObjectTypeCheckBox, "RadioButton1")
' General Attributes
.Attribute("Left").Value = 1000
.Attribute("Right").Value = 1800
.Attribute("Top").Value = 1000
.Attribute("Bottom").Value = 1300
' RadioButton Attributes
.Attribute("AutoRadio").Value = True
.Attribute("ButtonType").Value = Amyuni.PDFCreator.IacButtonType.acRadioButton
.Attribute("BackColor").Value = &HFFFFFF
.Attribute("BorderColor").Value = &H0
.Attribute("BorderWidth").Value = Amyuni.PDFCreator.IacBorderWidth.acBorderWidthSimple
.Attribute("ParentFullName").Value = "Group1"
.Attribute("Text").Value = "Off"
End With
' set values that radio button toggle
doc.ObjectByName("Group1.0").Attribute("Values").Value = "Off" + Environment.NewLine + "0"
' RadioButton2 from Group1
With page.CreateObject(Amyuni.PDFCreator.IacObjectType.acObjectTypeCheckBox, "RadioButton2")
' General Attributes
.Attribute("Left").Value = 2000
.Attribute("Right").Value = 2800
.Attribute("Top").Value = 1000
.Attribute("Bottom").Value = 1300
' RadioButton Attributes
.Attribute("AutoRadio").Value = True
.Attribute("ButtonType").Value = Amyuni.PDFCreator.IacButtonType.acRadioButton
.Attribute("BackColor").Value = &HFFFFFF
.Attribute("BorderColor").Value = &H0
.Attribute("BorderWidth").Value = Amyuni.PDFCreator.IacBorderWidth.acBorderWidthSimple
.Attribute("ParentFullName").Value = "Group1"
.Attribute("Text").Value = "Off"
End With
' set values that radio button toggle
doc.ObjectByName("Group1.1").Attribute("Values").Value = "Off" + Environment.NewLine + "1"
' RadioButton3 from Group1
With page.CreateObject(Amyuni.PDFCreator.IacObjectType.acObjectTypeCheckBox, "RadioButton3")
' General Attributes
.Attribute("Left").Value = 3000
.Attribute("Right").Value = 3800
.Attribute("Top").Value = 1000
.Attribute("Bottom").Value = 1300
' RadioButton Attributes
.Attribute("AutoRadio").Value = True
.Attribute("ButtonType").Value = Amyuni.PDFCreator.IacButtonType.acRadioButton
.Attribute("BackColor").Value = &HFFFFFF
.Attribute("BorderColor").Value = &H0
.Attribute("BorderWidth").Value = Amyuni.PDFCreator.IacBorderWidth.acBorderWidthSimple
.Attribute("ParentFullName").Value = "Group1"
.Attribute("Text").Value = "Off"
End With
' set values that radio button toggle
doc.ObjectByName("Group1.2").Attribute("Values").Value = "Off" + Environment.NewLine + "2"
' RadioButtonA from Group2
With page.CreateObject(Amyuni.PDFCreator.IacObjectType.acObjectTypeCheckBox, "RadioButtonA")
' General Attributes
.Attribute("Left").Value = 1000
.Attribute("Right").Value = 2500
.Attribute("Top").Value = 2000
.Attribute("Bottom").Value = 2300
' RadioButton Attributes
.Attribute("AutoRadio").Value = True
.Attribute("ButtonType").Value = Amyuni.PDFCreator.IacButtonType.acRadioButton
.Attribute("BackColor").Value = &HFFFFFF
.Attribute("BorderColor").Value = &H0
.Attribute("BorderWidth").Value = Amyuni.PDFCreator.IacBorderWidth.acBorderWidthSimple
.Attribute("ParentFullName").Value = "Group2"
.Attribute("Text").Value = "Off"
End With
' set values that radio button toggle
doc.ObjectByName("Group2.0").Attribute("Values").Value = "Off" + Environment.NewLine + "Green"
' RadioButtonB from Group2
With page.CreateObject(Amyuni.PDFCreator.IacObjectType.acObjectTypeCheckBox, "RadioButtonB")
' General Attributes
.Attribute("Left").Value = 3000
.Attribute("Right").Value = 4500
.Attribute("Top").Value = 2000
.Attribute("Bottom").Value = 2300
' RadioButton Attributes
.Attribute("AutoRadio").Value = True
.Attribute("ButtonType").Value = Amyuni.PDFCreator.IacButtonType.acRadioButton
.Attribute("BackColor").Value = &HFFFFFF
.Attribute("BorderColor").Value = &H0
.Attribute("BorderWidth").Value = Amyuni.PDFCreator.IacBorderWidth.acBorderWidthSimple
.Attribute("ParentFullName").Value = "Group2"
.Attribute("Text").Value = "Red"
End With
' set values that radio button toggle
doc.ObjectByName("Group2.1").Attribute("Values").Value = "Off" + Environment.NewLine + "Red"
' Refresh the PDF document
doc.Refresh()
' Switch to run mode after objects to the document
doc.ReportState = Amyuni.PDFCreator.IacReportState.acReportStateRun
' Create new stream object
Dim fileWrite As System.IO.Stream = System.IO.File.OpenWrite("C:\temp\CreatePDFDocument_resulting.pdf")
' Save stream
doc.Save(fileWrite, Amyuni.PDFCreator.IacFileSaveOption.acFileSaveView)
' Close the stream
fileWrite.Close()
' terminate library to free resources
acPDFCreatorLib.Terminate()
' destroy objects
doc.Dispose()
page.Dispose()
End Sub
static void Sample()
{
// Constants for Activation codes
const string strLicenseTo = "Amyuni PDF Creator .NET Evaluation";
const string strActivationCode = "07EFCDAB0100010025C3B7B351579FF94C49112EAF7368612744C7237C2F6A215A53E83A9ECCFFE54C52063CB05338BDE555773D7B1B";
// Initialize library
// This should be done once
acPDFCreatorLib.Initialize();
// set license key This is needed only with licensed version
acPDFCreatorLib.SetLicenseKey(strLicenseTo, strActivationCode);
// Create a new PDF document
Amyuni.PDFCreator.IacDocument doc = new Amyuni.PDFCreator.IacDocument();
// Create page object
Amyuni.PDFCreator.IacPage page;
// Define first page of PDF document
page = doc.GetPage(1);
// Switch to design mode before adding objects to the document
doc.ReportState = Amyuni.PDFCreator.IacReportState.acReportStateDesign;
// RadioButton1 from Group1
using (Amyuni.PDFCreator.IacObject oRadioButton = page.CreateObject(Amyuni.PDFCreator.IacObjectType.acObjectTypeCheckBox, "RadioButton1"))
{
// General Attributes
oRadioButton.Attribute("Left").Value = 1000;
oRadioButton.Attribute("Right").Value = 1800;
oRadioButton.Attribute("Top").Value = 1000;
oRadioButton.Attribute("Bottom").Value = 1300;
// RadioButton Attributes
oRadioButton.Attribute("AutoRadio").Value = true;
oRadioButton.Attribute("ButtonType").Value = Amyuni.PDFCreator.IacButtonType.acRadioButton;
oRadioButton.Attribute("BackColor").Value = 0xFFFFFF;
oRadioButton.Attribute("BorderColor").Value = 0x0;
oRadioButton.Attribute("BorderWidth").Value = Amyuni.PDFCreator.IacBorderWidth.acBorderWidthSimple;
oRadioButton.Attribute("ParentFullName").Value = "Group1";
oRadioButton.Attribute("Text").Value = "Off";
}
// set values that radio button toggle
doc.ObjectByName("Group1.0").Attribute("Values").Value = "Off" + Environment.NewLine + "0";
// RadioButton2 from Group1
using (Amyuni.PDFCreator.IacObject oRadioButton = page.CreateObject(Amyuni.PDFCreator.IacObjectType.acObjectTypeCheckBox, "RadioButton2"))
{
// General Attributes
oRadioButton.Attribute("Left").Value = 2000;
oRadioButton.Attribute("Right").Value = 2800;
oRadioButton.Attribute("Top").Value = 1000;
oRadioButton.Attribute("Bottom").Value = 1300;
// RadioButton Attributes
oRadioButton.Attribute("AutoRadio").Value = true;
oRadioButton.Attribute("ButtonType").Value = Amyuni.PDFCreator.IacButtonType.acRadioButton;
oRadioButton.Attribute("BackColor").Value = 0xFFFFFF;
oRadioButton.Attribute("BorderColor").Value = 0x0;
oRadioButton.Attribute("BorderWidth").Value = Amyuni.PDFCreator.IacBorderWidth.acBorderWidthSimple;
oRadioButton.Attribute("ParentFullName").Value = "Group1";
oRadioButton.Attribute("Text").Value = "Off";
}
// set values that radio button toggle
doc.ObjectByName("Group1.1").Attribute("Values").Value = "Off" + Environment.NewLine + "1";
// RadioButton3 from Group1
using (Amyuni.PDFCreator.IacObject oRadioButton = page.CreateObject(Amyuni.PDFCreator.IacObjectType.acObjectTypeCheckBox, "RadioButton3"))
{
// General Attributes
oRadioButton.Attribute("Left").Value = 3000;
oRadioButton.Attribute("Right").Value = 3800;
oRadioButton.Attribute("Top").Value = 1000;
oRadioButton.Attribute("Bottom").Value = 1300;
// RadioButton Attributes
oRadioButton.Attribute("AutoRadio").Value = true;
oRadioButton.Attribute("ButtonType").Value = Amyuni.PDFCreator.IacButtonType.acRadioButton;
oRadioButton.Attribute("BackColor").Value = 0xFFFFFF;
oRadioButton.Attribute("BorderColor").Value = 0x0;
oRadioButton.Attribute("BorderWidth").Value = Amyuni.PDFCreator.IacBorderWidth.acBorderWidthSimple;
oRadioButton.Attribute("ParentFullName").Value = "Group1";
oRadioButton.Attribute("Value").Value = "Off";
}
// set values that radio button toggle
doc.ObjectByName("Group1.2").Attribute("Values").Value = "Off" + Environment.NewLine + "2";
// RadioButtonA from Group2
using (Amyuni.PDFCreator.IacObject oRadioButton = page.CreateObject(Amyuni.PDFCreator.IacObjectType.acObjectTypeCheckBox, "RadioButtonA"))
{
// General Attributes
oRadioButton.Attribute("Left").Value = 1000;
oRadioButton.Attribute("Right").Value = 2500;
oRadioButton.Attribute("Top").Value = 2000;
oRadioButton.Attribute("Bottom").Value = 2300;
// RadioButton Attributes
oRadioButton.Attribute("AutoRadio").Value = true;
oRadioButton.Attribute("ButtonType").Value = Amyuni.PDFCreator.IacButtonType.acRadioButton;
oRadioButton.Attribute("Caption").Value = "Male";
oRadioButton.Attribute("BackColor").Value = 0xFFFFFF;
oRadioButton.Attribute("BorderColor").Value = 0x0;
oRadioButton.Attribute("BorderWidth").Value = Amyuni.PDFCreator.IacBorderWidth.acBorderWidthSimple;
oRadioButton.Attribute("ParentFullName").Value = "Group2";
}
// set values that radio button toggle
doc.ObjectByName("Group2.0").Attribute("Values").Value = "Off" + Environment.NewLine + "Green";
// RadioButtonB from Group2
using (Amyuni.PDFCreator.IacObject oRadioButton = page.CreateObject(Amyuni.PDFCreator.IacObjectType.acObjectTypeCheckBox, "RadioButtonB"))
{
// General Attributes
oRadioButton.Attribute("Left").Value = 3000;
oRadioButton.Attribute("Right").Value = 4500;
oRadioButton.Attribute("Top").Value = 2000;
oRadioButton.Attribute("Bottom").Value = 2300;
// RadioButton Attributes
oRadioButton.Attribute("AutoRadio").Value = true;
oRadioButton.Attribute("ButtonType").Value = Amyuni.PDFCreator.IacButtonType.acRadioButton;
oRadioButton.Attribute("Caption").Value = "Female";
oRadioButton.Attribute("BackColor").Value = 0xFFFFFF;
oRadioButton.Attribute("BorderColor").Value = 0x0;
oRadioButton.Attribute("BorderWidth").Value = Amyuni.PDFCreator.IacBorderWidth.acBorderWidthSimple;
oRadioButton.Attribute("ParentFullName").Value = "Group2";
}
// set values that radio button toggle
doc.ObjectByName("Group2.1").Attribute("Values").Value = "Off" + Environment.NewLine + "Red";
// Switch to run mode after objects to the document
doc.ReportState = Amyuni.PDFCreator.IacReportState.acReportStateRun;
// Create new stream object
System.IO.FileStream fileWrite = new System.IO.FileStream(@"C:\temp\CreatePDFDocument_resulting.pdf",
System.IO.FileMode.Create,
System.IO.FileAccess.Write,
System.IO.FileShare.Read);
// Save stream
doc.Save(fileWrite, Amyuni.PDFCreator.IacFileSaveOption.acFileSaveView);
// Close the stream
fileWrite.Close();
// terminate library to free resources
acPDFCreatorLib.Terminate();
// destroy objects
doc.Dispose();
page.Dispose();
}