Changed contents to fit version 2.7.2
parent
cf097a6667
commit
22d0c94a24
24
API.md
24
API.md
|
@ -70,7 +70,8 @@ Name | Type | Attributes | Description
|
||||||
--- | --- | --- | ---
|
--- | --- | --- | ---
|
||||||
text | string | required | A text to draw.
|
text | string | required | A text to draw.
|
||||||
size | number | required | Font size
|
size | number | required | Font size
|
||||||
fontData | Array\<number\><br />:fork_and_knife:Uint8Array<br />:fork_and_knife:ArrayBuffer<br />:fork_and_knife:string | optional | The font's data for drawing text.<br />If it is a string, it is assumed to be one of the values in [PDFLib.StandardFonts](https://pdf-lib.js.org/docs/api/enums/standardfonts)<br />Default: `StandardFonts.Helvetica`
|
fontData | Array\<number\><br />:fork_and_knife:Uint8Array<br />:fork_and_knife:ArrayBuffer<br />:fork_and_knife:[PDFLib.StandardFonts](https://pdf-lib.js.org/docs/api/enums/standardfonts) | optional | The font's data for drawing text.<br />See [PdfFonts.getEmbeddedFont](#getEmbeddedFont) for the default font.
|
||||||
|
subset | boolean | optional | Create font subset or not.<br />Set to true to reduce the size of pdf file.
|
||||||
color | string | optional | A Hex string of font color. :one:<br />Default: `#000`
|
color | string | optional | A Hex string of font color. :one:<br />Default: `#000`
|
||||||
opacity | number | optional | Valid value is from 0 to 1.<br />Default: `1`<br />:no_entry_sign:<ins>Not implemented yet</ins>
|
opacity | number | optional | Valid value is from 0 to 1.<br />Default: `1`<br />:no_entry_sign:<ins>Not implemented yet</ins>
|
||||||
blendMode | string | optional | Valid value is one of the values in [PDFLib.BlendMode](https://pdf-lib.js.org/docs/api/enums/blendmode)<br />:no_entry_sign:<ins>Not implemented yet</ins>
|
blendMode | string | optional | Valid value is one of the values in [PDFLib.BlendMode](https://pdf-lib.js.org/docs/api/enums/blendmode)<br />:no_entry_sign:<ins>Not implemented yet</ins>
|
||||||
|
@ -257,7 +258,7 @@ sign(pdf, cypopt<sub>*opt*</sub>) :arrow_right: Promise\<Uint8Array\>
|
||||||
Sign the pdf and returns the binary data.
|
Sign the pdf and returns the binary data.
|
||||||
Name | Type | Attributes | Description
|
Name | Type | Attributes | Description
|
||||||
--- | --- | --- | ---
|
--- | --- | --- | ---
|
||||||
pdf | PDFLib.PDFDocument|Array\<number\>|Uint8Array|ArrayBuffer|string | required | The target pdf.
|
pdf | PDFLib.PDFDocument<br />:fork_and_knife:Array\<number\><br />:fork_and_knife:Uint8Array<br />:fork_and_knife:ArrayBuffer<br />:fork_and_knife:string | required | The target pdf.
|
||||||
cypopt | [EncryptOption](#EncryptOption) | optional | The informations of encryption.
|
cypopt | [EncryptOption](#EncryptOption) | optional | The informations of encryption.
|
||||||
|
|
||||||
## TsaFetcher
|
## TsaFetcher
|
||||||
|
@ -293,6 +294,25 @@ Name | Type | Attributes | Description
|
||||||
--- | --- | --- | ---
|
--- | --- | --- | ---
|
||||||
data | string | required | The data needs to be signed.
|
data | string | required | The data needs to be signed.
|
||||||
|
|
||||||
|
## PdfFonts
|
||||||
|
:croissant::croissant::croissant:
|
||||||
|
### Static Methods
|
||||||
|
#### from
|
||||||
|
from(pdfdoc) :arrow_right: Promise\<[PdfFonts](#PdfFonts)\>
|
||||||
|
Load embedded fonts from pdf document.
|
||||||
|
Name | Type | Attributes | Description
|
||||||
|
--- | --- | --- | ---
|
||||||
|
pdfdoc | PDFLib.PDFDocument | required | The target pdf document.
|
||||||
|
|
||||||
|
### Methods
|
||||||
|
#### getEmbeddedFont
|
||||||
|
getEmbeddedFont(fontData<sub>*opt*</sub>, subset<sub>*opt*</sub>) :arrow_right: Promise\<PDFLib.PDFFont\>
|
||||||
|
Get the embedded font or create one if not exists.
|
||||||
|
Name | Type | Attributes | Description
|
||||||
|
--- | --- | --- | ---
|
||||||
|
fontData | Array\<number\><br />:fork_and_knife:Uint8Array<br />:fork_and_knife:ArrayBuffer<br />:fork_and_knife:[PDFLib.StandardFonts](https://pdf-lib.js.org/docs/api/enums/standardfonts) | optional | Data of font. If omitted,<br />the default font is `PDFLib.StandardFonts.Helvetica` if there is no existing embedded font.<br />Or the default font is the first existing embedded font.
|
||||||
|
subset | boolean | optional | Create font subset or not.
|
||||||
|
|
||||||
## Note
|
## Note
|
||||||
* __CRL__:loudspeaker: Certificate Revocation List
|
* __CRL__:loudspeaker: Certificate Revocation List
|
||||||
* __DSS__:loudspeaker: Document Security Store
|
* __DSS__:loudspeaker: Document Security Store
|
||||||
|
|
Loading…
Reference in New Issue