question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Puppeteer options not applied

See original GitHub issue

Hello Peter,

Thank you for this wonderful package.

AN issue I run into with the 3.x upgrade is that my configurations are not applied. There are no errors, but the page size, margins and title are simply ignored. I’m generating with:

async ( content, meta, output ) => {
	const thepdf = new pdf( {
		inputBody: content,
		outputPath: `${output}/${meta.title}.pdf`,
		include: [ { type: 'css', filePath: meta.csspath } ],
		pdf: {
			title: meta.title,
			format: 'A5',
			margin: {
				top: '20px',
				bottom: '20px',
				right: '50px',
				left: '50px'
			}
		}
	} )
	await thepdf.start()
	await thepdf.build()
	await thepdf.close()
},

Have I misunderstood how the .pdf property is used to pass configs to puppeteer?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
crypton480commented, May 24, 2018

Sorry, for the late reply. I was away all week. I just created the pull-request. Thanks, @peterdemartini!

And thanks @actuallymentor for the help! 😃

2reactions
1000i100commented, May 18, 2018

Same issue with the omitBy removing it worked for me, but not in CI, i’m witing for the pull-request 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

puppeteer/troubleshooting.md at main - GitHub
This means that the browser was downloaded but failed to be extracted correctly. The most common cause is a bug in Node.js v14.0.0...
Read more >
Puppeteer does not seem to work with docker - Stack Overflow
If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox. Core file will not be generated. ...
Read more >
Puppeteer documentation - DevDocs
Puppeteer 7.1.0 API documentation with instant search, offline support, keyboard shortcuts, mobile version, and more.
Read more >
Deploy a Web Scraper using Puppeteer, Node.js and Docker ...
This guide shows how to deploy a web scraper using Puppeteer, Node.js, Docker and Express.js on the Koyeb Serverless Platform.
Read more >
Puppeteer Tutorial on Web Scraping - Oxylabs
Puppeteer can be used for web scraping, and in this Google Puppeteer tutorial, ... Python programmers, therefore, have a similar option – Pyppeteer....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found