cesarvr / pdf-generator

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

iOS CSS background images do not appear #100

Closed LeHaine closed 5 years ago

LeHaine commented 5 years ago

I am generating a PDF based off a page that uses a bunch of background images embedded with base64. On Android they display cleanly but on iOS it fails to do so. It does seem though on iOS that is starts to display them but gets cut off nearly instantly. I've attached screenshots of what I am seeing for Android and iOS. If you look at Step 4 in the iOS screenshot below you can see a small piece of the background image at the top.

Android PDF: Android PDF

iOS PDF: iOS PDF

LeHaine commented 5 years ago

After a whole day of trying to fix this issue it ended up being some iOS quirk when using the background CSS property with a color. The color lost its transparency and ended up covering the images. I ended up switching to using the box-shadow property in its place which seems to work.