Line Object Attributes

 

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

StrokeColor

Color used to draw line.

Color

COLORREF (bbggrr) 000000 to FFFFFF

COLORREF (aabbggrr) 00000000 to FFFFFFFF

000000 (Solid black)

StrokeWidth

Width of line in points (12th of an inch).

enum acStrokeWidth

1: acStrokeWidthSimple

2: acStrokeWidthDouble

3: acStrokeWidthTriple

4: acStrokeWidthQuadruple

1: acStrokeWidthSimple

StrokeStyle

Drawing style.

enum acStrokeStyle

0: acStrokeStyleContinuous

1: acStrokeStyleDashed

2: acStrokeStyleDotted

0: acStrokeStyleContinuous

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

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

 

NULL

StylesF

Same Styles, but it use Float values more accurate.

Float Array

 

0

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

LineCap

Shape of the end point of a line

enum acLineCap

0: acLineCapFlat

1: acLineCapRound

2: acLineCapSquare

0: acLineCapFlat

LineJoin

Shape of the connection when two lines meet

enum acLineJoin

0: acLineJoinMiter

1: acLineJoinRound

2: acLineJoinBevel

0: acLineJoinMiter

MiterLimit

*applies only when LineJoin is acLineJoinMiter

The maximum length of mitered line joins

Float

 

0

LayerID

ID layer which belongs the object.

String

   

Visible

Object is visible when document is printed

Boolean

True / False

True

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 acBlendMode

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

 

Example

Sub Sample()
    ' Constants for Activation codes
    Const strLicenseTo As String = "Amyuni PDF Creator Evaluation"
    Const strActivationCode As String = "07EFCDAB010001004282943F2AF19A88F332D9E781E40460727DF8A42847A1BDE06DB61C71E94E2D90424BF8762385335F9D6884E9FC"
 
    ' Initializing PDFCreativeX Object
    Dim pdf As ACPDFCREACTIVEX.PDFCreactiveX = New ACPDFCREACTIVEX.PDFCreactiveX()
 
    ' Set license key
    pdf.SetLicenseKey(strLicenseTo, strActivationCode)
 
    ' Set CurrentPage
    pdf.CurrentPage = 1
 
    ' Create a Line in the current page
    pdf.CreateObject(ACPDFCREACTIVEX.ObjectTypeConstants.acObjectTypeLine, "Line1")
    ' Define Object
    Dim oLine As ACPDFCREACTIVEX.IacObject = pdf.GetObjectByName("Line1")
    ' General Attributes
    oLine("Left") = 1000
    oLine("Right") = 3250
    oLine("Top") = 0
    oLine("Bottom") = 500
    ' Line Attributes
    oLine("StrokeColor") = &HFF00FF
    oLine("StrokeWidth") = ACPDFCREACTIVEX.acStrokeWidth.acStrokeWidthTriple
 
    ' Save PDF
    pdf.Save("c:\temp\CreatePDFDocument_resulting.pdf", ACPDFCREACTIVEX.FileSaveOptionConstants.acFileSaveView)
 
End Sub
static void Sample()
{
    // Constants for Activation codes
    const string strLicenseTo = "Amyuni PDF Creator Evaluation";
    const string strActivationCode = "07EFCDAB010001004282943F2AF19A88F332D9E781E40460727DF8A42847A1BDE06DB61C71E94E2D90424BF8762385335F9D6884E9FC";
 
    // Initializing PDFCreativeX Object
    ACPDFCREACTIVEX.PDFCreactiveX pdf = new ACPDFCREACTIVEX.PDFCreactiveX();
 
    // Set license key
    pdf.SetLicenseKey(strLicenseTo, strActivationCode);
 
    // Set CurrentPage
    pdf.CurrentPage = 1;
 
    // Create a Line in the current page
    pdf.CreateObject(ACPDFCREACTIVEX.ObjectTypeConstants.acObjectTypeLine, "Line1");
    // Define Object
    ACPDFCREACTIVEX.IacObject oLine = pdf.GetObjectByName("Line1");
    // General Attributes
    oLine["Left"] = 1000;
    oLine["Right"] = 3250;
    oLine["Top"] = 2000;
    oLine["Bottom"] = 2500;
    // Line Attributes
    oLine["StrokeColor"] = 0xFF00FF;
    oLine["StrokeWidth"] = ACPDFCREACTIVEX.acStrokeWidth.acStrokeWidthTriple;
 
    // Switch to run mode after objects to the document, the attribute Text will evaluate and save it in Value attribute
    pdf.ReportState = ACPDFCREACTIVEX.ReportStateConstants.acReportStateRun;
 
    // Save PDF
    pdf.Save(@"c:\temp\CreatePDFDocument_resulting.pdf", ACPDFCREACTIVEX.FileSaveOptionConstants.acFileSaveView);
 
}
#import "c:\users\amyuni\pdfcreactivex.dll" no_namespace
 
