Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions _articles/extended-usage/file-import.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ description: Dynamic Web TWAIN SDK General Usage Guide - Loading Documents from

# Loading Documents from Files

![TIP]
> Prerequisite: [DWT Initialization](/_articles/general-usage/initialization.md)

On top of scanning images, DWT can also load documents from files on the file system, or files shared over the network. It can display, edit, and export these documents just the same as scanned images. This flexible design caters to mixed use, scanner-only, or file-only scenarios. We support the following file types: BMP, JPG, TIF, PNG, and PDF. DWT does not support all PDFs due to the complexities of the format, but the PDF rasterizer add-on does provide extra compatibility on top of base support in DWT. We can load in files through the following methods:

## Note on PDF Compatibility

The PDF rasterizer add-on provides compatibility for a broader range of PDFs. Here, we added the add-on script in the html head. For any loaded PDFs, the add-on rasterizes every page at the set resolution of 200 DPI. The PDF rasterizer can also selectively rasterize images only - check [`Dynamsoft.DWT.EnumDWT_ConvertMode`](/_articles/info/api/Dynamsoft_Enum.md#dynamsoftdwtenumdwt_convertmode) and [`SetReaderOptions()`](/_articles/info/api/Addon_PDF.md#setreaderoptions) for details.
![NOTE]
> The PDF rasterizer add-on provides compatibility for a broader range of PDFs. Here we use the add-on script in the `html` head. For any loaded PDFs, the add-on rasterizes every page at the set resolution of 200 DPI. The PDF rasterizer can also selectively rasterize images only - check [`Dynamsoft.DWT.EnumDWT_ConvertMode`](/_articles/info/api/Dynamsoft_Enum.md#dynamsoftdwtenumdwt_convertmode) and [`SetReaderOptions()`](/_articles/info/api/Addon_PDF.md#setreaderoptions) for details.

## Loading Files from the Selection UI

Expand Down Expand Up @@ -664,4 +664,4 @@ APIs used:

### Explanation

In addition to [`LoadDibFromClipboard()`](/_articles/info/api/WebTwain_IO.md#loaddibfromclipboard), we also used [`CopyToClipboard()`](/_articles/info/api/WebTwain_Edit.md#copytoclipboard) to copy the displayed image to the clipboard. The user can then click the paste button to load that image back in. Note that `CopyToClipboard()` does not accept success/failure callbacks.
In addition to [`LoadDibFromClipboard()`](/_articles/info/api/WebTwain_IO.md#loaddibfromclipboard), we also use [`CopyToClipboard()`](/_articles/info/api/WebTwain_Edit.md#copytoclipboard) to copy the displayed image to the clipboard. The user can then click the paste button to load that image back in. Note that `CopyToClipboard()` does not accept success/failure callbacks.
84 changes: 84 additions & 0 deletions _articles/faq/chrome-142-local-network-access-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
layout: default-layout
noTitleIndex: true
needAutoGenerateSidebar: true
title: Error message - Permission was denied for this request to access the unknown address space
keywords: Dynamic Web TWAIN, Error Troubleshooting, CORS, unknown address space, chrome, 142
breadcrumbText: Error message - Permission was denied for this request to access the unknown address space
description: CORS unknown address space
date: 2025-11-04 17:21:42 +0800
last_modified: 2025-11-04 17:21:42 +0800
---

# Error Troubleshooting

> [!IMPORTANT]
> This is a newly developing issue, and as such the information in this article may change over time.

## Error message - Access to fetch at `https://127.0.0.1:18623` or `http://127.0.0.1:18622` has been blocked by CORS policy: Permission was denied for this request to access the unknown address space.

### Symptom

When using browsers based on Chromium version 142 (released on October 28th, 2025) or later (including but not limited to Edge, Brave, and Opera), the Dynamsoft Web TWAIN Service installation cannot be detected, prompting the Dynamsoft Web TWAIN Service installation modal. Installing the service does not fix the issue.

You may also encounter the following error message in the browser console:

```shell
Access to fetch at 'https://127.0.0.1:18623/fa/VersionInfo?ts=1761893667670' from origin 'https://your-domain.com' has been blocked by CORS policy: Permission was denied for this request to access the `unknown` address space.
```

### Cause

In Chromium 142 Google introduced a new Local Network Access security policy. Requests from web pages hosted within iframes to local addresses such as 127.0.0.1 or localhost get blocked unless explicit permission is granted.

This affects the Dynamic Web TWAIN Service which relies on local services for communication.

### Solution

<div class="multi-panel-switching-prefix"></div>

- [Quick Solution for End Users](#Quick Solutions for End Users)
- [Solutions for Developers](#Solutions for Developers)

<div class="multi-panel-start"></div>

**Enable Local Network Access**

Make sure your website has Local Network Access enabled.

![local-network.png](/assets/imgs/local-network.png)

<div class="multi-panel-end"></div>

<div class="multi-panel-start"></div>

**Option 1:**

You can check the permission programmatically:

```javascript
let status = await navigator.permissions.query({ name: "local-network-access" });
console.log(status.state);
```

If the permission is not granted, prompt users to manually enable it (Chrome settings → Privacy and security → Site settings → Local network access).

> [!WARNING]
> If Dynamic Web TWAIN is running in an iframe, ensure the iframe element includes the following attribute:

```html
<iframe src="..." allow="local-network-access *"></iframe>
```

**Option 2: (For Enterprise Users)**

Enterprise administrators can allow specified URLs to access local resources through Chrome’s Enterprise Policy configuration.
Refer to: [Chrome Enterprise Policy List & Management | Documentation](https://chromeenterprise.google/policies/)

<div class="multi-panel-end"></div>

<div class="multi-panel-switching-end"></div>

### Planning

Dynamsoft plans to add a feature that automatically detects local service connectivity and permission status. If the connection is blocked, users will be prompted with a message and directed to this FAQ page.
2 changes: 2 additions & 0 deletions _articles/faq/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ description: Dynamic Web TWAIN SDK Documentation FAQ
31. [Dynamic Web TWAIN prompts the .deb installer for Windows](/_articles/faq/incorrect-installer-for-windowsARM64.md)
32. [Why am I unable to load the TIFF file into Dynamic Web TWAIN?](/_articles/faq/unable-to-load-4-bit-tiff.md)

33. [Error message - Permission was denied for this request to access the unknown address space](/_articles/faq/chrome-142-local-network-access-issue.md)

## Licensing and Purchase

1. [Is internet connectivity required to use all licenses?](/_articles/faq/is-internet-connectivity-required.md)
Expand Down
16 changes: 10 additions & 6 deletions _articles/faq/service-prompting-to-install-repeatedly.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ keywords: Dynamic Web TWAIN, Project Deployment and End-user Installation, insta
breadcrumbText: I have installed the Dynamic Web TWAIN Service on an end-user machine but still got asked to install it repeatedly. Why?
description: I have installed the Dynamic Web TWAIN Service on an end-user machine but still got asked to install it repeatedly. Why?
date: 2021-12-11 06:47:21 +0800
last_modified: 2024-05-15 13:39:41 +0800
last_modified: 2025-11-04 13:39:41 +0800
---

View all FAQs about [Project Deployment and End-user Installation](
Expand All @@ -17,25 +17,27 @@ https://www.dynamsoft.com/web-twain/docs/faq/#project-deployment-and-end-user-in

#### There are a few possible causes

1. The Dynamic Web TWAIN Service (also called "Dynamsoft Service") is not installed properly.
1. The Dynamic Web TWAIN Service (previously called "Dynamsoft Service") is not installed properly.

2. The Dynamic Web TWAIN Service is installed correctly but not started.

3. The requests sent to the Service are redirected because you are using a proxy server on IE.

4. The service's listening ports are blocked by another software, like anti-virus software.

5. The service is blocked by plugins you have installed in the browser. (e.g. NoScript)
5. The service is blocked by extensions or plugins you have installed in the browser. (e.g. NoScript, M*Modal Fluency Direct Web Connector)

6. You are accessing an HTTPS site on a Linux machine.

7. You are visiting a public HTTP website with Dynamic Web TWAIN SDK integrated via Chrome v94+ (or any Chromium v94+ based browsers)

8. You have added `Access-Control-Allow-Origin` setting in the `DSConfiguration.ini` file, but the request originates from a different domain and you didn't set [`IfCheckCORS`](/_articles/extended-usage/dynamsoft-service-configuration.md#access-control-allow-origin).

9. The local network access permission is not granted (required since Chrome 142).

#### The respective fixes are listed below

1. Check the path `C:\Program Files (x86)\Dynamsoft\Dynamic Web TWAIN Service {version number}` (for v19.0+) or `C:\Windows\SysWOW64\Dynamsoft\DynamsoftServicex64_{version number}` or `C:\Users\{UserName}\AppData\Roaming\Dynamsoft\DynamsoftService` and make sure you have [the correct files](/_articles/extended-usage/dynamsoft-service-configuration.md#related-files-and-folders){:target="_blank"}.
1. Check the service's [installation folder](/_articles/extended-usage/dynamsoft-service-configuration.md#installation-folder) and make sure you have [the correct files](/_articles/extended-usage/dynamsoft-service-configuration.md#related-files-and-folders){:target="_blank"}.

2. Check `Local Services` and make sure the Dynamic Web TWAIN Service is listed and Running.

Expand All @@ -45,10 +47,12 @@ https://www.dynamsoft.com/web-twain/docs/faq/#project-deployment-and-end-user-in

4. Check your anti-virus software or any other software that can block local ports and make sure the ports 18622, 18623, 18625 and 18626 are not blocked.

5. Disable all the plugins in the browser, refresh and try again.
5. Disable all the extensions or plugins in the browser, refresh and try again.

6. On your Linux client machine, visit https://127.0.0.1:18626 and https://127.0.0.1:18623 separately in Chrome and FireFox, manually add both certificates to the exception lists.

7. See the solution [here](/_articles/faq/http-insecure-websites-in-chromium-browser.md){:target="_blank"}

8. Set [`IfCheckCORS`](/_articles/info/api/Dynamsoft_WebTwainEnv.md#ifcheckcors) to `true` in `dynamsoft.webtwain.config.js` file.
8. Set [`IfCheckCORS`](/_articles/info/api/Dynamsoft_WebTwainEnv.md#ifcheckcors) to `true` in `dynamsoft.webtwain.config.js` file.

9. Ask the user to grant the local network access permission manually. See this [webpage](https://chromestatus.com/feature/5152728072060928) for details.
Binary file added assets/imgs/global-network.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/imgs/local-network.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.