Hello,
I have an existing pdf created using Aspose.Words for java api.
Now I want to include in this pdf an auto print capability, so that, when the user open the pdf, he'll get automatically the acrobat print dialog.
Question : the Aspose.Pdf for java include Javascript(s) classes, is it possible to do that with Aspose.Pdf (I mean Aspose.Pdf NO Aspose.Pdf.Kit).
Here is a snippet of my code which fails on "You are in direct-to-file mode,please use Close() instead of Save()".
...
// create PDFContentEditor object
Pdf pdf = new Pdf(new BinaryFileStream(pdfFile.getName()));
// Add the javascript auto print capability
pdf.setJavaScripts(new JavaScripts());
pdf.getJavaScripts().add(new JavaScript("this.print(true);"));
pdf.save(pdfOutputPath);
...
Thanks by advance.