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); - dss must
dictionary, notpdxobjectform. pddocumentcatalogadditionalactionsnot necessary. create "aa" because ofadditionalactionsnot needed.
Comments
Post a Comment