You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: net/advanced-operations/working-with-javascript/_index.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,7 +108,7 @@ A new property named JavaScript is added in Document class which has JavaScript
108
108
109
109
### Setting Expiry Date of a PDF Document Using JavaScript Actions
110
110
111
-
Aspose.PDF allows you to set an expiry date for a PDF document by embedding JavaScript Actions. This functionality ensures that the PDF becomes inaccessible after a specified date and time, enhancing document security and control. By leveraging JavaScript Actions, you can define precise expiration conditions down to the second, ensuring that the document's accessibility is tightly regulated.
111
+
Aspose.PDF allows you to set an expiry date for a PDF document by embedding JavaScript Actions. This functionality ensures the PDF becomes inaccessible after a specified date and time, enhancing document security and control. By leveraging JavaScript Actions, you can define precise expiration conditions down to the second, ensuring the document's accessibility is tightly regulated.
112
112
113
113
**You can achieve this by following these steps**
114
114
@@ -122,7 +122,7 @@ Aspose.PDF allows you to set an expiry date for a PDF document by embedding Java
122
122
4.**Set Open Action:** Associate the JavaScript action with the document's open action.
123
123
5.**Save Document:** Save the PDF with the embedded JavaScript that enforces the expiry condition.
124
124
125
-
Below you can find code snippets demonstrating this functionality in both C# (.NET) and Java.
125
+
Below are code snippets demonstrating this functionality in both C# (.NET) and Java.
126
126
127
127
The following C# code snippet demonstrates how to set an expiry date and time for a PDF document using JavaScript Actions with Aspose.PDF:
-**Security Considerations:** While JavaScript actions can control the behavior of a PDF document, they rely on the PDF viewer's support for JavaScript. Not all PDF viewers may honor these scripts, and users might have JavaScript execution disabled for security reasons.
175
175
176
-
-**Customization:**You can modify the JavaScript code to perform additional actions upon expiry, such as disabling certain features, redirecting to a specific page, or logging the event. Additionally, if necessary, you can check only the date of expiry without specifying the time.
176
+
-**Customization:**Modify the JavaScript code to perform additional actions upon expiry, such as disabling certain features, redirecting to a specific page, or logging the event. Additionally, if necessary, you can check only the date of expiry without specifying the time.
0 commit comments