Skip to content

Commit 87be45a

Browse files
authored
Merge pull request #2098 from syncfusion-content/1003264-ug
1003264-ug: Updated the .wasm script inclusion details in JavaScript PDF UG pages.
2 parents 4a0152f + 79a8a55 commit 87be45a

8 files changed

Lines changed: 25 additions & 32 deletions

Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-angular.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,12 @@ All Syncfusion<sup>&reg;</sup> JS 2 packages are published in `npmjs.com` regist
4343
```bash
4444
npm install @syncfusion/ej2-pdf --save
4545
```
46-
N> For data extraction features, you need to install the `@syncfusion/ej2-pdf-data-extract` package as an add-on.
47-
* Copy the contents of the openjpeg folder from ./node_modules/@syncfusion/ej2-pdf-data-extract/dist to the public directory using the command:
48-
```bash
49-
cp -R ./node_modules/@syncfusion/ej2-pdf-data-extract/dist/openjpeg ./src/assets/openjpeg
50-
```
51-
* Confirm that there is an `openjpeg` directory within your src/assets directory if you are extracting images from PDFs.
52-
* Ensure your server serves .wasm files with the Content-Type: application/wasm MIME type (Angular dev server handles this by default; configure your production server accordingly).
46+
N> For image and data extraction features, you need to install the `@syncfusion/ej2-pdf-data-extract` package as an add-on.
47+
* Copy the `ej2-pdf-lib` folder from the @syncfusion/ej2-pdf-data-extract package into your project's **public, dist, or assets** directory (where your static files are served).
48+
* Make sure the `ej2-pdf-lib` folder exists in your final build output if you need to extract images or data from PDF files.
49+
* Ensure your server serves .wasm files with the **Content-Type: application/wasm** MIME type.
50+
(Angular’s development server already handles this; configure production servers manually.)
51+
* This setup is not required for **basic PDF creation**.
5352

