android-html2bitmap icon indicating copy to clipboard operation
android-html2bitmap copied to clipboard

How can I include a external CSS file?

Open ghost opened this issue 5 years ago • 2 comments

@erikeelde @BeeeQueue @warting @hfreire @bborisovs

Hi, Sorry for mentioning everyone. Thanks for making such a wonderful thing.

If I write CSS codes inside the style tag of the head tag, it works fine. Is there a way to include a CSS file from the project files? Not from an external internet link. I am pretty new to these things. If this is possible, please teach me a little about the procedure.

Thanks in advance.

ghost avatar Jul 20 '20 16:07 ghost

I'd highly recommend using another library as this doesn't seem to be maintained anymore, and none of the creators work at iZettle anymore.

beeequeue avatar Jul 21 '20 13:07 beeequeue

@amibappy it should be quite readily doable to include it from the project files I think? I can't recall the exact syntax needed off the top of my head atm. I think they needed to be included using assets-syntax or something similar - and I'm pretty sure it can be done with the library the way it works today. Did you try making use of WebViewAssetContent by means of targeting your file using "html2bitmap://android_asset/..." to achieve what you want?

@BeeeQueue I'm not so sure there are terribly many options as it comes to solving this particular problem on android - which in fact is just why we wrote up this library. (The suggestion to use another library may be something of a dead end).

erikeelde avatar Aug 03 '20 22:08 erikeelde