Is it possible to modify PDF Form Field Names?

前端 未结 9 2289
一个人的身影
一个人的身影 2021-02-06 06:05

Here\'s the situation. I have a PDF with automatically generated pdf form field names. The problem is that these names are not very user friendly. They look something like :

9条回答
  •  Happy的楠姐
    2021-02-06 06:31

    best way is to store fields rect and then create new field with desired name and stored rect position, new field will be on same position as old field, ta da :) here is the code:

    Sub CreateNewField()
     Create = "var f = this.getField('" & oldFieldName & "'); var rect = f.rect; 
     this.addField('" & newFieldName & "','text',0,rect);"
     FormFields.ExecuteThisJavascript Create
     DeleteField 'sub to delete old field
    End Sub
    

提交回复
热议问题