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: Document-Processing/PDF/PDF-Viewer/react/download.md
+83-5Lines changed: 83 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,15 +7,25 @@ platform: document-processing
7
7
documentation: ug
8
8
domainurl: ##DomainURL##
9
9
---
10
+
10
11
# Download in React PDF Viewer component
11
12
12
-
The PDF Viewer component supports downloading the loaded PDF file. Enable or disable the download using the example below.
13
+
The React PDF Viewer allows users to download the currently loaded PDF, including any annotations, form‑field edits, ink drawings, comments, or page reorganizations. Downloading produces a local PDF file containing all applied changes. This guide shows ways to download a PDF displayed in the PDF Viewer: using the built-in toolbar, and programmatically after editing.
14
+
15
+
## Download the PDF Using the Toolbar
16
+
17
+
The viewer's toolbar can include a download button when the `Toolbar` service is injected. When enabled, users can click the toolbar download icon to save the currently loaded PDF.
18
+
19
+
**Notes:**
20
+
21
+
- Ensure `Toolbar` is included in the `Inject` services for `PdfViewerComponent` and `DownloadOption` is included in `toolbarItems`.
22
+
- See the [toolbar items documentation](./toolbar-customization/primary-toolbar#3-show-or-hide-primary-toolbar-items) for customizing or hiding the default download icon.
13
23
14
24

15
25
16
-
Invoke the download action using the following example.
26
+
## Download an Edited PDF Programmatically
17
27
18
-
N> The examples obtain the viewer instance and call `download()`. Prefer using the component `ref` to access the viewer instance when available rather than direct DOM lookup.
28
+
You can invoke the viewer's `download()` method to trigger a download programmatically. The examples below show a standalone setup and a server-backed setup to trigger download action.
19
29
20
30
{% tabs %}
21
31
{% highlight js tabtitle="Standalone" %}
@@ -94,7 +104,75 @@ root.render(<App />);
94
104
{% endhighlight %}
95
105
{% endtabs %}
96
106
107
+
## Download a PDF with Flattened Annotations
108
+
109
+
You can intercept the viewer's `downloadStart` event, cancel the default download, obtain the document as a `Blob` via `saveAsBlob()`, and flatten annotations before saving the resulting PDF.
Copy file name to clipboardExpand all lines: Document-Processing/PDF/PDF-Viewer/react/save-pdf-files.md
+110-1Lines changed: 110 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -253,9 +253,118 @@ Each link below goes to a provider page with simple, step-by-step instructions a
253
253
-[Box](./save-pdf-file/to-box-cloud-file-storage)
254
254
-[Azure AD (auth notes)](./save-pdf-file/to-azure-active-directory)
255
255
256
+
## Export PDF with or without annotations
257
+
258
+
The React PDF Viewer allows exporting the current PDF along with annotations, or exporting a clean version without annotations. This gives flexibility depending on workflow review mode, sharing, or securing final documents.
259
+
260
+
### Export PDF with annotations
261
+
262
+
The PDF is exported with annotations and form fields by default. You can download a PDF using the download button in the built‑in toolbar or through the `download` API. See the [download guide](./download) for further explanation.
263
+
264
+
### Export PDF without annotations
265
+
266
+
The PDF can be exported without annotations by setting the `skipDownload` API to true in `annotationSettings`.
PDFs can also be exported after importing annotations. The following code example uses the `downloadStart` event to cancel the download action and import the annotations from a JSON file before downloading the PDF document.
0 commit comments