SudoSOS Back-end API / internal/pdf / PdfService
Abstract Class: PdfService<T, P> ​
Turns an entity into HTML and PDF bytes. One subclass per document type.
Extends ​
Extended by ​
StoredPdfServiceFineReportPdfServiceInactiveAdministrativeCostReportPdfServiceTransactionPdfServiceTransferPdfServiceUserReportPdfService
Type Parameters ​
| Type Parameter |
|---|
T |
P extends PdfTemplateParameters |
Constructors ​
Constructor ​
ts
new PdfService<T, P>(manager?): PdfService<T, P>;Parameters ​
| Parameter | Type |
|---|---|
manager? | EntityManager |
Returns ​
PdfService<T, P>
Inherited from ​
Properties ​
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
manager | protected | EntityManager | WithManager.manager |
Methods ​
compile() ​
ts
protected compile(params): Promise<Buffer<ArrayBufferLike>>;Parameters ​
| Parameter | Type |
|---|---|
params | P |
Returns ​
Promise<Buffer<ArrayBufferLike>>
configureLogger() ​
ts
protected configureLogger(logger): void;Parameters ​
| Parameter | Type |
|---|---|
logger | Logger |
Returns ​
void
Inherited from ​
getParameters() ​
ts
abstract getParameters(entity): Promise<P>;Parameters ​
| Parameter | Type |
|---|---|
entity | T |
Returns ​
Promise<P>
html() ​
ts
html(entity): Promise<Buffer<ArrayBufferLike>>;Parameters ​
| Parameter | Type |
|---|---|
entity | T |
Returns ​
Promise<Buffer<ArrayBufferLike>>
output() ​
ts
output(entity, fileType): Promise<Buffer<ArrayBufferLike>>;Parameters ​
| Parameter | Type |
|---|---|
entity | T |
fileType | ReturnFileType |
Returns ​
Promise<Buffer<ArrayBufferLike>>
pdf() ​
ts
pdf(entity): Promise<Buffer<ArrayBufferLike>>;Parameters ​
| Parameter | Type |
|---|---|
entity | T |
Returns ​
Promise<Buffer<ArrayBufferLike>>
render() ​
ts
abstract render(params): string;Parameters ​
| Parameter | Type |
|---|---|
params | P |
Returns ​
string