fix(core): update
This commit is contained in:
parent
58d923b14c
commit
1537705cde
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -76,6 +76,7 @@ export class SmartPdf {
|
|||||||
|
|
||||||
async getPdfForWebsite(websiteUrl: string) {
|
async getPdfForWebsite(websiteUrl: string) {
|
||||||
const page = await this.headlessBrowser.newPage();
|
const page = await this.headlessBrowser.newPage();
|
||||||
|
page.emulateMedia('screen');
|
||||||
const response = await page.goto(websiteUrl, { waitUntil: 'networkidle2' });
|
const response = await page.goto(websiteUrl, { waitUntil: 'networkidle2' });
|
||||||
const pdfId = plugins.smartunique.shortId();
|
const pdfId = plugins.smartunique.shortId();
|
||||||
await page.pdf({
|
await page.pdf({
|
||||||
@ -90,6 +91,7 @@ export class SmartPdf {
|
|||||||
|
|
||||||
async getFullWebsiteAsSinglePdf(websiteUrl: string) {
|
async getFullWebsiteAsSinglePdf(websiteUrl: string) {
|
||||||
const page = await this.headlessBrowser.newPage();
|
const page = await this.headlessBrowser.newPage();
|
||||||
|
page.emulateMedia('screen');
|
||||||
const response = await page.goto(websiteUrl, { waitUntil: 'networkidle2' });
|
const response = await page.goto(websiteUrl, { waitUntil: 'networkidle2' });
|
||||||
const pdfId = plugins.smartunique.shortId();
|
const pdfId = plugins.smartunique.shortId();
|
||||||
const {documentHeight, documentWidth} = await page.evaluate(() => {
|
const {documentHeight, documentWidth} = await page.evaluate(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user