Skip to content
This repository has been archived by the owner on Apr 12, 2019. It is now read-only.

Many images on html - not all loading and showing in generated pdf #50

Open
MadaManu opened this issue Oct 21, 2017 · 2 comments
Open

Comments

@MadaManu
Copy link

Hi,
It's my first time using phantom-html2pdf. I am dynamically generating html file based on a set of objects from the database. For each object a new table row is generated with one of the columns containing a img tag with the source of the image being on the web (s3).

The pdf gets generated, however only about 50 of the rows contain the images loaded and displayed in the generated pdf. There are about 1k+ rows with each having an image. The rest of the rows do not show any image. Is there something that I can do to enable the pdf generation to load each and every image referenced in the html?

*Note: the generated html opened by a browser does load every image (so it is not an issue with the images not existing).

@MadaManu
Copy link
Author

I have used the delay (on the page options) - I multiply the number of total rows that I know are in the table (the amount of images) by a randomly picked number (10) and seems that in most cases it allows enough time for the images to load.

Not sure this is the best way to go forward as this does not ensure that all images will be loaded in the set delay.

@dustin-H
Copy link
Member

Hi, sorry I am not aware of a better solution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants