We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It can run on my local
Can'n running on local. But run on production
Structure: aws-lambda /access /.fonts ipaexm.ttf ipaexg.ttf
Error
"Error: ENOENT: no such file or directory, mkdir 'E:\tmp\.fonts'\n at mkdirSync (node:fs:1372:26)\n at Function.font"
protected async createReportPdf(contents: string): Promise<Buffer> { try { let opts = {}; if (isProduction) { await chromium.font("/opt/fonts/ipaexg.ttf"); await chromium.font("/opt/fonts/ipaexm.ttf"); opts = { args: chromium.args, defaultViewport: chromium.defaultViewport, executablePath: await chromium.executablePath(), headless: true, ignoreHTTPSErrors: true }; } else { await chromium.font("assets/.fonts/ipaexg.ttf"); await chromium.font("assets/.fonts/ipaexm.ttf"); opts = { args: ["--headless"], defaultViewport: chromium.defaultViewport, executablePath: process.env.CHROME_PATH || chrome, channel: "chrome", headless: true, ignoreHTTPSErrors: true }; } const browser: any = await puppeteer.launch(opts); const page: any = await browser.newPage(); await page.setContent(contents); const pdf: Buffer = await page.pdf({ format: PDF_PAGE_SIZE, printBackground: true, landscape: false, timeout: 0 }); browser.close(); return pdf; } catch (e) { throw e; } }
-->
The text was updated successfully, but these errors were encountered:
It still works on "@sparticuz/chromium" version: 111.0.0, but not on greater versions
Sorry, something went wrong.
Using the path font online but it's not working: // await chromium.font("assets/.fonts/ipaexg.ttf"); // await chromium.font("assets/.fonts/ipaexm.ttf"); await chromium.font( "https://raw.githack.com/googlei18n/noto-emoji/master/fonts/NotoColorEmoji.ttf" ); opts = { args: ["--headless"], defaultViewport: chromium.defaultViewport, executablePath: process.env.CHROME_PATH || chrome, channel: "chrome", headless: true, ignoreHTTPSErrors: true };
"error": "Error: ENOENT: no such file or directory, mkdir 'E:\tmp\.fonts'\n at mkdirSync (node:fs:1372:26)\n at Function.font
No branches or pull requests
Environment
Expected Behavior
It can run on my local
Current Behavior
Can'n running on local. But run on production
Steps to Reproduce
Structure:
aws-lambda
/access
/.fonts
ipaexm.ttf
ipaexg.ttf
Error
"Error: ENOENT: no such file or directory, mkdir 'E:\tmp\.fonts'\n at mkdirSync (node:fs:1372:26)\n at Function.font"
-->
Possible Solution
The text was updated successfully, but these errors were encountered: