PDF Expiration

Hi, does anybody know if PDF or PDF.Kit supports pdf expiration and how to do it? I searched on the forums and on the samples but didn’t found it!


Thanks!

No one knows?

Hi Gian,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Sorry for a delayed response.

Well, currently Aspose.Pdf for .NET does not support any such feature. Please provide us some further details about your requirement so we can see if this feature can be implemented. Also, does Adobe Acrobat support any such feature (as I did not get such information)? If you have any details, please do share with us to understand the functionality.

Thank You & Best Regards,

No problem!

It works like this:

When you create/edit your pdf you can set an expiration date. On this date it will show a popup telling that the file expired and that you need a new one.

I can do this easily with javascript, but there's always the possibility that the javascript execution are disabled then we need another way. I know that you can do this using the Adobe LiveCycle but I found this program that did what I want http://www.armjisoft.com/?page=pdfownerguard and it seems to work well.

Thanks,

Gian

Hi Gian,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for the details.

I have created a new feature request in our issue tracking system with issue id: PDFNEWJAVA-33174. Our development team will further look into this requirement and share their feedback. I will update you once I get a response from the development team via this forum thread.

Sorry for the inconvenience,

The issues you have found earlier (filed as PDFNEWJAVA-33174) have been fixed in Aspose.Pdf for Java 9.3.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hi Gian,


In to accomplish the requirement of setting expiration date for PDF file, please try using the following code snippet. You need to use JavaScript as the files saved by OwnerGuard cannot be viewed on other workstations without mentioned utility.

The PDF file can be created via PDF OwnerGuard based on already existing file with Expiration Date. But this file (new one) can be opened only on workstation with installed PDF OwnerGuard (on other workstations (were PDF OwnerGuard isn’t installed) - we got ExpirationFeatureError on the image). For example, PDF Reader opens the file (in case OwnerGuard is installed), but Adobe Acrobat returns an error.

[Java]

Document doc = new Document(“d:\input.pdf”);<o:p></o:p>

JavascriptAction javaScript = new JavascriptAction(

"var year=2014;"

+ "var month=4;"

+ "today = new Date(); today = new Date(today.getFullYear(), today.getMonth());"

+ "expiry = new Date(year, month);"

+ "if (today.getTime() > expiry.getTime())"

+ "app.alert('The file is expired. You need a new one.');");

doc.setOpenAction(javaScript);

doc.save("d:\\JavaScript-Added.pdf");

Hi Codewarior,

Can you please tell how can i call a REST API method from this script

I tried the below code but doesnot work:

JavascriptAction javaScript = new JavascriptAction(

@"

if(app.getURL(‘[http://localhost:54905/employee/abc’)=='False](http://localhost:54905/employee/abc')=='False)’)

app.alert(‘TEST’);

this.closeDoc()");

I want to get a response back from this URL “http://localhost:54905/employee/abc”…

Please tell me the code through which i can get response and check for the expiry of the doc from my Rest Method by returning true or false?

Hi Gian,


Thanks for sharing the details.

We are further looking into this matter and will keep you updated with our findings.