22 lines
453 B
TypeScript
22 lines
453 B
TypeScript
import * as plugins from './smartbrowser.plugins';
|
|
|
|
export class SmartBrowser {
|
|
puppeteer: plugins.puppeteer.Browser;
|
|
smartpdf: plugins.smartpdf.SmartPdf;
|
|
pdfFromPage(urlArg: string) {
|
|
this.smartpdf.getFullWebsiteAsSinglePdf(urlArg: );
|
|
}
|
|
|
|
public async start() {
|
|
this.smartpdf = new plugins.smartpdf.SmartPdf();
|
|
this.smartpdf.init();
|
|
}
|
|
|
|
/**
|
|
* stops the smartbrowser instance
|
|
*/
|
|
stop() {
|
|
this.smartpdf.close();
|
|
}
|
|
}
|