VB.Net, Specifying Parameters for AcroExch.PDPage/etc...


the end goal: programmatically add annotations pdf through vb.net windows form document.

 

the issue: using addannot() jsobj situation.

 

where i'm stuck:

 

i've found great adobe references seemed promising , have answered other questions. issue in "javascript acrobat api reference" parameters addannot() function (i think function right word) not explicit others. example, addwatermarkfromfile() reference lists 16 parameters, each name, they're specifying, , default values. in sdk reference addwatermarkfromfile() there 16 parameters specified, , can manipulated in sensible enough manner. example:

 

however, addannot() reference parameter listed "object literal", described containing properties of annotation object.

 

i've found list of properties, , syntax can specify of of them? reference shows them specifed follows:

 

var sqannot = this.addannot({type: "square", page: 0});

 

or

var annot = this.addannot

({

page: 0,

type: "text",

author: "a. c. robat",

point: [300,400],

strokecolor: color.yellow,

contents: "need little paragraph.",

noteicon: "help"

});

 

my rationale (which incorrect) suggests call second example by:

 

   dim srcpage acrobat.cacropdpage

   srcpage = createobject("acroexch.pdpage")

   jsstampobj = srcdoc.getjsobject

 

jsstampobj.addannot(0, "text", "a. c. robat", new point(300,400), jsstampobj.color.blue, "need little paragraph", "help")

 

 

but i'm unsure if above remotely correct either, haven't specified page annotation should added. efforts far have been shove code loop watermarkjsovb() project sdk uses place watermarks. addwatermarkfromfile has parameter document should pointing , page on ti place mark, i've seen no such parameter in reference relating add annot. still unsure how point @ pages well, , have had success pddoc objects , splitting pages / creating new pdfs, straight sdk.

 

i digress! input?

you have in multiple steps. here sample application creates stamp annotation. have adjust annotation type specific situation:

 

        dim stamprect(3) integer                dim annot object         dim props object          set jso = gpddoc.getjsobject          stamprect(0) = 100         stamprect(1) = 100         stamprect(2) = 200         stamprect(3) = 200                 ' create new stamp annot         set annot = jso.addannot                 ' cannot properties, change type , push cannot object again         set props = annot.getprops         props.type = "stamp"         annot.setprops props                 ' fill in necessary fields         set props = annot.getprops         props.page = 0         props.rect = stamprect         props.author = "my name"         props.ap = "approved"         annot.setprops props 


More discussions in Acrobat SDK


adobe

Comments

Popular posts from this blog

Illustrator CS6 Ocurrío un error E/S en el archivo.

Why is os_ViewContainer running?

Animate - problem with duplicating scripts after loop