I have created Dynamic Stamp and works perfect and its located in my user profile:

C:\Users\XXXXX\AppData\Roaming\Adobe\Acrobat\10.0\Stamps\symbols.php

And this works just fine...

Now I want to add a line to the stamp.

I want the user to introduce the length of the line using a response box (app.response)

For some reason when I try to add the line using:

var new_line = this.addAnnot({

type:"Line",

page:6,

points:[[36,373],[613,373]],

width:2,

style:"S ",

strokeColor:color.black,

arrowEnd:"None",

arrowBegin:"None"

});

After this, the variable "new_line" is NULL, can somebody help me here?

So I cant add the line using JavaScript

Ironically when I try to create a field (text box) using JavaScript it works perfectly ....

var oField=this.addField({

cName: "info",

cFieldType: "text",

nPageNum: 6,

oCoords: [ 20, 20, 1, 1 ]

});

oField.value = "Hello World !!!";

I am able to insert the line manually when I open the stamp file in Acrobat and add the line under Comment->Drawing Markups->Draw Line. However I want the length of the line to be inserted by the user when the user applies the stamp... Can anybody help me here?

Since you can add fields, an alternative might be to add a button and set the line style (borderStyle property) to underline. You'll have the same control over the length and position, but there are only three line widths available, but that may be sufficient.

Add the longest line that you want to show directly to the artwork of the stamp. Then add a number of text fields with opaque fills (probably white) on top. The number of fields corresponds to the increments that you want the user to be able to enter. Then just hide/show the text fields that you need based on the user input so that only the length of the line you want is shown.