5453
## Create a PDF document
5554

Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-asp-net-core.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ N> Check out the following topics for including script references in an ASP.NET
3939
* [CDN](https://ej2.syncfusion.com/aspnetcore/documentation/common/adding-script-references#cdn-reference)
4040
* [NPM Package](https://ej2.syncfusion.com/aspnetcore/documentation/common/adding-script-references#node-package-manager-npm)
4141
* [CRG](https://ej2.syncfusion.com/aspnetcore/documentation/common/custom-resource-generator)
42-
And ensure the application includes an `openjpeg` folder under `wwwroot` (or a publicly accessible static path). This folder must contain the `openjpeg.js` and `openjpeg.wasm` files, along with the PDF file to extract images. Keep these in the same static content area as `ej2.min.js`.
42+
For image and data extraction features, you need to install the `@syncfusion/ej2-pdf-data-extract` package as an add-on.
43+
Ensure that your application includes an `ej2-pdf-lib` folder within a publicly accessible static directory (such as wwwroot, public, or dist). This folder must contain the required `.js` and `.wasm` files needed for image and data extraction.
4344

4445
Step 6: **Create a PDF document**: Add the script in `~/Views/Home/Index.cshtml` by creating a button and attaching a click event that uses the JavaScript PDF API to generate a PDF document.
4546

Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-asp-net-mvc.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ N> Check out the following topics for including script references in an ASP.NET
4040
* [CDN](https://ej2.syncfusion.com/aspnetmvc/documentation/common/adding-script-references)
4141
* [NPM Package](https://ej2.syncfusion.com/aspnetmvc/documentation/common/adding-script-references#node-package-manager-npm)
4242
* [CRG](https://ej2.syncfusion.com/aspnetmvc/documentation/common/custom-resource-generator)
43-
And ensure the application includes an `openjpeg` folder under `Scripts` (or a publicly accessible static path). This folder must contain the `openjpeg.js` and `openjpeg.wasm` files, along with the PDF file to extract images. Keep these in the same static content area as `ej2.min.js`.
43+
For image and data extraction features, you need to install the `@syncfusion/ej2-pdf-data-extract` package as an add-on.
44+
Ensure that your application includes an `ej2-pdf-lib` folder within a publicly accessible static directory (such as wwwroot, public, or dist). This folder must contain the required `.js` and `.wasm` files needed for image and data extraction.
4445

4546
Step 6: **Create a PDF document**: Add the script in `~/Views/Home/Index.cshtml` by creating a button and attaching a click event that uses the JavaScript PDF API to generate a PDF document.
4647

Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-javascript.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,8 @@ Step 3: Create a HTML page (index.html) in `my-app` location and add the CDN lin
3535
{% endhighlight %}
3636
{% endtabs %}
3737

38-
N> For image/data extraction features, install and deploy the openjpeg runtime. Place an openjpeg folder alongside your index.html (or any publicly accessible static path) containing:
39-
* `openjpeg.js`
40-
* `openjpeg.wasm`
41-
Ensure your server serves .wasm files with the Content-Type: application/wasm MIME type. This is not required for basic PDF creation.
38+
N> For image and data extraction features, you need to install the `@syncfusion/ej2-pdf-data-extract` package as an add-on.
39+
Ensure that your application includes an `ej2-pdf-lib` folder within a publicly accessible static directory (such as wwwroot, public, or dist). This folder must contain the required `.js` and `.wasm` files needed for image and data extraction.
4240

4341
Step 4: **Create a PDF document**: Add the script in `index.html` by creating a button and attaching a click event that uses the JavaScript PDF API to generate a PDF document.
4442

Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-react.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@ All Syncfusion JS 2 packages are published in `npmjs.com` registry.
2323
```bash
2424
npm install @syncfusion/ej2-pdf --save
2525
```
26-
N> For image/data extraction features, you need to install the `@syncfusion/ej2-pdf-data-extract` package as an add-on.
27-
* Copy the contents of the openjpeg folder from ./node_modules/@syncfusion/ej2-pdf-data-extract/dist to the public directory using the command:
28-
```bash
29-
cp -R ./node_modules/@syncfusion/ej2-pdf-data-extract/dist/openjpeg public/openjpeg
30-
```
31-
* Confirm that there is an 'openjpeg' directory within your public directory if you are extracting images from PDFs.
32-
* Ensure your server serves .wasm files with the Content-Type: application/wasm MIME type.
26+
N> For image and data extraction features, you need to install the `@syncfusion/ej2-pdf-data-extract` package as an add-on.
27+
* Copy the `ej2-pdf-lib` folder from the @syncfusion/ej2-pdf-data-extract package into your project's **public, dist, or assets** directory (where your static files are served).
28+
* Make sure the `ej2-pdf-lib` folder exists in your final build output if you need to extract images or data from PDF files.
29+
* Ensure your server serves .wasm files with the **Content-Type: application/wasm** MIME type.
30+
* This setup is not required for **basic PDF creation**.
3331

3432
**Create a PDF document**: Add the script in `App.jsx` by creating a button and attaching a click event that uses the JavaScript PDF API to generate a PDF document.
3533

Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-typescript.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@ All Syncfusion JS 2 packages are published in `npmjs.com` registry.
2323
```bash
2424
npm install @syncfusion/ej2-pdf --save
2525
```
26-
N> For image/data extraction features, install the `@syncfusion/ej2-pdf-data-extract` add-on. Place an openjpeg folder alongside your built static assets (for example, under public or dist) containing:
27-
* openjpeg.js
28-
* openjpeg.wasm
29-
Ensure your server serves .wasm files with the Content-Type: application/wasm MIME type. This is not required for basic PDF creation.
26+
N> For image and data extraction features, you need to install the `@syncfusion/ej2-pdf-data-extract` package as an add-on.
27+
Ensure that your application includes an `ej2-pdf-lib` folder within a publicly accessible static directory (such as wwwroot, public, or dist). This folder must contain the required `.js` and `.wasm` files needed for image and data extraction. This setup is not required for **basic PDF creation**.
3028

3129
## Dependencies
3230

Document-Processing/PDF/PDF-Library/javascript/Create-PDF-document-vue.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,11 @@ or
5252
yarn add @syncfusion/ej2-pdf
5353
```
5454

55-
N> For image/data extraction features, you need to install the `@syncfusion/ej2-pdf-data-extract` package as an add-on.
56-
* Copy the contents of the openjpeg folder from ./node_modules/@syncfusion/ej2-pdf-data-extract/dist to the public directory using the command:
57-
```bash
58-
cp -R ./node_modules/@syncfusion/ej2-pdf-data-extract/dist/openjpeg public/js/openjpeg
59-
```
60-
* Confirm that there is an 'openjpeg' directory within your public directory if you are extracting images from PDFs.
61-
* Ensure your server serves .wasm files with the Content-Type: application/wasm MIME type.
55+
N> For image and data extraction features, you need to install the `@syncfusion/ej2-pdf-data-extract` package as an add-on.
56+
* Copy the `ej2-pdf-lib` folder from the @syncfusion/ej2-pdf-data-extract package into your project's **public, dist, or assets** directory (where your static files are served).
57+
* Make sure the `ej2-pdf-lib` folder exists in your final build output if you need to extract images or data from PDF files.
58+
* Ensure your server serves .wasm files with the **Content-Type: application/wasm** MIME type.
59+
* This setup is not required for **basic PDF creation**.
6260

6361
* **Create a PDF document**: Add the script in `App.vue` by creating a button and attaching a click event that uses the JavaScript PDF API to generate a PDF document.
6462

Document-Processing/PDF/PDF-Library/javascript/Shapes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The PDF has support for adding the below shapes.
2121

2222
## Adding Shapes to a PDF document
2323

24-
JavaScript PDF supports adding shapes with different types of brushes like solid bush, gradient brush, tiling brush, and image brush along with various color spaces and transparency levels.
24+
The JavaScript PDF library supports shape rendering exclusively with PDF solid brushes.
2525

2626
### Line
2727

0 commit comments

Comments
 (0)