Copy link to clipboard
Copied
Hi Team,
Can Anyone provide the sample code to AddSticky Note Annot to Existing PDF File using VBA code using Acrobat SDK(JSObject).
Thanks
Mahesh
Hi Reinhard,
Sorry for the late Response.
Very Very Thanks for your Help..
It works more than my expectations.
One more time thanks for your help.
Thanks & Regards
Mahesh
Copy link to clipboard
Copied
I am sorry to report that programming with the Acrobat SDK is not about finding samples to copy/paste for your needs. Instead, it is about studying the thousands of pages of documentation and writing all the code yourself.
Copy link to clipboard
Copied
Here a quick vbs/vba code. Have a look at the SDK and especially on the Acrobat JS API Reference to change it to your needs.
Good Luck, Reinhard
Path = "D:\Test.pdf"
Set App = CreateObject("Acroexch.app")
app.show
Set AVDoc = CreateObject("AcroExch.AVDoc")
Set AForm = CreateObject("AFormAut.App") 'from AFormAPI
If AVDoc.Open(Path,"") Then
'// write some js code on a vbs variable
js = "var annot = this.addAnnot({" &vblf _
& "page: 0," &vblf _
& "type: ""Text"", " &vblf _
& "author: ""ReFran"", " &vblf _
& "point: [100,500], " &vblf _
& "contents: ""Call Smith to get help on this paragraph."", " &vblf _
& "noteIcon: ""Help"" " &vblf _
& "});"
'//execute the js code
AForm.Fields.ExecuteThisJavaScript js
end if
Set AForm = Nothing
Set AVDoc = Nothing
Set APP = Nothing
Copy link to clipboard
Copied
Hi Reinhard,
Sorry for the late Response.
Very Very Thanks for your Help..
It works more than my expectations.
One more time thanks for your help.
Thanks & Regards
Mahesh
Copy link to clipboard
Copied
Hi,
Could you please share a final code (script) which will add sticky note to PDF file ?
And also name, which .dll file is needed for this script (if any) ?
Thanks in advance,
BR
M.
Copy link to clipboard
Copied
Martyna, isn't that what the code that someone generously shared already does?
You don't need any DLLs, anyone with the paid-for Acrobat Pro in Windows can use these APIs.
Copy link to clipboard
Copied
I'm not sure, whether this is complete code or only part of them.
Futhermore there is a reference to following items:
From where I can get this items ? Any location on drive or it is something else ?
Copy link to clipboard
Copied
This items are part of Adobe Acrobat.