|
2 | 2 | layout: default-layout |
3 | 3 | noTitleIndex: true |
4 | 4 | needAutoGenerateSidebar: true |
5 | | -title: LoadImageEx File Dialog Closes Immediately on Linux |
| 5 | +title: File Dialog Closes Immediately on Linux |
6 | 6 | keywords: Dynamic Web TWAIN, Linux, LoadImageEx, File Dialog, GTK, libgtk2.0-0 |
7 | | -breadcrumbText: LoadImageEx File Dialog Closes Immediately on Linux |
8 | | -description: LoadImageEx File Dialog Closes Immediately on Linux |
| 7 | +breadcrumbText: File Dialog Closes Immediately on Linux |
| 8 | +description: File Dialog Closes Immediately on Linux |
9 | 9 | date: 2026-07-06 10:14:50 +0000 |
10 | | -last_modified: 2026-07-06 10:14:50 +0000 |
| 10 | +last_modified: 2026-07-07 07:45:50 +0000 |
11 | 11 | --- |
12 | 12 |
|
13 | | -# LoadImageEx File Dialog Closes Immediately on Linux |
| 13 | +# File Dialog Closes Immediately on Linux |
14 | 14 |
|
15 | | -### Symptom |
| 15 | +## Symptom |
16 | 16 |
|
17 | | -When calling the `LoadImageEx` API on Linux, the native file selection dialog briefly appears and then immediately closes. |
| 17 | +When calling the Load or Save related APIs on Linux, the native file selection dialog briefly appears and then immediately closes. |
18 | 18 |
|
19 | 19 | The operation fails, and the following message may be reported in the browser console: |
20 | 20 |
|
21 | 21 | ```text |
22 | 22 | User cancelled the operation. |
23 | 23 | ``` |
24 | 24 |
|
25 | | -### Issue characteristics |
| 25 | +## Issue characteristics |
26 | 26 |
|
27 | 27 | - Only occurs on Linux |
28 | | -- Occurs when calling the `LoadImageEx` API |
| 28 | +- Occurs when calling file load or save APIs, such as `LoadImageEx`, `SaveAsXXX`, `SaveAllAsXXX`, and `SaveSelectedImagesAsXXX` |
29 | 29 | - The native file dialog flashes briefly and then closes automatically |
30 | 30 | - The user is unable to select a file |
31 | 31 | - The browser console reports `User cancelled the operation` |
32 | 32 |
|
33 | | -### Reason |
| 33 | +## Reason |
34 | 34 |
|
35 | 35 | This issue is caused by a missing Linux system dependency. |
36 | 36 |
|
37 | 37 | Dynamic Web TWAIN relies on the GTK2 runtime library (`libgtk2.0-0`) to display the native file selection dialog on Linux. If this library is not installed, the dialog cannot be initialized correctly and is immediately closed by the operating system. Dynamic Web TWAIN therefore reports the operation as being cancelled by the user. |
38 | 38 |
|
39 | | -### Resolution |
| 39 | +## Resolution |
40 | 40 |
|
41 | 41 | Install the GTK2 runtime library on the Linux machine: |
42 | 42 |
|
|
0 commit comments