Arrow 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 the stroke.

Color

COLORREF (bbggrr) 000000 to FFFFFF

or in COLORREF (aabbggrr) 00000000 to FFFFFFFF

000000 (Solid black)

ArrowWidth

Number of the stroke’s width.

Integer

 

3

ArrowHeadWidth

Number of the head’s width.

Integer

 

8

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

ArrowHeadLocation

Location of the Arrow’s head.

Integer

0: Second End Only

1: First End Only

2: Both Ends

0: Second End Only

ArrowHeadStyle

Style of the arrow’s head.

Integer

0: Filled Triangle

1: Two Lines

0: Filled Triangle

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

 

Example

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 an Arrow

    With page.CreateObject(Amyuni.PDFCreator.IacObjectType.acObjectTypeArrow, "Arrow1")

        ' General Attributes

        .Attribute("Left").Value = 1000        

        .Attribute("Right").Value = 3250

        .Attribute("Top").Value = 0

        .Attribute("Bottom").Value = 500

        ' Arrow Attributes

        .Attribute("StrokeColor").Value = &HFFFF00

        .Attribute("ArrowWidth").Value = 3

        .Attribute("ArrowHeadWidth").Value = 8

        .Attribute("ArrowHeadLocation").Value = 2

        .Attribute("ArrowHeadStyle").Value = 1

    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 an Arrow

    using (Amyuni.PDFCreator.IacObject oArrow = page.CreateObject(Amyuni.PDFCreator.IacObjectType.acObjectTypeArrow, "Arrow1"))

    {

        // General Attributes

        oArrow.Attribute("Left").Value = 1000;        

        oArrow.Attribute("Right").Value = 3250;

        oArrow.Attribute("Top").Value = 0;

        oArrow.Attribute("Bottom").Value = 500;

        // Arrow Attributes

        oArrow.Attribute("StrokeColor").Value = 0xFFFF00;

        oArrow.Attribute("ArrowWidth").Value = 3;

        oArrow.Attribute("ArrowHeadWidth").Value = 8;

        oArrow.Attribute("ArrowHeadLocation").Value = 2;

        oArrow.Attribute("ArrowHeadStyle").Value = 1;

    }

 

    // 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();

}