I'm here to request a little help, if possible.
I'm trying to create a file with odftoolkit (* .odt empty) with a password, but I'm not sure what the hell is going on.
I have two options:
-or create the file directly with a password using a method of the Document superclass (save (file and string)). However, if I use the save (file) without a string, it is created without problems.
-or do a set password afterwards. but in both I get method error not found.
page of the save method with string (password): link
--------- 1 ---------
TextDocument doc1 = TextDocument.newTextDocument ();
File = new File (dirNom.concat (". odt"));
doc1.save (file, "1234");
Exception in thread "main" java.lang.NoSuchMethodError: org.odftoolkit.odfdom.pkg.OdfPackage.setPassword (Ljava / lang / String;) V
--------- 2 ---------
TextDocument doc1 = TextDocument.newTextDocument ();
File = new File (dirNom.concat (". odt"));
doc1.save (file);
doc1.setPassword (password);
Exception in thread "main" java.lang.NoSuchMethodError: org.odftoolkit.odfdom.pkg.OdfPackage.setPassword (Ljava / lang / String;) V
One thing to note, in the page of simple api mentions that the DOM implementation is necessary ... for more laps that I give you I do not know what the hell it will be. Thanks in advance!