This content has been marked as final. Show 5 replies
1. PDF file will be placed in a folder after generation and that should not be copied to other locations.You can't control that from Java. You probably can't control it at all.
2. PDF file should only have an option print nothing else. The save/save as options should never be enabled.That should be in the security API if supported.
3. PDF expiry date is required, so that PDF file will get expire after duration.Ditto.
I have searched the apache FOP API, but I didn't find the relevant information.
Could you suggest me any other API, which will fullfill my concern.
<a href="http://www.lowagie.com/iText>iText</a>. I found that in 30 seconds with Google. You could have done that too, without the forum wait.
I did that too, with too much experiments.
Code snippet for reference.
PdfReader reader = new PdfReader(getOutputFilePath());
PdfStamper stamper = new PdfStamper(reader, new FileOutputStream("my-new-file.pdf"));
int permissions = PdfWriter.HideMenubar & PdfWriter.HideToolbar & PdfWriter.HideWindowUI & ~( PdfWriter.AllowCopy | PdfWriter.AllowModifyAnnotations | PdfWriter.AllowFillIn | PdfWriter.AllowAssembly | PdfWriter.AllowModifyContents | PdfWriter.AllowScreenReaders);
I am able to disable the save button, but I am unable to disable the save as option.
It would be great help, if you can give some inputs on this.
I can't. I don't know any more about it than you do. All I have is possibly a greater aptitude at reading API documents and using Google. You could develop both.