Skip to content

Commit bc79961

Browse files
authored
Merge pull request #538 from dynamsoft-docs/preview
Preview
2 parents 82a0276 + d6d67df commit bc79961

File tree

3 files changed

+412
-2
lines changed

3 files changed

+412
-2
lines changed

faq/failed-to-load-resource.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ In this case, if you are trying to access an application that integrates a versi
2929

3030
- For v17.1.1 or older versions, choose one of the following approaches:
3131
- Method 1. Upgrade to V18.0+ which comes with a valid certificate
32-
- Method 2. If you must fix the issue on a few client machines immediately, manually update the following cert files on the client-side machine. Click <a href="https://tst.dynamsoft.com/public/download/dwt/newcert/local.dynamsoft.com/newcert.zip" target="_blank">here</a> to download the new certificate and use the new server.pem.ldsc & server_key.pem.ldsc to replace the old one under C:\Windows\SysWOW64\Dynamsoft\DynamsoftService(DynamsoftServicex64)\cert.
32+
- Method 2. If you must fix the issue on a few client machines immediately, manually update the following cert files on the client-side machine. Click <a href="https://tst.dynamsoft.com/public/download/dwt/newcert/local.dynamsoft.com/newcert.zip" target="_blank">here</a> to download the new certificate and use the new server.pem.ldsc & server_key.pem.ldsc to replace the old one under **`C:\Windows\SysWOW64\Dynamsoft\DynamsoftService(DynamsoftServicex64)\cert`**.
3333
Note: the new certificate from Dynamsoft will expire on December 8th, 2023. This means you will need to update the certificate again after this certificate expires.
3434
- Method 3. <a href="{{site.about}}getsupport.html" target="_blank">Contact Dynamsoft</a> for a new MSI for client-side.
3535

info/api/WebTwain_Buffer.md

Lines changed: 321 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1991,4 +1991,324 @@ GetTagListByIndex(index: number):string[]
19911991