using namespace std;
 
int main()
{
    // Constants for Activation codes
    bstr_t strLicenseTo = "Amyuni PDF Creator Evaluation";
    bstr_t strActivationCode = "07EFCDAB010001004282943F2AF19A88F332D9E781E40460727DF8A42847A1BDE06DB61C71E94E2D90424BF8762385335F9D6884E9FC";
 
    // Initialize the COM subsystem
    CoInitialize(0);
 
    // IPDFCreactiveXPtr is a smart pointer type defined in pdfcreactivex.tlh,
    // the type library header file generated by the #import instruction above
    IPDFCreactiveXPtr pdf;
 
    // Create the PDFCreactiveX instance
    pdf.CreateInstance(__uuidof(PDFCreactiveX));
 
    // set license key
    pdf->SetLicenseKey(_bstr_t(strLicenseTo), _bstr_t(strActivationCode));
 
    // Set CurrentPage
    pdf->CurrentPage = 1;
 
    // Create a Line in the current page
    pdf->CreateObject(acObjectTypeLine, "Line1");
    // Define Object
    IacObjectPtr oLine = pdf->GetObjectByName("Line1");
    // General Attributes
    oLine->Attribute["Left"] = 1000;
    oLine->Attribute["Right"] = 3250;
    oLine->Attribute["Top"] = 0;
    oLine->Attribute["Bottom"] = 500;
    // Line Attributes
    _variant_t varAttribute;
    varAttribute.vt = VT_I4;  // integers
    varAttribute.lVal = 0xFF00FF;
    oLine->Attribute["StrokeColor"] = varAttribute;
    varAttribute.lVal = acStrokeWidthTriple;
    oLine->Attribute["StrokeWidth"] = varAttribute;
 
    // Switch to run mode after objects to the document, the attribute Text will evaluate and save it in Value attribute
    pdf->ReportState = acReportStateRun;
 
    // Save PDF
    pdf->Save("c:\\temp\\CreatePDFDocument_resulting.pdf", acFileSaveView);
 
    // destroy objects
    pdf = NULL;
    oLine = NULL;
 
    return 0;
}
' acStrokeWidth Constants
Const acStrokeWidthSimple = 1
Const acStrokeWidthDouble = 2
Const acStrokeWidthTriple = 3
Const acStrokeWidthQuadruple = 4
 
' ObjectTypeConstants
Const acObjectTypeArrow = 36
Const acObjectTypeBarcode = 45
Const acObjectTypeCell = 33
Const acObjectTypeCheckBox = 21
Const acObjectTypeEllipse = 4
Const acObjectTypeExcel = 17
Const acObjectTypeFrame = 2
Const acObjectTypeField = 6
Const acObjectTypeGraph = 19
Const acObjectTypeHighlight = 23
Const acObjectTypeLine = 1
Const acObjectTypePicture = 7
Const acObjectTypePolygon = 8
Const acObjectTypeRoundFrame = 3
Const acObjectTypeRow = 32
Const acObjectTypeSelection = 24
Const acObjectTypeSignature = 39
Const acObjectTypeStickyNote = 22
Const acObjectTypeTable = 16
Const acObjectTypeText = 5
 
' FileSaveOptionConstants
Const acFileSaveAll = 0
Const acFileSaveDefault = -1
Const acFileSaveView = 1
Const acFileSaveDesign = 2
Const acFileSavePDFA_7 = 3
Const acFileSavePDFA = 4
Const acFileSavePDF14 = 5
 
' Constants for Activation codes
Const strLicenseTo = "Amyuni PDF Creator Evaluation"
Const strActivationCode = "07EFCDAB010001004282943F2AF19A88F332D9E781E40460727DF8A42847A1BDE06DB61C71E94E2D90424BF8762385335F9D6884E9FC"
 
' Initializing PDFCreativeX Object
Dim pdf
Set pdf = CreateObject("PDFCreactiveX.PDFCreactiveX.6.5")
 
' Set license key
pdf.SetLicenseKey strLicenseTo, strActivationCode
 
' Set CurrentPage
pdf.CurrentPage = 1
 
' Create a Line in the current Page
pdf.CreateObject acObjectTypeLine, "Line1"
' Define Object
Dim oLine 
Set oLine = pdf.GetObjectByName("Line1")
' General Attributes
oLine("Left") = 1000
oLine("Right") = 3250
oLine("Top") = 0
oLine("Bottom") = 500
' Line Attributes
oLine("StrokeColor") = &HFF00FF
oLine("StrokeWidth") = acStrokeWidthTriple
 
' Save PDF
pdf.Save "c:\temp\CreatePDFDocument_resulting.pdf", acFileSaveView
 
' destroy Objects
Set pdf = Nothing
Set oLine = Nothing