Additional to the Common Attributes, this object has the following attributes:
Attribute Name |
Description |
Type |
Values |
Default Value |
|||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 |
||||||||||||||
Page |
Page Index where object is located. Page Number is Page Index + 1. |
Integer |
>= 0 |
0 |
|||||||||||||
Points |
Number of vertices |
Integer |
>=3 |
||||||||||||||
StrokeColor |
Color used to draw line. |
Color |
COLORREF (bbggrr) 000000 to FFFFFF or in COLORREF (aabbggrr) 00000000 to FFFFFFFF |
000000 (Solid black) |
|||||||||||||
StrokeWidth |
Width of line in points (12th of an inch). |
enum IacStrokeWidth |
1: acStrokeWidthSimple 2: acStrokeWidthDouble 3: acStrokeWidthTriple 4: acStrokeWidthQuadruple |
1: acStrokeWidthSimple |
|||||||||||||
StrokeStyle |
Drawing style |
enum IacStrokeStyle |
0: acStrokeStyleContinuous 1: acStrokeStyleDashed 2: acStrokeStyleDotted |
0: acStrokeStyleContinuous |
|||||||||||||
BackColor *Takes effect only when FillStyle is not 0 |
Color for filling the background of Text object. |
Color |
COLORREF (bbggrr) 000000 to FFFFFF or in COLORREF (aabbggrr) 00000000 to FFFFFFFF |
FFFFFF (Solid white) |
|||||||||||||
FillStyle |
Fill style for the frame |
enum IacFillStyle |
0: acFillStyleNone 1: acFillStyleSolid fill 2: acFillStyleHatched 3: acFillStyleCustom |
0: acFillStyleNone |
|||||||||||||
HatchStyle |
Effective when FillStyle is acFillStyleHatched |
enum IacHatchStyle |
0: acHatchStyleNone 1: acHatchStyleHorizontal 2: acHatchStyleVertical 3: acHatchStyleLeftRight 4: acHatchStyleRightLeft 5: acHatchStyleSquares 6: acHatchStyleDiagonal |
0: acHatchStyleNone |
|||||||||||||
Text |
String of text contained in object. |
String |
|
NULL |
|||||||||||||
TextColor |
Color for drawing text. |
Color |
COLORREF (bbggrr) 000000 to FFFFFF or in 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 |
2: acHorzAlignCenter |
|||||||||||||
VertAlign |
Vertical text alignment. |
enum IacVertAlign |
1: acVertAlignTop 2: acVertAlignCenter 3: acVertAlignBottom |
2: acVertAlignCenter |
|||||||||||||
TextAngle |
Angle for drawing text |
Integer |
10th of a degree |
0 |
|||||||||||||
TextGap |
Gap between text and borders. |
enum IacTextGap. Units are in points or 12th of an inch. |
0: acTextGapNone 1: acTextGapThin 2: acTextGapMedium 3: acTextGapThick |
0: acTextGapNone |
|||||||||||||
Xpoints |
Horizontal coordinates. |
Array |
0 |
||||||||||||||
Ypoints |
Vertical coordinates. |
Array |
0 |
||||||||||||||
Rotation |
Polygon rotation. |
Integer |
10th of a degree |
0 |
|||||||||||||
Locked |
Object cannot be modified |
Boolean |
True / False |
False |
|||||||||||||
CharSpacing |
Spacing between characters. |
Integer |
10th of a Twip |
0 |
|||||||||||||
WordSpacing |
Spacing between words. |
Integer |
10th of a Twip |
0 |
|||||||||||||
FillMode |
Polygon filling mode. |
enum IacFillMode |
1: acFillModeAlternate 2: acFillModeWinding |
1: acFillModeAlternate |
|||||||||||||
Operations |
Operations that define how the points are connected. |
Array of enum IacPolyOps |
0: acNoOp 1: acCloseFigure 2: acLineTo 4: acBezierTo 6: acMoveto 16: acClip_Windin 32: acClip_Alternate |
0: acNoOp |
|||||||||||||
Styles |
The first value specifies the length of the first dash in a user-defined style; the second value specifies the length of the first space, and so on. |
Integer Array |
|
0 |
|||||||||||||
StylesF |
Same Styles, but it use Float values more accurate. |
Float Array |
0 |
||||||||||||||
CanHaveText |
User can enter text. |
Boolean |
True/False |
True |
|||||||||||||
FormattedText |
It is the string contents of the cell that includes formatting information such as Bold or Italic. |
String |
|
NULL |
|||||||||||||
The Formatted Text property allows the user to specify the text that has some sections formatted with a given format style such as: font size, color, bold, italics, underlined, strike-through, etc. The notations mentioned below are used to specify the needed formats:
The text section should be enclosed with tags to specify the formatting. For example: <b>Hello World</b> will make the text "Hello World" to be bold. If a style has an attribute like in the case of font size and font color, we add a colon to the opening tag and append the attribute after it, for example: <fs:1200>Hello World</fs> will set the text "Hello World" to a font size of 12.
|
|||||||||||||||||
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 |
|||||||||||||
PolygonType *ReadOnly |
Describes the way the polygon was created. |
Integer |
0: Lines Polygon 1: Freehand drawing |
0: Lines Polygon |
|||||||||||||
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 |
|||||||||||||
LineCap |
Shape of the end point of a line. |
enum IacLineCap |
0: acLineCapFlat 1: acLineCapRound 2: acLineCapSquare |
0: acLineCapFlat |
|||||||||||||
LineJoin |
Shape of the connection when two lines meet. |
enum IacLineJoin |
0: acLineJoinMiter 1: acLineJoinRound 2: acLineJoinBevel |
0: acLineJoinMiter |
|||||||||||||
MiterLimit *applies only when LineJoin is acLineJoinMiter |
The maximum length of mitered line joins. |
Float |
0 |
||||||||||||||
CanActivate |
User can Activate. |
Boolean |
True/False |
True |
|||||||||||||
ClipPoints |
Points that define the clip region. |
Array of Points |
NULL |
||||||||||||||
ClipOps |
Operations that define how the points are connected. |
Array of enum IacPolyOps |
0: acNoOp 1: acCloseFigure 2: acLineTo 4: acBezierTo 6: acMoveto 16: acClip_Winding 32: acClip_Alternate |
0: acNoOp |
|||||||||||||
LayerID |
ID layer which belongs the object. |
String |
|||||||||||||||
Visible |
Object is visible when document is printed |
Boolean |
True / False |
True | |||||||||||||
XpointsF |
Same Xpoints, but it use Float values more accurate. |
Array |
0 |
||||||||||||||
YpointsF |
Same Ypoints, but it use Float values more accurate. |
Array |
0 |
||||||||||||||
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 |
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 FreeHand
With page.CreateObject(Amyuni.PDFCreator.IacObjectType.acObjectTypeFreehand, "FreeHand1")
' General Attributes
.Attribute("Left").Value = 1000
.Attribute("Right").Value = 5500
.Attribute("Top").Value = 1000
.Attribute("Bottom").Value = 5000
' FreeHand Attributes
.Attribute("StrokeColor").Value = &HFF00
.Attribute("StrokeWidth").Value = Amyuni.PDFCreator.IacStrokeWidth.acStrokeWidthTriple
.Attribute("Text").Value = "Hello World!"
Dim radius As Integer = 2500
Dim pointX As New List(Of Integer)
Dim pointY As New List(Of Integer)
Dim operations As New List(Of Integer)
For i As Double = 0.0 To 360.0 Step 5
Dim angle As Double = i * System.Math.PI / 180
pointX.Add(5000 + radius * System.Math.Cos(angle))
pointY.Add(5000 + radius * System.Math.Sin(angle))
operations.Add(Amyuni.PDFCreator.IacPolyOps.acLineTo)
Next
operations(0) = Amyuni.PDFCreator.IacPolyOps.acMoveto
.Attribute("Points").Value = pointX.Count
.Attribute("XPoints").Value = pointX.ToArray
.Attribute("YPoints").Value = pointY.ToArray
.Attribute("Operations").Value = operations.ToArray
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
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;
// Create a FreeHand
using (Amyuni.PDFCreator.IacObject oFreeHand = page.CreateObject(Amyuni.PDFCreator.IacObjectType.acObjectTypeFreehand, "FreeHand1"))
{
// General Attributes
oFreeHand.Attribute("Left").Value = 1000;
oFreeHand.Attribute("Right").Value = 5500;
oFreeHand.Attribute("Top").Value = 1000;
oFreeHand.Attribute("Bottom").Value = 5000;
// FreeHand Attributes
oFreeHand.Attribute("StrokeColor").Value = 0x00FF00;
oFreeHand.Attribute("StrokeWidth").Value = Amyuni.PDFCreator.IacStrokeWidth.acStrokeWidthTriple;
oFreeHand.Attribute("Text").Value = "Hello World!";
int radius = 2500;
List<int> pointX = new List<int>();
List<int> pointY = new List<int>();
List<int> operations = new List<int>();
for (double i = 0.0; i <= 360.0; i += 5.0)
{
double angle = i * System.Math.PI / 180.0;
pointX.Add((int)(5000 + radius * System.Math.Cos(angle)));
pointY.Add((int)(5000 + radius * System.Math.Sin(angle)));
operations.Add((int)Amyuni.PDFCreator.IacPolyOps.acLineTo);
}
operations[0] = (int)Amyuni.PDFCreator.IacPolyOps.acMoveto;
oFreeHand.Attribute("Points").Value = pointX.Count;
oFreeHand.Attribute("XPoints").Value = pointX.ToArray();
oFreeHand.Attribute("YPoints").Value = pointY.ToArray();
oFreeHand.Attribute("Operations").Value = operations.ToArray();
}
// 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();
}