@@ -56,17 +56,21 @@ await fs.writeFile(resolve(__dirname, './sample.compressed.pdf'), output)
5656
5757#### CompressOptions
5858
59- | Options | Type | Default | Description |
60- | ---------------------------| :---------:| :--------:| ------------------------------------------------------------------------------------|
61- | ` password ` | ` String ` | - | Document protection password |
62- | ` pdfSettings ` | ` String ` | ` screen ` | Preset setting, valid value is ` screen ` , ` ebook ` , ` printer ` , ` prepress ` , ` default ` |
63- | ` fastWebView ` | ` Boolean ` | ` true ` | Enable Fast Web View (Linearization) |
64- | ` compatibilityLevel ` | ` String ` | ` 1.4 ` | Compability version |
65- | ` colorConversionStrategy ` | ` String ` | ` RGB ` | Color conversion strategy, valid value is ` RGB ` , ` CMYK ` |
66- | ` noTransparency ` | ` Boolean ` | ` true ` | Remove transparency |
67- | ` keepPassword ` | ` Boolean ` | ` true ` | Keep document password if document have a password protection |
68- | ` userPassword ` | ` String ` | - | Set User Password to document |
69- | ` ownerPassword ` | ` String ` | - | Set Owner Password to document |
59+ | Options | Type | Default | Description |
60+ | ---------------------------| :----------:| :--------:| ------------------------------------------------------------------------------------|
61+ | ` password ` | ` String ` | - | Document protection password |
62+ | ` pdfSettings ` | ` String ` | ` screen ` | Preset setting, valid value is ` screen ` , ` ebook ` , ` printer ` , ` prepress ` , ` default ` |
63+ | ` fastWebView ` | ` Boolean ` | ` true ` | Enable Fast Web View (Linearization) |
64+ | ` compatibilityLevel ` | ` String ` | ` 1.4 ` | Compability version |
65+ | ` colorConversionStrategy ` | ` String ` | ` RGB ` | Color conversion strategy, valid value is ` RGB ` , ` CMYK ` |
66+ | ` noTransparency ` | ` Boolean ` | ` true ` | Remove transparency |
67+ | ` keepPassword ` | ` Boolean ` | ` true ` | Keep document password if document have a password protection |
68+ | ` userPassword ` | ` String ` | - | Set User Password to document |
69+ | ` ownerPassword ` | ` String ` | - | Set Owner Password to document |
70+ | ` colorImageResolution ` | ` Number ` | 300 | Color image resolution |
71+ | ` grayImageResolution ` | ` Number ` | 300 | Gray image resolution |
72+ | ` monoImageResolution ` | ` Number ` | 300 | Mono image resolution |
73+ | ` args ` | ` String[] ` | - | Additional arguments |
7074
7175### combinePDF (files: Buffer[ ] , options?: CompressOptions)
7276
@@ -141,12 +145,13 @@ await fs.writeFile(resolve(__dirname, './sample.jpg'), output)
141145
142146#### RenderOptions
143147
144- | Options | Type | Default | Description |
145- | ---------------------| :--------:| :-------:| ----------------------------------------------|
146- | ` resolution ` | ` Number ` | ` 96 ` | Render resolution |
147- | ` textAlphaBits ` | ` Number ` | ` 4 ` | Text alpha bits, valid value is ` 1 ` -` 4 ` |
148- | ` graphicsAlphaBits ` | ` Number ` | ` 4 ` | Graphic alpha bits, valid value is ` 1 ` -` 4 ` |
149- | ` format ` | ` String ` | ` jpg ` | Render format, valid value is ` jpg ` or ` png ` |
148+ | Options | Type | Default | Description |
149+ | ---------------------| :----------:| :-------:| ----------------------------------------------|
150+ | ` resolution ` | ` Number ` | ` 96 ` | Render resolution |
151+ | ` textAlphaBits ` | ` Number ` | ` 4 ` | Text alpha bits, valid value is ` 1 ` -` 4 ` |
152+ | ` graphicsAlphaBits ` | ` Number ` | ` 4 ` | Graphic alpha bits, valid value is ` 1 ` -` 4 ` |
153+ | ` format ` | ` String ` | ` jpg ` | Render format, valid value is ` jpg ` or ` png ` |
154+ | ` args ` | ` String[] ` | - | Additional arguments |
150155
151156## getInfo (file: Buffer, options?: { password: string })
152157
0 commit comments