Skip to content

SudoSOS Back-end API / internal/pdf/inactive-administrative-cost-report-pdf-service / InactiveAdministrativeCostReportPdfService

Class: InactiveAdministrativeCostReportPdfService ​

HTML-to-PDF service for entities that don't store PDFs. It inherits createPdfBuffer and createRaw from BaseHtmlPdfService. It does not implement any stored interface.

Extends ​

Constructors ​

Constructor ​

ts
new InactiveAdministrativeCostReportPdfService(manager?): InactiveAdministrativeCostReportPdfService;

Parameters ​

ParameterType
manager?EntityManager

Returns ​

InactiveAdministrativeCostReportPdfService

Inherited from ​

HtmlUnstoredPdfService.constructor

Properties ​

PropertyModifierTypeDefault valueDescriptionOverridesInherited from
clientprotectedClientundefined--HtmlUnstoredPdfService.client
htmlGeneratorpublic(options) => stringcreateInactiveAdministrativeCostReportPdfThe function that generates the HTML. This function should take a data object and return the complete HTML string.HtmlUnstoredPdfService.htmlGenerator-
htmlPdfGenUrlprotectedstringundefined--HtmlUnstoredPdfService.htmlPdfGenUrl
managerprotectedEntityManagerundefined--HtmlUnstoredPdfService.manager

Methods ​

compileHtml() ​

ts
protected compileHtml(html): Promise<Buffer<ArrayBufferLike>>;

Compile HTML to PDF using the external service.

Parameters ​

ParameterType
htmlstring

Returns ​

Promise<Buffer<ArrayBufferLike>>

Inherited from ​

HtmlUnstoredPdfService.compileHtml


createPdfBuffer() ​

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

Create a PDF and return bytes.

Parameters ​

ParameterType
entityInactiveAdministrativeCostReport

Returns ​

Promise<Buffer<ArrayBufferLike>>

Inherited from ​

HtmlUnstoredPdfService.createPdfBuffer


createRaw() ​

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

Create raw HTML output (for debugging or preview).

Parameters ​

ParameterType
entityInactiveAdministrativeCostReport

Returns ​

Promise<Buffer<ArrayBufferLike>>

Inherited from ​

HtmlUnstoredPdfService.createRaw


getHtml() ​

ts
protected getHtml(entity): Promise<string>;

Apply parameters to the template and return the complete HTML.

Parameters ​

ParameterType
entityInactiveAdministrativeCostReport

Returns ​

Promise<string>

Inherited from ​

HtmlUnstoredPdfService.getHtml


getParameters() ​

ts
getParameters(entity): Promise<IInactiveAdministrativeCostReportPdf>;

Get the data object to use with the HTML template.

Parameters ​

ParameterType
entityInactiveAdministrativeCostReport

Returns ​

Promise<IInactiveAdministrativeCostReportPdf>

Overrides ​

HtmlUnstoredPdfService.getParameters