Skip to content

SudoSOS Back-end API / internal/pdf/transaction-pdf-service / TransactionPdfService

Class: TransactionPdfService ​

Turns an entity into HTML and PDF bytes. One subclass per document type.

Extends ​

Constructors ​

Constructor ​

ts
new TransactionPdfService(manager?): TransactionPdfService;

Parameters ​

ParameterType
manager?EntityManager

Returns ​

TransactionPdfService

Inherited from ​

PdfService.constructor

Properties ​

PropertyModifierTypeDefault valueOverridesInherited from
managerprotectedEntityManagerundefined-PdfService.manager
renderpublic(options) => stringcreateTransactionPdfPdfService.render-

Methods ​

compile() ​

ts
protected compile(params): Promise<Buffer<ArrayBufferLike>>;

Parameters ​

ParameterType
paramsITransactionPdf

Returns ​

Promise<Buffer<ArrayBufferLike>>

Inherited from ​

PdfService.compile


configureLogger() ​

ts
protected configureLogger(logger): void;

Parameters ​

ParameterType
loggerLogger

Returns ​

void

Inherited from ​

PdfService.configureLogger


getParameters() ​

ts
getParameters(entity): Promise<ITransactionPdf>;

Parameters ​

ParameterType
entityTransaction

Returns ​

Promise<ITransactionPdf>

Overrides ​

PdfService.getParameters


html() ​

ts
html(entity): Promise<Buffer<ArrayBufferLike>>;

Parameters ​

ParameterType
entityTransaction

Returns ​

Promise<Buffer<ArrayBufferLike>>

Inherited from ​

PdfService.html


output() ​

ts
output(entity, fileType): Promise<Buffer<ArrayBufferLike>>;

Parameters ​

ParameterType
entityTransaction
fileTypeReturnFileType

Returns ​

Promise<Buffer<ArrayBufferLike>>

Inherited from ​

PdfService.output


pdf() ​

ts
pdf(entity): Promise<Buffer<ArrayBufferLike>>;

Parameters ​

ParameterType
entityTransaction

Returns ​

Promise<Buffer<ArrayBufferLike>>

Inherited from ​

PdfService.pdf