@pdfme/generator
Type aliases
Alignment
Ƭ Alignment: z.infer
<typeof Alignment
>
Defined in
common/dist/types/type.d.ts:44
BarCodeType
Ƭ BarCodeType: z.infer
<typeof BarcodeSchemaType
>
Defined in
common/dist/types/type.d.ts:46
BarcodeSchema
Ƭ BarcodeSchema: z.infer
<typeof BarcodeSchema
>
Defined in
common/dist/types/type.d.ts:49
BasePdf
Ƭ BasePdf: z.infer
<typeof BasePdf
>
Defined in
common/dist/types/type.d.ts:53
CommonProps
Ƭ CommonProps: z.infer
<typeof CommonProps
>
Defined in
common/dist/types/type.d.ts:55
DesignerProps
Ƭ DesignerProps: z.infer
<typeof DesignerProps
>
Defined in
common/dist/types/type.d.ts:62
Font
Ƭ Font: z.infer
<typeof Font
>
Defined in
common/dist/types/type.d.ts:52
GenerateProps
Ƭ GenerateProps: z.infer
<typeof GenerateProps
>
Defined in
common/dist/types/type.d.ts:57
GeneratorOptions
Ƭ GeneratorOptions: z.infer
<typeof GeneratorOptions
>
Defined in
common/dist/types/type.d.ts:56
ImageSchema
Ƭ ImageSchema: z.infer
<typeof ImageSchema
>
Defined in
common/dist/types/type.d.ts:48
Lang
Ƭ Lang: z.infer
<typeof Lang
>
Defined in
common/dist/types/type.d.ts:42
PreviewProps
Ƭ PreviewProps: z.infer
<typeof PreviewProps
>
Defined in
common/dist/types/type.d.ts:60
Schema
Ƭ Schema: z.infer
<typeof Schema
>
Defined in
common/dist/types/type.d.ts:50
SchemaForUI
Ƭ SchemaForUI: z.infer
<typeof SchemaForUI
>
Defined in
common/dist/types/type.d.ts:51
SchemaType
Ƭ SchemaType: z.infer
<typeof SchemaType
>
Defined in
common/dist/types/type.d.ts:45
Size
Ƭ Size: z.infer
<typeof Size
>
Defined in
common/dist/types/type.d.ts:43
Template
Ƭ Template: z.infer
<typeof Template
>
Defined in
common/dist/types/type.d.ts:54
TextSchema
Ƭ TextSchema: z.infer
<typeof TextSchema
>
Defined in
common/dist/types/type.d.ts:47
UIOptions
Ƭ UIOptions: z.infer
<typeof UIOptions
>
Defined in
common/dist/types/type.d.ts:58
UIProps
Ƭ UIProps: z.infer
<typeof UIProps
>
Defined in
common/dist/types/type.d.ts:59
Variables
BLANK_PDF
• BLANK_PDF: "data:application/pdf;base64,JVBERi0xLjcKJeLjz9MKNSAwIG9iago8PAovRmlsdGVyIC9GbGF0ZURlY29kZQovTGVuZ3RoIDM4Cj4+CnN0cmVhbQp4nCvkMlAwUDC1NNUzMVGwMDHUszRSKErlCtfiyuMK5AIAXQ8GCgplbmRzdHJlYW0KZW5kb2JqCjQgMCBvYmoKPDwKL1R5cGUgL1BhZ2UKL01lZGlhQm94IFswIDAgNTk1LjQ0IDg0MS45Ml0KL1Jlc291cmNlcyA8PAo+PgovQ29udGVudHMgNSAwIFIKL1BhcmVudCAyIDAgUgo+PgplbmRvYmoKMiAwIG9iago8PAovVHlwZSAvUGFnZXMKL0tpZHMgWzQgMCBSXQovQ291bnQgMQo+PgplbmRvYmoKMSAwIG9iago8PAovVHlwZSAvQ2F0YWxvZwovUGFnZXMgMiAwIFIKPj4KZW5kb2JqCjMgMCBvYmoKPDwKL3RyYXBwZWQgKGZhbHNlKQovQ3JlYXRvciAoU2VyaWYgQWZmaW5pdHkgRGVzaWduZXIgMS4xMC40KQovVGl0bGUgKFVudGl0bGVkLnBkZikKL0NyZWF0aW9uRGF0ZSAoRDoyMDIyMDEwNjE0MDg1OCswOScwMCcpCi9Qcm9kdWNlciAoaUxvdmVQREYpCi9Nb2REYXRlIChEOjIwMjIwMTA2MDUwOTA5WikKPj4KZW5kb2JqCjYgMCBvYmoKPDwKL1NpemUgNwovUm9vdCAxIDAgUgovSW5mbyAzIDAgUgovSUQgWzwyODhCM0VENTAyOEU0MDcyNERBNzNCOUE0Nzk4OUEwQT4gPEY1RkJGNjg4NkVERDZBQUNBNDRCNEZDRjBBRDUxRDlDPl0KL1R5cGUgL1hSZWYKL1cgWzEgMiAyXQovRmlsdGVyIC9GbGF0ZURlY29kZQovSW5kZXggWzAgN10KL0xlbmd0aCAzNgo+PgpzdHJlYW0KeJxjYGD4/5+RUZmBgZHhFZBgDAGxakAEP5BgEmFgAABlRwQJCmVuZHN0cmVhbQplbmRvYmoKc3RhcnR4cmVmCjUzMgolJUVPRgo="
Defined in
common/dist/types/constants.d.ts:6
Functions
checkDesignerProps
▸ Const
checkDesignerProps(data
): void
Parameters
Name | Type |
---|---|
data | unknown |
Returns
void
Defined in
common/dist/types/helper.d.ts:15
checkGenerateProps
▸ Const
checkGenerateProps(data
): void
Parameters
Name | Type |
---|---|
data | unknown |
Returns
void
Defined in
common/dist/types/helper.d.ts:16
checkPreviewProps
▸ Const
checkPreviewProps(data
): void
Parameters
Name | Type |
---|---|
data | unknown |
Returns
void
Defined in
common/dist/types/helper.d.ts:14
checkTemplate
▸ Const
checkTemplate(data
): void
Parameters
Name | Type |
---|---|
data | unknown |
Returns
void
Defined in
common/dist/types/helper.d.ts:12
checkUIProps
▸ Const
checkUIProps(data
): void
Parameters
Name | Type |
---|---|
data | unknown |
Returns
void
Defined in
common/dist/types/helper.d.ts:13
generate
▸ Const
generate(props
): Promise
<Uint8Array
>
Parameters
Name | Type |
---|---|
props | Object |
props.inputs | Record <string , string >[] |
props.options? | Object |
props.options.font? | Record <string , { data : ArrayBuffer | Uint8Array ; fallback? : boolean ; subset? : boolean }> |
props.options.splitThreshold? | number |
props.template | Object |
props.template.basePdf | string | ArrayBuffer | Uint8Array |
props.template.columns? | string [] |
props.template.sampledata? | Record <string , string >[] |
props.template.schemas | Record <string , { alignment? : "left" | "center" | "right" ; backgroundColor? : string ; characterSpacing? : number ; fontColor? : string ; fontName? : string ; fontSize? : number ; height : number ; lineHeight? : number ; position : { x : number ; y : number } ; rotate? : number ; type : "text" ; width : number } | { height : number ; position : { x : number ; y : number } ; rotate? : number ; type : "image" ; width : number } | { height : number ; position : { x : number ; y : number } ; rotate? : number ; type : "qrcode" | "japanpost" | "ean13" | "ean8" | "code39" | "code128" | "nw7" | "itf14" | "upca" | "upce" ; width : number }>[] |
Returns
Promise
<Uint8Array
>
Defined in
isBarcodeSchema
▸ Const
isBarcodeSchema(arg
): arg is Object
Parameters
Name | Type |
---|---|
arg | Object |
arg.height | number |
arg.position | Object |
arg.position.x | number |
arg.position.y | number |
arg.rotate? | number |
arg.type | "text" | "image" | "qrcode" | "japanpost" | "ean13" | "ean8" | "code39" | "code128" | "nw7" | "itf14" | "upca" | "upce" |
arg.width | number |
Returns
arg is Object
Defined in
common/dist/types/type.d.ts:32
isImageSchema
▸ Const
isImageSchema(arg
): arg is Object
Parameters
Name | Type |
---|---|
arg | Object |
arg.height | number |
arg.position | Object |
arg.position.x | number |
arg.position.y | number |
arg.rotate? | number |
arg.type | "text" | "image" | "qrcode" | "japanpost" | "ean13" | "ean8" | "code39" | "code128" | "nw7" | "itf14" | "upca" | "upce" |
arg.width | number |
Returns
arg is Object
Defined in
common/dist/types/type.d.ts:22
isTextSchema
▸ Const
isTextSchema(arg
): arg is Object
Parameters
Name | Type |
---|---|
arg | Object |
arg.height | number |
arg.position | Object |
arg.position.x | number |
arg.position.y | number |
arg.rotate? | number |
arg.type | "text" | "image" | "qrcode" | "japanpost" | "ean13" | "ean8" | "code39" | "code128" | "nw7" | "itf14" | "upca" | "upce" |
arg.width | number |
Returns
arg is Object
Defined in
common/dist/types/type.d.ts:5
validateBarcodeInput
▸ Const
validateBarcodeInput(type
, input
): boolean
Parameters
Name | Type |
---|---|
type | "qrcode" | "japanpost" | "ean13" | "ean8" | "code39" | "code128" | "nw7" | "itf14" | "upca" | "upce" |
input | string |
Returns
boolean
Defined in
common/dist/types/helper.d.ts:17