cesarvr / pdf-generator

Cordova plugin to generate pdf in the client-side
MIT License
107 stars 61 forks source link

Plugin is not working with images #11

Closed kanika1901kapoor closed 7 years ago

kanika1901kapoor commented 7 years ago

@cesarvr I am using this plugin to convert html to pdf on my cordova app, but unfortunately it does not work with the CSS property background or background-image.. I also tried img tag. But, no success.

cesarvr commented 7 years ago

is the image of the background accessible from the phone ? is in the phone Filesystem ? if yes, check case-sensitive problems with filename, and as a last resort try to load your template in webkit in the mobile browser and check if your image get loaded.

take a look at this example, i'm able to load background images from google.com. pdf-generator-example

Cheers.

mj6uc commented 6 years ago

Hello <img src="file:///var/mobile/Containers/Data/Application/6DF0F18C-7063-4993-9194-6949A1F76BE6/Library/NoCloud/C3tuFcdv_photo_004.jpg" width="100%" />Hello <img src="file:///var/mobile/Containers/Data/Application/6DF0F18C-7063-4993-9194-6949A1F76BE6/Library/NoCloud/e62xLcdv_photo_005.jpg" width="100%" />

On iOS the above data when converted to PDF gives blank images even though the images are available on the path mentioned. What could be wrong?

javierClavei commented 6 years ago

+1

bmagne-bobbies commented 6 years ago

Any news from this problem ?

MadeInFck commented 2 years ago

Same trouble, anyone figured that out? My file path looks ok as usual missing icon is not displayed.