Skip to content

Commit 0e5791c

Browse files
authored
Merge pull request #551 from ztyyLV/Jackson-branch
Update Addon_PDF.md
2 parents 992b81a + 763fcd6 commit 0e5791c

File tree

1 file changed

+61
-47
lines changed

1 file changed

+61
-47
lines changed

info/api/Addon_PDF.md

Lines changed: 61 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ permalink: /info/api/Addon_PDF.html
2323

2424
## GetConvertMode
2525

26+
Return the convert mode.
27+
2628
**Syntax**
2729

2830
```typescript
29-
/**
30-
* Return the convert mode.
31-
*/
3231
GetConvertMode(): number;
3332
```
3433

3534
**Availability**
35+
3636
<div class="availability">
3737
<table>
3838

@@ -59,18 +59,16 @@ GetConvertMode(): number;
5959

6060
## IsModuleInstalled
6161

62+
Return whether the PDF module has been installed.
63+
6264
**Syntax**
6365

6466
```typescript
65-
/**
66-
67-
* Return whether the PDF module has been installed.
68-
69-
*/
7067
IsModuleInstalled(): boolean;
7168
```
7269

7370
**Availability**
71+
7472
<div class="availability">
7573
<table>
7674

@@ -97,17 +95,20 @@ IsModuleInstalled(): boolean;
9795

9896
## IsTextBasedPDF
9997

98+
Detect whether a local PDF file is text based or not.
99+
100100
**Syntax**
101101

102102
```typescript
103-
/**
104-
* Detect whether a local PDF file is text based or not.
105-
* @path Specify the path of the PDF file.
106-
*/
107103
IsTextBasedPDF(path: string): boolean;
108104
```
109105

106+
**Parameters**
107+
108+
`path`: Specify the path of the PDF file.
109+
110110
**Availability**
111+
111112
<div class="availability">
112113
<table>
113114

@@ -134,28 +135,20 @@ IsTextBasedPDF(path: string): boolean;
134135

135136
## SetConvertMode
136137

138+
Set the convert mode.
139+
137140
**Syntax**
138141

139142
```typescript
140-
/**
141-
* Set the convert mode.
142-
* @param mode Specify the mode. The default value is 3 (Dynamsoft.DWT.EnumDWT_ConvertMode.CM_AUTO)
143-
*/
144143
SetConvertMode(mode: Dynamsoft.DWT.EnumDWT_ConvertMode | number): boolean;
145144
```
146145

147-
**Usage notes**
148-
149-
There are four conversion modes
150-
151-
- CM_RENDERALL (1): All the content in the target PDF file will be rasterized.
152-
- CM_IMAGEONLY (2): The PDF Rasterizer is turned off.
153-
- CM_AUTO (3): The library automatically detect whether a file needs to be rasterized or not and then process the file accordingly.
154-
- CM_RENDERALLWITHANNOTATION (4): Support loading PDF file with annotation.
146+
**Parameters**
155147

156-
Use this method before you import a PDF into the viewer with methods such as <a href="{{site.info}}api/WebTwain_IO.html#loadimage" target="_blank">`LoadImage()`</a> , <a href="{{site.info}}api/WebTwain_IO.html#httpdownload" target="_blank">`HTTPDownload()`</a> and <a href="{{site.info}}api/WebTwain_IO.html#httpdownload" target="_blank">`FTPDownload()`</a>.
148+
`mode`: Specify the mode. The default value is 3 (Dynamsoft.DWT.EnumDWT_ConvertMode.CM_AUTO)
157149

158150
**Availability**
151+
159152
<div class="availability">
160153
<table>
161154

@@ -178,25 +171,35 @@ Use this method before you import a PDF into the viewer with methods such as <a
178171
</table>
179172
</div>
180173

174+
**Usage notes**
175+
176+
There are four conversion modes
177+
178+
- CM_RENDERALL (1): All the content in the target PDF file will be rasterized.
179+
- CM_IMAGEONLY (2): The PDF Rasterizer is turned off.
180+
- CM_AUTO (3): The library automatically detect whether a file needs to be rasterized or not and then process the file accordingly.
181+
- CM_RENDERALLWITHANNOTATION (4): Support loading PDF file with annotation.
182+
183+
Use this method before you import a PDF into the viewer with methods such as <a href="{{site.info}}api/WebTwain_IO.html#loadimage" target="_blank">`LoadImage()`</a> , <a href="{{site.info}}api/WebTwain_IO.html#httpdownload" target="_blank">`HTTPDownload()`</a> and <a href="{{site.info}}api/WebTwain_IO.html#httpdownload" target="_blank">`FTPDownload()`</a>.
184+
181185
---
182186

183187
## SetPassword
184188

189+
Set the password for reading encrypted PDF files.
190+
185191
**Syntax**
186192

187193
```typescript
188-
/**
189-
* Set the password for reading encrypted PDF files.
190-
* @param password Specify the password.
191-
*/
192194
SetPassword(password: string): boolean;
193195
```
194196

