Hello,
we were always using the Aspose Pdf 3.0.1 for Java and the following program was working for us:
I have tried different versions but this functionality seems to get broken on the version 4.3.0, as with the 4.2.1 it is still working.
Am I doing something wrong? Or what? Please explain.
Igor
we were always using the Aspose Pdf 3.0.1 for Java and the following program was working for us:
import aspose.pdf.Pdf;Recently we have updated to V. 9.3.0. But now PDF files generated by this simple program can not be opened with Acrobat Reader anymore. Acrobat asks for the password, you type "123", and it says "The password is wrong".
import aspose.pdf.Section;
import aspose.pdf.Security;
import aspose.pdf.Text;
public class Test {
public static void main (String args[]) throws Exception {
Pdf pdf = new Pdf();
Security pdfSecurity = new Security();
pdfSecurity.setUserPassword("123");
pdf.setSecurity(pdfSecurity);
Section section = pdf.getSections().add();
section.getParagraphs().add(new Text("bolabla"));
pdf.save("d:\\temp\\1\\2.pdf");
}
}
I have tried different versions but this functionality seems to get broken on the version 4.3.0, as with the 4.2.1 it is still working.
Am I doing something wrong? Or what? Please explain.
Igor