pdf - Rename PDXObjectForm created in /Catalog -


using pdfbox, want add pdxobjectform in /catalog entry. have using this:

         pdstream formstream = new pdstream(template);         pdxobjectform form = new pdxobjectform(formstream);         pdresources res = new pdresources();         form.setresources(res);         appendrawcommands(formstream.createoutputstream(), "testing");         // creates aa. need costum name object         pddocumentcatalogadditionalactions ac = new    pddocumentcatalogadditionalactions(res.getcosdictionary());         template.getdocumentcatalog().setactions(ac); 

but name of form in /catalog entry "aa". how can change name, example, "dss"?

what best way this? don't know how add pdxobjectform in /catalog entry. documentcatalogadditionalactions not best solution, know it's wrong , want use proper method.

can use pdxobjectform document secure store?

my solution:

    pddocumentcatalog cat = template.getdocumentcatalog();     cosdictionary catdoc = cat.getcosdictionary();      cosdictionary dssdictionary = new cosdictionary();     catdoc.setitem(cosname.getpdfname("dss"), dssdictionary); 
  1. dss must dictionary, not pdxobjectform.
  2. pddocumentcatalogadditionalactions not necessary. create "aa" because of additionalactions not needed.

Comments

Popular posts from this blog

javascript - JS causing window size to be bigger than necessary - Dropdown bug -

How to mention the localhost in android -

php - Calling a template part from a post -