// variable to store whether document has been opened already or not
var bAlreadyOpened;
function docOpened()
{
if(bAlreadyOpened != "true")
{
// document has just been opened
var d = new Date();
var sDate = util.printd("mm/dd/yyyy", d);
// set date now
app.alert("About to insert date into field now");
this.getField("todaysDate").value = sDate;
// now set bAlreadyOpened to true so it doesn’t
// run again
bAlreadyOpened = "true";
}
else
{
// document has already been opened
}
}
// call the docOpened() function
docOpened();
'S.W. > PDF' 카테고리의 다른 글
[PDF/Javascript] addSubMenu, AddMenuItem, addToolButton (0) | 2021.08.06 |
---|---|
[PDF/Javascript] FDF/XFDF - Import / Export String/File (0) | 2021.08.06 |
[PDF/Javascript] Add Navigation Buttons To All Pages (0) | 2021.08.06 |
[PDF/Javascript] ADOBE - Acrobat DC Javascript 문서 (0) | 2021.08.06 |
[PDF/Javascript] getAnnots (Annotion, Comment, Markup, 주석) (0) | 2021.08.06 |