Closed cavid90 closed 4 months ago
You can wait for different events, like $page->waitForNavigation('DOMContentLoaded');
, but javascript can change the whole page at any time. You can try to make a loop checking if a specific content is present in the page.
I tried only $page->waitForNavigation('DOMContentLoaded'); . But then css and images did not load. May be I should wait both $page->waitForNavigation('DOMContentLoaded'); and $page->waitForNavigation(Page::LOAD); ? If yes then how should be the code ?
You can fix that by loading the CSS in the head of the page.
That will also fix the bug in your website where people see the page rendered improperly, while it is loading.
As I understood I should get the content of css file in the head between style tag
I checked loading css in head of page. But it did not help. There must be another way
I found what was the problem. In html font was loaded from google. And sometimes it was not able to load them and that is why pdf contents were not visible. Now fonts are loaded from my own server and everything is ok
Hello. I have created cv builder chrome php. But have one problem - sometimes content is like not fully loaded. Seems like css, images are loaded, but text is not. How can I solve it ? From screenshot seems like it was still loading. I added part of code also.