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
@@ -1696,14 +1705,118 @@ Using document As New PdfDocument()
1696
1705
page2.Actions.OnOpen = soundAction
1697
1706
' Create and add new Launch action to execute when the second page closes
1698
1707
page2.Actions.OnClose = New PdfLaunchAction("logo.png")
1699
-
' Removing the close action on first page
1700
-
page1.Actions.OnClose = Nothing
1701
-
' Removing both open and close actions on second page
1702
-
page2.Actions.Clear(True)
1708
+
' Add third page to the document
1709
+
Dim page3 As PdfPage = document.Pages.Add()
1710
+
' Create and add new JavaScript action to execute when the third page opens
1711
+
Dim jsAction As PdfAction = New PdfJavaScriptAction(
1712
+
"app.alert(""Welcome! Third page has just been opened."");"
1713
+
)
1714
+
jsAction.Next = New PdfJavaScriptAction(
1715
+
"app.alert(""This is the second action."");"
1716
+
)
1717
+
jsAction.Next.Next = New PdfJavaScriptAction(
1718
+
"app.alert(""This is the third action."");"
1719
+
)
1720
+
page3.Actions.OnOpen = jsAction
1703
1721
' Save the document
1704
1722
document.Save("Output.pdf")
1705
1723
End Using
1706
1724
1707
1725
{% endhighlight %}
1708
1726
1709
-
{% endtabs %}
1727
+
{% endtabs %}
1728
+
1729
+
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Pages/Add-Page-Level-Actions-in-PDF/.NET).
1730
+
1731
+
## Removing page-level actions from PDF
1732
+
1733
+
Removes page‑level actions from PDF documents by disabling actions triggered on page open and page close events, ensuring that pages no longer execute automatic behaviors while preserving existing annotation actions where required.
1734
+
1735
+
Refer to the following code example for removing PDF page‑level actions.
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Pages/Removing-page-level-actions-from-PDF/.NET).
Copy file name to clipboardExpand all lines: Document-Processing/PDF/PDF-Viewer/react/Redaction/overview.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,9 @@ domainurl: ##DomainURL##
12
12
13
13
Redaction annotations hide confidential or sensitive information in a PDF. The Syncfusion React PDF Viewer (EJ2) enables marking areas or entire pages for redaction, customizing appearance, and applying changes permanently.
14
14
15
+
Check out the following video to learn how to Redact PDF Content in the React PDF Viewer.
To enable the redaction toolbar, configure the [`toolbarSettings.toolbarItems`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/toolbarsettings#toolbaritems) property of the PdfViewer instance to include the **RedactionEditTool**. See this [guide](./toolbar#enable-redaction-toolbar) to enable redaction toolbar.
0 commit comments