19921992
```javascript
19931993
DWObject.GetTagListByIndex(0);
1994-
```
1994+
```
1995+
1996+
---
1997+
1998+
## CreateDocument
1999+
2000+
**Syntax**
2001+
2002+
<div class="sample-code-prefix template2"></div>
2003+
>- v17.3
2004+
>- v17.2.5
2005+
>
2006+
>
2007+
```typescript
2008+
/**
2009+
* Create a document for the scanned image(s).
2010+
* @argument documentName Specify the document name.
2011+
*/
2012+
CreateDocument(documentName:string):boolean;
2013+
```
2014+
```typescript
2015+
/**
2016+
* Create a category for the scanned image(s).
2017+
* @argument categoryName Specify the category name.
2018+
*/
2019+
CreateFile(categoryName:string):boolean;
2020+
```
2021+
**Availability**
2022+
<div class="availability">
2023+
<table>
2024+
2025+
<tr>
2026+
<td align="center">ActiveX</td>
2027+
<td align="center">H5(Windows)</td>
2028+
<td align="center">H5(macOS/TWAIN)</td>
2029+
<td align="center">H5(macOS/ICA)</td>
2030+
<td align="center">H5(Linux)</td>
2031+
</tr>
2032+
2033+
<tr>
2034+
<td align="center">not supported</td>
2035+
<td align="center">v17.2+</td>
2036+
<td align="center">v17.2+</td>
2037+
<td align="center">v17.2+</td>
2038+
<td align="center">v17.2+</td>
2039+
</tr>
2040+
2041+
</table>
2042+
</div>
2043+
2044+
**Example**
2045+
2046+
```javascript
2047+
//Save the scanned image(s) under 'Document1'.
2048+
DWObject.CreateDocument("Document1");
2049+
DWObject.OpenDocument("Document1"); //Need to call OpenDocument after CreateDocument.
2050+
DWObject.AcquireImage(successCallback, failureCallback);
2051+
function successCallback() {
2052+
console.log("successful");
2053+
}
2054+
function failureCallback(errorCode, errorString) {
2055+
alert(errorString);
2056+
}
2057+
```
2058+
2059+
2060+
2061+
---
2062+
2063+
## OpenDocument
2064+
2065+
**Syntax**
2066+
2067+
<div class="sample-code-prefix template2"></div>
2068+
>- v17.3
2069+
>- v17.2.5
2070+
>
2071+
>
2072+
```typescript
2073+
/**
2074+
* Use the specified document for the scanned image(s)
2075+
* @argument documentName Specify the document name.
2076+
*/
2077+
OpenDocument(documentName:string):boolean;
2078+
```
2079+
```typescript
2080+
/**
2081+
* Use the specified category for the scanned image(s)
2082+
* @argument categoryName Specify the category name.
2083+
*/
2084+
OpenFile(categoryName:string):boolean;
2085+
```
2086+
2087+
**Availability**
2088+
<div class="availability">
2089+
<table>
2090+
2091+
<tr>
2092+
<td align="center">ActiveX</td>
2093+
<td align="center">H5(Windows)</td>
2094+
<td align="center">H5(macOS/TWAIN)</td>
2095+
<td align="center">H5(macOS/ICA)</td>
2096+
<td align="center">H5(Linux)</td>
2097+
</tr>
2098+
2099+
<tr>
2100+
<td align="center">not supported</td>
2101+
<td align="center">v17.2+</td>
2102+
<td align="center">v17.2+</td>
2103+
<td align="center">v17.2+</td>
2104+
<td align="center">v17.2+</td>
2105+
</tr>
2106+
2107+
</table>
2108+
</div>
2109+
2110+
**Example**
2111+
2112+
```javascript
2113+
//Save the scanned image(s) under 'Document2'.
2114+
DWObject.CreateDocument("Document1");
2115+
DWObject.CreateDocument("Document2");
2116+
DWObject.CreateDocument("Document3");
2117+
DWObject.OpenDocument("Document2"); //Need to call OpenDocument after CreateDocument.
2118+
DWObject.AcquireImage(successCallback, failureCallback);
2119+
function successCallback() {
2120+
console.log("successful");
2121+
}
2122+
function failureCallback(errorCode, errorString) {
2123+
alert(errorString);
2124+
}
2125+
```
2126+
2127+
---
2128+
2129+
## GetCurrentDocumentName
2130+
2131+
**Syntax**
2132+
2133+
<div class="sample-code-prefix template2"></div>
2134+
>- v17.3
2135+
>- v17.2.5
2136+
>
2137+
>
2138+
```typescript
2139+
/**
2140+
* Get the current document name. The default value is 'dynamsoft-default-document'. Scanned image(s) are saved in this document by default if no document name is created.
2141+
*/
2142+
GetCurrentDocumentName():string;
2143+
```
2144+
```typescript
2145+
/**
2146+
* Get the current category name. The default value is 'dynamsoft-dvs-file'. Scanned image(s) are stored in this category by default if no category name is created.
2147+
*/
2148+
GetCurrentFileName():string;
2149+
```
2150+
**Availability**
2151+
<div class="availability">
2152+
<table>
2153+
2154+
<tr>
2155+
<td align="center">ActiveX</td>
2156+
<td align="center">H5(Windows)</td>
2157+
<td align="center">H5(macOS/TWAIN)</td>
2158+
<td align="center">H5(macOS/ICA)</td>
2159+
<td align="center">H5(Linux)</td>
2160+
</tr>
2161+
2162+
<tr>
2163+
<td align="center">not supported</td>
2164+
<td align="center">v17.2+</td>
2165+
<td align="center">v17.2+</td>
2166+
<td align="center">v17.2+</td>
2167+
<td align="center">v17.2+</td>
2168+
</tr>
2169+
2170+
</table>
2171+
</div>
2172+
2173+
---
2174+
2175+
## RenameDocument
2176+
2177+
**Syntax**
2178+
2179+
```typescript
2180+
/**
2181+
* Rename a document.
2182+
* @argument oldDocumentName Specify the old document name.
2183+
* @argument newDocumentName Specify the new document name.
2184+
*/
2185+
RenameDocument(oldDocumentName:string, newDocumentName:string):boolean;
2186+
```
2187+
2188+
**Availability**
2189+
<div class="availability">
2190+
<table>
2191+
2192+
<tr>
2193+
<td align="center">ActiveX</td>
2194+
<td align="center">H5(Windows)</td>
2195+
<td align="center">H5(macOS/TWAIN)</td>
2196+
<td align="center">H5(macOS/ICA)</td>
2197+
<td align="center">H5(Linux)</td>
2198+
</tr>
2199+
2200+
<tr>
2201+
<td align="center">not supported</td>
2202+
<td align="center">v17.3+</td>
2203+
<td align="center">v17.3+</td>
2204+
<td align="center">v17.3+</td>
2205+
<td align="center">v17.3+</td>
2206+
</tr>
2207+
2208+
</table>
2209+
</div>
2210+
2211+
---
2212+
2213+
## RemoveDocument
2214+
2215+
**Syntax**
2216+
2217+
<div class="sample-code-prefix template2"></div>
2218+
>- v17.3
2219+
>- v17.2.5
2220+
>
2221+
>
2222+
```typescript
2223+
/**
2224+
* Delete the specified document.
2225+
* @argument documentName Specify the document name.
2226+
*/
2227+
RemoveDocument(documentName:string):boolean;
2228+
```
2229+
```typescript
2230+
/**
2231+
* Delete the specified category and all images in it.
2232+
* @argument categoryName Specify the category name.
2233+
*/
2234+
RemoveFile(categoryName:string):boolean;
2235+
```
2236+
**Availability**
2237+
<div class="availability">
2238+
<table>
2239+
2240+
<tr>
2241+
<td align="center">ActiveX</td>
2242+
<td align="center">H5(Windows)</td>
2243+
<td align="center">H5(macOS/TWAIN)</td>
2244+
<td align="center">H5(macOS/ICA)</td>
2245+
<td align="center">H5(Linux)</td>
2246+
</tr>
2247+
2248+
<tr>
2249+
<td align="center">not supported</td>
2250+
<td align="center">v17.2+</td>
2251+
<td align="center">v17.2+</td>
2252+
<td align="center">v17.2+</td>
2253+
<td align="center">v17.2+</td>
2254+
</tr>
2255+
2256+
</table>
2257+
</div>
2258+
2259+
---
2260+
2261+
## GetDocumentInfoList
2262+
2263+
**Syntax**
2264+
2265+
<div class="sample-code-prefix template2"></div>
2266+
>- v17.3
2267+
>- v17.2.5
2268+
>
2269+
>
2270+
```typescript
2271+
/**
2272+
* Get the list of all documents and their information.
2273+
*/
2274+
GetDocumentInfoList(): DocumentInfo[];
2275+
interface DocumentInfo {
2276+
name: string;
2277+
imageIds: number[];
2278+
}
2279+
```
2280+
```typescript
2281+
/**
2282+
* Get the list of all categories and their information.
2283+
*/
2284+
GetFileInfoList():Json
2285+
Json:
2286+
[{
2287+
name: "categoryName",
2288+
imageIds:[23122335, 25566822323]
2289+
},
2290+
{……}]
2291+
```
2292+
2293+
**Availability**
2294+
<div class="availability">
2295+
<table>
2296+
2297+
<tr>
2298+
<td align="center">ActiveX</td>
2299+
<td align="center">H5(Windows)</td>
2300+
<td align="center">H5(macOS/TWAIN)</td>
2301+
<td align="center">H5(macOS/ICA)</td>
2302+
<td align="center">H5(Linux)</td>
2303+
</tr>
2304+
2305+
<tr>
2306+
<td align="center">not supported</td>
2307+
<td align="center">v17.2+</td>
2308+
<td align="center">v17.2+</td>
2309+
<td align="center">v17.2+</td>
2310+
<td align="center">v17.2+</td>
2311+
</tr>
2312+
2313+
</table>
2314+
</div>

0 commit comments

Comments
 (0)