Skip to content

MheePDF<T>

Defined in: document.ts:58

Type Parameters

Type ParameterDefault type
Tany

Constructor document.ts:67

new MheePDF<T>(options?): MheePDF<T>

Parameters

ParameterType
options?MheePDFOptions

Returns

MheePDF<T>

Properties

PropertyModifierType
options
document.ts:62
publicMheePDFOptions
A4
document.ts:65
readonly[number, number]

Methods

add() document.ts:182

add(component): this

Parameters

ParameterType
componentComponent

Returns

this

addImage() document.ts:190

addImage(source, options?): this

Parameters

ParameterType
sourcestring | Buffer<ArrayBufferLike>
options?ImageOptions

Returns

this

addLine() document.ts:194

addLine(options?): this

Parameters

ParameterType
options?LineOptions

Returns

this

addObject() document.ts:178

addObject<T>(obj): T

Type Parameters

Type Parameter
T

Parameters

ParameterType
objT

Returns

T

addPage() document.ts:140

addPage(size, build, options?): this

Parameters

ParameterType
size[number, number]
build(page) => void
object
margin?number | {
bottom?: number;
left?: number;
right?: number;
top?: number;
}
rotate?0 | 90 | 180 | 270

Returns

this

addSvg() document.ts:198

addSvg(source, options?): this

Parameters

ParameterType
sourcestring | Buffer<ArrayBufferLike>
options?SvgOptions

Returns

this

addTemplateLoop() document.ts:202

addTemplateLoop(arrayPath, templateComponents): this

Parameters

ParameterType
arrayPathstring
templateComponentsComponent[]

Returns

this

addText() document.ts:186

addText(text, options?): this

Parameters

ParameterType
textstring
options?TextOptions

Returns

this

generate() document.ts:207

generate(data?): Buffer

Parameters

ParameterType
data?T | T[]

Returns

Buffer

generatePDFcontent() document.ts:238

generatePDFcontent(data?): Buffer

Parameters

ParameterType
data?T | T[]

Returns

Buffer

Released under the MIT License.