christopherdro / react-native-html-to-pdf

Convert html strings to PDF documents using React Native
MIT License
434 stars 264 forks source link

Item's background colors is not showing in ios #301

Open AzizKizgin opened 1 year ago

AzizKizgin commented 1 year ago

it is my code. I give background-color for style. Screenshot 2023-08-11 at 12 05 39

for android it my pdf is Screenshot_1691744855

for ios Simulator Screenshot - iPhone 14 Pro - 2023-08-11 at 12 05 57

afizboltz commented 12 months ago

hi, may i know your path for IOS ?

im having issue to store pdf in device

sefam-stoussaint commented 11 months ago

@AzizKizgin Have you found a solution ? I've got the same issue and it's really annoying.

@afizboltz On my side, for iOS, I use the react-native-share so the user can save it anywhere he wants.

AzizKizgin commented 11 months ago

@AzizKizgin Have you found a solution ? I've got the same issue and it's really annoying.

@afizboltz On my side, for iOS, I use the react-native-share so the user can save it anywhere he wants.

`@media print {

I just added this and issue fixed.

sefam-stoussaint commented 11 months ago

Works perfectly, thanks

lylong90 commented 11 months ago

@AzizKizgin Have you found a solution ? I've got the same issue and it's really annoying. @afizboltz On my side, for iOS, I use the react-native-share so the user can save it anywhere he wants.

`@media print {

  • { -webkit-print-color-adjust: exact !important; } }`

I just added this and issue fixed.

Same issue here and this solution works for me! thanks!

olrtg commented 10 months ago
@media print { * { -webkit-print-color-adjust: exact !important; } }
Tusharthakur0977 commented 3 months ago
@media print { * { -webkit-print-color-adjust: exact !important; } }

Can you please tell where to put this line in the html content

olrtg commented 3 months ago

@Tusharthakur0977 inside a <style> tag.