Skip to content

Commit 9f008c1

Browse files
1014821: Added API reference links
1 parent 2cb3119 commit 9f008c1

4 files changed

Lines changed: 21 additions & 21 deletions

File tree

Document-Processing/PDF/PDF-Viewer/react/download.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ The React PDF Viewer allows users to download the currently loaded PDF, includin
1414

1515
## Download the PDF Using the Toolbar
1616

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.
17+
The viewer's toolbar can include a download button when the [`Toolbar`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/toolbar) service is injected. When enabled, users can click the toolbar download icon to save the currently loaded PDF.
1818

1919
**Notes:**
2020

21-
- Ensure `Toolbar` is included in the `Inject` services for `PdfViewerComponent` and `DownloadOption` is included in `toolbarItems`.
21+
- Ensure [`Toolbar`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/toolbar) is included in the `Inject` services for [`PdfViewerComponent`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer) and `DownloadOption` is included in [`toolbarItems`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/toolbarsettingsmodel#toolbaritems).
2222
- See the [toolbar items documentation](./toolbar-customization/primary-toolbar#3-show-or-hide-primary-toolbar-items) for customizing or hiding the default download icon.
2323

2424
![Download button in PDF Viewer](./images/download.png)
2525

2626
## Download an Edited PDF Programmatically
2727

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.
28+
You can invoke the viewer's [`download()`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#download) method to trigger a download programmatically. The examples below show a standalone setup and a server-backed setup to trigger download action.
2929

3030
{% tabs %}
3131
{% highlight js tabtitle="Standalone" %}
@@ -106,7 +106,7 @@ root.render(<App />);
106106

107107
## Download a PDF with Flattened Annotations
108108

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.
109+
You can intercept the viewer's [`downloadStart`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#downloadstart) event, cancel the default download, obtain the document as a `Blob` via [`saveAsBlob()`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#saveasblob), and flatten annotations before saving the resulting PDF.
110110

111111
{% tabs %}
112112
{% highlight ts tabtitle="App.tsx" %}

Document-Processing/PDF/PDF-Viewer/react/forms/flatten-form-fields.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ Flattening PDF forms converts interactive fields such as textboxes, dropdowns, c
2121

2222
## Flatten forms before downloading PDF
2323

24-
1. Add a ref to the `PdfViewerComponent` so you can access viewer APIs from event handlers.
25-
2. Intercept the download flow using `downloadStart` and cancel the default flow.
26-
3. Retrieve the viewer's blob via `saveAsBlob()` and convert the blob to base64.
24+
1. Add a ref to the [`PdfViewerComponent`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer) so you can access viewer APIs from event handlers.
25+
2. Intercept the download flow using [`downloadStart`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#downloadstart) and cancel the default flow.
26+
3. Retrieve the viewer's blob via [`saveAsBlob()`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#saveasblob) and convert the blob to base64.
2727
4. Use `PdfDocument` from Syncfusion PDF Library to open the document, set `field.flatten = true` for each form field, then save.
28-
5. For the flattening the form fields when downloading through *Save As* option in Page Organizer, repeat steps 2–4 by using `pageOrganizerSaveAs` event.
28+
5. For the flattening the form fields when downloading through *Save As* option in Page Organizer, repeat steps 2–4 by using [`pageOrganizerSaveAs`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#pageorganizersaveas) event.
2929

3030
## Complete example
3131

@@ -111,8 +111,8 @@ export default function App() {
111111

112112
## Troubleshooting
113113

114-
- If viewerRef is null, ensure `ref={viewerRef}` is present and the component has mounted before invoking `saveAsBlob()`.
115-
- Missing `resourceUrl`: If viewer resources are not reachable, set `resourceUrl` to the correct CDN or local path for the ej2-pdfviewer-lib.
114+
- If viewerRef is null, ensure `ref={viewerRef}` is present and the component has mounted before invoking [`saveAsBlob()`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#saveasblob).
115+
- Missing [`resourceUrl`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#resourceurl): If viewer resources are not reachable, set [`resourceUrl`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#resourceurl) to the correct CDN or local path for the ej2-pdfviewer-lib.
116116

117117
## Related topics
118118

Document-Processing/PDF/PDF-Viewer/react/forms/submit-form-data.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ The React PDF Viewer allows submitting filled form data like text fields, checkb
2525

2626
1. Enable form designer in the viewer
2727

28-
- Inject `FormFields` and `FormDesigner` services into the viewer so form APIs are available.
28+
- Inject `FormFields` and [`FormDesigner`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formdesigner) services into the viewer so form APIs are available.
2929

3030
2. Export form data from the viewer
3131

32-
- Use `viewer.exportFormFieldsAsObject()` to obtain the filled values as JSON.
32+
- Use [`viewer.exportFormFieldsAsObject()`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#exportformfieldsasobject) to obtain the filled values as JSON.
3333

3434
3. POST the exported JSON to your back end
3535

@@ -103,10 +103,10 @@ export default function SubmitFormExample() {
103103

104104
## Troubleshooting
105105

106-
- **No form values returned**: Ensure the PDF has interactive fields and the viewer has finished loading before calling `exportFormFieldsAsObject()`.
106+
- **No form values returned**: Ensure the PDF has interactive fields and the viewer has finished loading before calling [`exportFormFieldsAsObject()`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#exportformfieldsasobject).
107107
- **CORS errors**: Enable CORS on the server or serve both frontend and back end from the same origin during testing.
108108
- **Server rejects payload**: Confirm the server expects `application/json` and validates shape of the object.
109-
- **WASM or resource errors**: Ensure `resourceUrl` points to the correct Syncfusion PDF Viewer library files.
109+
- **WASM or resource errors**: Ensure [`resourceUrl`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#resourceurl) points to the correct Syncfusion PDF Viewer library files.
110110

111111
## Use cases
112112

Document-Processing/PDF/PDF-Viewer/react/save-pdf-files.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -253,17 +253,17 @@ Each link below goes to a provider page with simple, step-by-step instructions a
253253
- [Box](./save-pdf-file/to-box-cloud-file-storage)
254254
- [Azure AD (auth notes)](./save-pdf-file/to-azure-active-directory)
255255

256-
## Export PDF with or without annotations
256+
## Save PDF with or without annotations
257257

258258
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.
259259

260-
### Export PDF with annotations
260+
### Save PDF with annotations
261261

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.
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`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#download) API. See the [download guide](./download) for further explanation.
263263

264-
### Export PDF without annotations
264+
### Save PDF without annotations
265265

266-
The PDF can be exported without annotations by setting the `skipDownload` API to true in `annotationSettings`.
266+
The PDF can be exported without annotations by setting the [`skipDownload`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/annotationsettingsmodel#skipdownload) API to true in [`annotationSettings`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#annotationsettings).
267267

268268
{% highlight ts %}
269269
{% raw %}
@@ -281,9 +281,9 @@ The PDF can be exported without annotations by setting the `skipDownload` API to
281281
{% endraw %}
282282
{% endhighlight %}
283283

284-
### Export after restoring annotations
284+
### Save after restoring annotations
285285

286-
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.
286+
PDFs can also be exported after importing annotations. The following code example uses the [`downloadStart`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#downloadstart) event to cancel the download action and import the annotations from a JSON file before downloading the PDF document.
287287

288288
{% tabs %}
289289
{% highlight ts tabtitle="App.tsx" %}

0 commit comments

Comments
 (0)