195-
**Usage notes**
197+
**Parameters**
196198

197-
Use this method before you import a PDF into the viewer with methods such as <a href="{{site.info}}api/WebTwain_IO.html#loadimage" target="_blank">`LoadImage()`</a> , <a href="{{site.info}}api/WebTwain_IO.html#httpdownload" target="_blank">`HTTPDownload()`</a> and <a href="{{site.info}}api/WebTwain_IO.html#httpdownload" target="_blank">`FTPDownload()`</a>.
199+
`password`: Specify the password.
198200

199201
**Availability**
202+
200203
<div class="availability">
201204
<table>
202205

@@ -218,27 +221,29 @@ Use this method before you import a PDF into the viewer with methods such as <a
218221

219222
</table>
220223
</div>
224+
225+
**Usage notes**
226+
227+
Use this method before you import a PDF into the viewer with methods such as <a href="{{site.info}}api/WebTwain_IO.html#loadimage" target="_blank">`LoadImage()`</a> , <a href="{{site.info}}api/WebTwain_IO.html#httpdownload" target="_blank">`HTTPDownload()`</a> and <a href="{{site.info}}api/WebTwain_IO.html#httpdownload" target="_blank">`FTPDownload()`</a>.
228+
221229
---
222230

223231
## SetResolution
224232

233+
Set the resolution for rasterizing.
234+
225235
**Syntax**
226236

227237
```typescript
228-
/**
229-
* Set the resolution for rasterizing.
230-
* @param resolution Specify the resolution.
231-
*/
232238
SetResolution(resolution: number): boolean;
233239
```
234240

235-
**Usage notes**
236-
237-
The default resolution for the conversion is 200. We recommend that you set a value smaller than 300, otherwise it might slow down the program or cause the process to fail.
241+
**Parameters**
238242

239-
Use this method before you import a PDF into the viewer with methods such as <a href="{{site.info}}api/WebTwain_IO.html#loadimage" target="_blank">`LoadImage()`</a> , <a href="{{site.info}}api/WebTwain_IO.html#httpdownload" target="_blank">`HTTPDownload()`</a> and <a href="{{site.info}}api/WebTwain_IO.html#httpdownload" target="_blank">`FTPDownload()`</a>.
243+
`resolution`: Specify the resolution.
240244

241245
**Availability**
246+
242247
<div class="availability">
243248
<table>
244249

@@ -261,17 +266,21 @@ Use this method before you import a PDF into the viewer with methods such as <a
261266
</table>
262267
</div>
263268

269+
**Usage notes**
270+
271+
The default resolution for the conversion is 200. We recommend that you set a value smaller than 300, otherwise it might slow down the program or cause the process to fail.
272+
273+
Use this method before you import a PDF into the viewer with methods such as <a href="{{site.info}}api/WebTwain_IO.html#loadimage" target="_blank">`LoadImage()`</a> , <a href="{{site.info}}api/WebTwain_IO.html#httpdownload" target="_blank">`HTTPDownload()`</a> and <a href="{{site.info}}api/WebTwain_IO.html#httpdownload" target="_blank">`FTPDownload()`</a>.
274+
264275
---
265276

266277
## Write.Setup()
267278

279+
Set up the PDF writing engine.
280+
268281
**Syntax**
269282

270283
```typescript
271-
/**
272-
* Set up the PDF writing engine.
273-
* @param settings Configures how the PDF is generated.
274-
*/
275284
Write.Setup(settings: PDFWSettings): void;
276285

277286
interface PDFWSettings {
@@ -333,13 +342,12 @@ interface PDFWSettings {
333342
}
334343
```
335344

336-
**Usage notes**
345+
**Parameters**
337346

338-
Use this method before you create a PDF with methods such as <a href="{{site.info}}api/WebTwain_IO.html#httpupload" target="_blank">`HTTPUpload()`</a>, <a href="{{site.info}}api/WebTwain_IO.html#saveaspdf" target="_blank">`SaveAsPDF()`</a>, and <a href="{{site.info}}api/WebTwain_IO.html#saveallaspdf" target="_blank">`SaveAllAsPDF()`</a>
339-
340-
Only the core module license is required to use this method.
347+
`settings`: Configures how the PDF is generated.
341348

342349
**Availability**
350+
343351
<div class="availability">
344352
<table>
345353

@@ -361,3 +369,9 @@ Only the core module license is required to use this method.
361369

362370
</table>
363371
</div>
372+
373+
**Usage notes**
374+
375+
Use this method before you create a PDF with methods such as <a href="{{site.info}}api/WebTwain_IO.html#httpupload" target="_blank">`HTTPUpload()`</a>, <a href="{{site.info}}api/WebTwain_IO.html#saveaspdf" target="_blank">`SaveAsPDF()`</a>, and <a href="{{site.info}}api/WebTwain_IO.html#saveallaspdf" target="_blank">`SaveAllAsPDF()`</a>
376+
377+
Only the core module license is required to use this method.

0 commit comments

Comments
 (0)