mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
WIP
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { Inject, Service } from 'typedi';
|
||||
import { PageProperties, PdfFormat } from '@/lib/Chromiumly/_types';
|
||||
import { ChromiumlyHtmlConvert } from './ChromiumlyHtmlConvert';
|
||||
|
||||
@Service()
|
||||
export class ChromiumlyTenancy {
|
||||
@Inject()
|
||||
private htmlConvert: ChromiumlyHtmlConvert;
|
||||
|
||||
/**
|
||||
* Converts the given HTML content to PDF.
|
||||
* @param {string} content
|
||||
* @param {PageProperties} properties
|
||||
* @param {PdfFormat} pdfFormat
|
||||
* @returns {Promise<Buffer>}
|
||||
*/
|
||||
public convertHtmlContent(
|
||||
tenantId: number,
|
||||
content: string,
|
||||
properties?: PageProperties,
|
||||
pdfFormat?: PdfFormat
|
||||
) {
|
||||
return this.htmlConvert.convert(tenantId, content, properties, pdfFormat);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user