14 KiB
id, title, slug, sidebar_label, sidebar_position, custom_edit_url
| id | title | slug | sidebar_label | sidebar_position | custom_edit_url |
|---|---|---|---|---|---|
| index | @pdfme/common | /api/common/ | Exports | 0.5 | null |
Type aliases
Alignment
Ƭ Alignment: z.infer<typeof Alignment>
Defined in
BarCodeType
Ƭ BarCodeType: z.infer<typeof BarcodeSchemaType>
Defined in
BarcodeSchema
Ƭ BarcodeSchema: z.infer<typeof BarcodeSchema>
Defined in
BasePdf
Ƭ BasePdf: z.infer<typeof BasePdf>
Defined in
CommonProps
Ƭ CommonProps: z.infer<typeof CommonProps>
Defined in
DesignerProps
Ƭ DesignerProps: z.infer<typeof DesignerProps>
Defined in
DesignerReactProps
Ƭ DesignerReactProps: z.infer<typeof DesignerReactProps>
Defined in
Font
Ƭ Font: z.infer<typeof Font>
Defined in
GenerateProps
Ƭ GenerateProps: z.infer<typeof GenerateProps>
Defined in
GeneratorOptions
Ƭ GeneratorOptions: z.infer<typeof GeneratorOptions>
Defined in
ImageSchema
Ƭ ImageSchema: z.infer<typeof ImageSchema>
Defined in
Lang
Ƭ Lang: z.infer<typeof Lang>
Defined in
PreviewProps
Ƭ PreviewProps: z.infer<typeof PreviewProps>
Defined in
PreviewReactProps
Ƭ PreviewReactProps: z.infer<typeof PreviewReactProps>
Defined in
Schema
Ƭ Schema: z.infer<typeof Schema>
Defined in
SchemaForUI
Ƭ SchemaForUI: z.infer<typeof SchemaForUI>
Defined in
SchemaType
Ƭ SchemaType: z.infer<typeof SchemaType>
Defined in
Size
Ƭ Size: z.infer<typeof Size>
Defined in
Template
Ƭ Template: z.infer<typeof Template>
Defined in
TextSchema
Ƭ TextSchema: z.infer<typeof TextSchema>
Defined in
UIOptions
Ƭ UIOptions: z.infer<typeof UIOptions>
Defined in
UIProps
Ƭ UIProps: z.infer<typeof UIProps>
Defined in
Variables
BLANK_PDF
• BLANK_PDF: "data:application/pdf;base64,JVBERi0xLjcKJeLjz9MKNSAwIG9iago8PAovRmlsdGVyIC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
Defined in
DEFAULT_CHARACTER_SPACING
• DEFAULT_CHARACTER_SPACING: 0
Defined in
DEFAULT_FONT_COLOR
• DEFAULT_FONT_COLOR: "#000"
Defined in
DEFAULT_FONT_SIZE
• DEFAULT_FONT_SIZE: 13
Defined in
DEFAULT_LINE_HEIGHT
• DEFAULT_LINE_HEIGHT: 1
Defined in
schemaTypes
• schemaTypes: readonly ["text", "image", "qrcode", "japanpost", "ean13", "ean8", "code39", "code128", "nw7", "itf14", "upca", "upce"] = _schemaTypes
Defined in
Functions
b64toUint8Array
▸ Const b64toUint8Array(base64): Uint8Array
Parameters
| Name | Type |
|---|---|
base64 |
string |
Returns
Uint8Array
Defined in
checkDesignerProps
▸ Const checkDesignerProps(data): void
Parameters
| Name | Type |
|---|---|
data |
unknown |
Returns
void
Defined in
checkFont
▸ Const checkFont(arg): void
Parameters
| Name | Type |
|---|---|
arg |
Object |
arg.font |
Record<string, { data: ArrayBuffer | Uint8Array ; fallback: undefined | boolean ; subset: undefined | boolean }> |
arg.template |
Object |
arg.template.basePdf |
string | ArrayBuffer | Uint8Array |
arg.template.columns |
undefined | string[] |
arg.template.sampledata |
undefined | Record<string, string>[] |
arg.template.schemas |
Record<string, { alignment: undefined | "left" | "center" | "right" ; backgroundColor: undefined | string ; characterSpacing: undefined | number ; fontColor: undefined | string ; fontName: undefined | string ; fontSize: undefined | number ; height: number ; lineHeight: undefined | number ; position: { x: number; y: number; } ; rotate: undefined | number ; type: "text" ; width: number } | { height: number ; position: { x: number; y: number; } ; rotate: undefined | number ; type: "image" ; width: number } | { height: number ; position: { x: number; y: number; } ; rotate: undefined | number ; type: "qrcode" | "japanpost" | "ean13" | "ean8" | "code39" | "code128" | "nw7" | "itf14" | "upca" | "upce" ; width: number }>[] |
Returns
void
Defined in
checkGenerateProps
▸ Const checkGenerateProps(data): void
Parameters
| Name | Type |
|---|---|
data |
unknown |
Returns
void
Defined in
checkInputs
▸ Const checkInputs(data): void
Parameters
| Name | Type |
|---|---|
data |
unknown |
Returns
void
Defined in
checkPreviewProps
▸ Const checkPreviewProps(data): void
Parameters
| Name | Type |
|---|---|
data |
unknown |
Returns
void
Defined in
checkTemplate
▸ Const checkTemplate(data): void
Parameters
| Name | Type |
|---|---|
data |
unknown |
Returns
void
Defined in
checkUIOptions
▸ Const checkUIOptions(data): void
Parameters
| Name | Type |
|---|---|
data |
unknown |
Returns
void
Defined in
checkUIProps
▸ Const checkUIProps(data): void
Parameters
| Name | Type |
|---|---|
data |
unknown |
Returns
void
Defined in
getB64BasePdf
▸ Const getB64BasePdf(basePdf): string | Promise<string>
Parameters
| Name | Type |
|---|---|
basePdf |
string | ArrayBuffer | Uint8Array |
Returns
string | Promise<string>
Defined in
getDefaultFont
▸ Const getDefaultFont(): Record<string, { data: ArrayBuffer | Uint8Array ; fallback: undefined | boolean ; subset: undefined | boolean }>
Returns
Record<string, { data: ArrayBuffer | Uint8Array ; fallback: undefined | boolean ; subset: undefined | boolean }>
Defined in
getFallbackFontName
▸ Const getFallbackFontName(font): string
Parameters
| Name | Type |
|---|---|
font |
Record<string, { data: ArrayBuffer | Uint8Array ; fallback: undefined | boolean ; subset: undefined | boolean }> |
Returns
string
Defined in
isBarcodeSchema
▸ Const isBarcodeSchema(arg): arg is Object
Parameters
| Name | Type |
|---|---|
arg |
Object |
arg.height |
number |
arg.position |
{ x: number; y: number; } |
arg.rotate |
undefined | number |
arg.type |
"text" | "image" | "qrcode" | "japanpost" | "ean13" | "ean8" | "code39" | "code128" | "nw7" | "itf14" | "upca" | "upce" |
arg.width |
number |
Returns
arg is Object
Defined in
isImageSchema
▸ Const isImageSchema(arg): arg is Object
Parameters
| Name | Type |
|---|---|
arg |
Object |
arg.height |
number |
arg.position |
{ x: number; y: number; } |
arg.rotate |
undefined | number |
arg.type |
"text" | "image" | "qrcode" | "japanpost" | "ean13" | "ean8" | "code39" | "code128" | "nw7" | "itf14" | "upca" | "upce" |
arg.width |
number |
Returns
arg is Object
Defined in
isTextSchema
▸ Const isTextSchema(arg): arg is Object
Parameters
| Name | Type |
|---|---|
arg |
Object |
arg.height |
number |
arg.position |
{ x: number; y: number; } |
arg.rotate |
undefined | number |
arg.type |
"text" | "image" | "qrcode" | "japanpost" | "ean13" | "ean8" | "code39" | "code128" | "nw7" | "itf14" | "upca" | "upce" |
arg.width |
number |
Returns
arg is Object
Defined in
validateBarcodeInput
▸ Const validateBarcodeInput(type, input): boolean
Parameters
| Name | Type |
|---|---|
type |
"qrcode" | "japanpost" | "ean13" | "ean8" | "code39" | "code128" | "nw7" | "itf14" | "upca" | "upce" |
input |
string |
Returns
boolean