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
You can visit the [online demo](https://demo.dynamsoft.com/Samples/dwt/OCR/index.html) to try it.
27
+
24
28
## How to Use
25
29
26
30
### Step One - Install the OCR Package
27
31
28
-
Download [DynamicWebTWAINOCRResources.zip](https://download2.dynamsoft.com/dwt/DynamicWebTWAINOCRResources.zip), unzip it and run `Install.cmd` inside the `DynamicWebTWAINOCRPack.zip` file as admin to install the OCR package. It will copy an `ocr` folder to the service's [installation folder](/_articles/extended-usage/dynamsoft-service-configuration.md#installation-folder). (You need to install Dynamic Web TWAIN Service beforehand.)
32
+
Download [DynamicWebTWAINOCRResources.zip](https://download2.dynamsoft.com/dwt/DynamicWebTWAINOCRResources.zip), unzip it and run `Install.cmd` inside the `DynamicWebTWAINOCRPack.zip` file as admin to install the OCR package.
33
+
34
+
It will copy an `ocr` folder to Dynamic Web TWAIN Service's [installation folder](/_articles/extended-usage/dynamsoft-service-configuration.md#installation-folder). The `ocr` folder contains the runtime and model files that are required to perform on-device OCR.
29
35
30
-
The `ocr` folder contains the runtime and model files that are required to perform on-device OCR.
36
+
PS: You need to [install Dynamic Web TWAIN Service](/_articles/extended-usage/dynamsoft-service-configuration.md#installation-of-dynamic-web-twain-service) beforehand.
31
37
32
38
### Step Two - Write a Basic Document Scanning Page
breadcrumbText: How can I load PDF/A files into the Dynamic Web TWAIN SDK?
8
8
description: How can I load PDF/A files into the Dynamic Web TWAIN SDK?
9
9
date: 2021-12-01 01:09:41 +0800
10
-
last_modified: 2025-12-10 15:53:54 +0800
10
+
last_modified: 2025-12-11 14:20:54 +0800
11
11
---
12
12
13
13
# Addon
14
14
15
15
## How can I load PDF/A files into the Dynamic Web TWAIN SDK?
16
16
17
-
Dynamic Web TWAIN can load PDF/A files, but whether the PDF Rasterizer add-on is required depends on the content of the PDF/A file:
17
+
Dynamic Web TWAIN can load PDF/A files. Whether you need the **[PDF Rasterizer Add-on (PDFR)](https://www.dynamsoft.com/web-twain/pdf-to-image-javascript/)**depends entirely on the contents of the PDF/A document:
18
18
19
-
- If the PDF/A contains text or vector graphics, it must be rasterized, and therefore requires the PDF Rasterizer add-on.
20
-
- If the PDF/A contains only raster images, it can be loaded without the PDF Rasterizer.
19
+
- If the PDF/A contains **text or vector graphics**, rasterization is required → **PDFR license needed**.
20
+
- If the PDF/A contains **only raster images**, the file can be loaded **without** the PDFR add-on.
21
21
22
-
You can programmatically check whether a file needs rasterization using [`IsRasterizationRequired()`](/_articles/info/api/Addon_PDF.html#israsterizationrequired):
22
+
> [!NOTE]
23
+
> **Looking for information about generating PDF/A files?**
24
+
>
25
+
> Starting from Dynamic Web TWAIN 19.3, PDF/A creation is supported.
26
+
>
27
+
> See: [How can I generate PDF/A files?](/_articles/faq/generate-pdf-files.md)
28
+
29
+
### How to check whether rasterization is required
30
+
31
+
You can programmatically detect whether a given PDF/A file requires rasterization before loading it:
23
32
24
33
```javascript
25
34
DWTObject.Addon.PDF.IsRasterizationRequired(path); // returns true or false
26
35
```
27
36
28
-
When enabled, the add-on automatically rasterizes PDF/A documents into images when they are loaded into the viewer.
29
-
30
-
> [!NOTE]
31
-
> **Looking for information about generating PDF/A files?**
32
-
> Starting from Dynamic Web TWAIN 19.3, PDF/A creation is supported.
33
-
> See: [How can I generate PDF/A files?](/_articles/faq/generate-pdf-files.md)
37
+
If this method returns **`true`**, the SDK will need the PDFR to process the file.
34
38
39
+
### When rasterization actually happens
35
40
36
-
### When is PDF Rasterizer used?
41
+
Dynamic Web TWAIN performs rasterization **only when necessary**. If [`IsRasterizationRequired()`](/_articles/info/api/Addon_PDF.md#israsterizationrequired) returns **`true`** and the PDF Rasterizer license is configured, the SDK automatically rasterizes the PDF into images using the reader settings you specify.
37
42
38
-
Once the PDF Rasterizer (`PDFR`) is configured, it automatically rasterizes the file *only when needed*.
39
-
If rasterization is required, the PDF is converted into one or more images at the specified resolution (default **200 DPI**).
43
+
The rasterization behavior—including resolution (default **200 DPI**) and other rendering parameters—can be customized through [`SetReaderOptions()`](/_articles/info/api/Addon_PDF.md#setreaderoptions).
40
44
41
-
Rasterization may occur when using any of the following APIs (including drag-and-drop):
42
45
46
+
Rasterization may occur when using any of these APIs (including drag-and-drop):
0 commit comments