ggrossetie / asciidoctor-web-pdf

Convert AsciiDoc documents to PDF using web technologies
https://asciidoctor.org
MIT License
455 stars 92 forks source link

resolves #633 Introduce PUPPETEER_PRINT_TIMEOUT for puppeteer pdf rendering #632

Closed siaccarino closed 2 years ago

siaccarino commented 2 years ago

The pull request #236 did not change the puppeteer rendering timeout - it changes the time asciidoc-web-pdf waits for puppeteer.

According to puppeteer pdf options a timeout shall be passed to the page.pdf() call instead.

Rendering of complex documents on slow machines could easily exceed the 30s limit.

Solution: Introduce a PUPPETEER_PRINT_TIMEOUT environment variable that is passed to puppeteer - see puppeteer pdf timeout option.

Issue: #633

ggrossetie commented 2 years ago

Looks good! One last thing, could you please update the console.log message to include this new environment variable:

> TIP: You can configure the timeout in milliseconds using PUPPETEER_DEFAULT_TIMEOUT, PUPPETEER_NAVIGATION_TIMEOUT, PUPPETEER_RENDERING_TIMEOUT or PUPPETEER_PRINT_TIMEOUT environment variables.

As mentioned in https://github.com/Mogztter/asciidoctor-web-pdf/issues/612#issuecomment-1028081320 it would be better to create a separate 'TIP' for each timeout but for now it's good enough. We can revisit this logic later in a follow-up pull request.