Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • P pagedjs-cli
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 54
    • Issues 54
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pagedjs
  • pagedjs-cli
  • Issues
  • #60

Closed
Open
Created Apr 22, 2022 by Mathis Poncet@math712b

Solution of infinite loading when adding some fonts in html which are located in Internet

Hello there,

Problem

When you add some fonts which are located in internet, puppeteer have infinite load issue. To avoid this, you have forget an option to put at moment to setContent which allow to wait until all ressources are loaded. Indeed in printer.js you set the content of html like that: page.setContent(html) while they are some options to wait the loaded of ressources.

Solution:

I see the same issue in puppeteer repo https://github.com/puppeteer/puppeteer/issues/728#issuecomment-334301491

setContent have not only the html content param but also an second which is the option. Inside option they are waitUntil :

paged.setContent(html, { waitUntil: 'networkidle0' })

waitUntil: 'networkidle0' allow to wait until they are no request which are sent after an certain duration

I made that in my project, and that's resolve this issue

Edited Apr 22, 2022 by Mathis Poncet
Assignee
Assign to
Time tracking