Best way to create printable file with pics

HimeAnator

Member
Licensed User
Longtime User
I'm trying to allow my users to create a file by having my app go through a For Loop to gather all of the information (text and images that are associated with a user created list) and then put the information into a file that will hold text information along with an image and can then be either emailed or transferred via USB cable for to allow them to print it. I've tried the PDFWriter and had a little success but the text that the users have stored can be long and with no text wrapping or formatting it will go off the page. Also I read that a lot of images will cause the app the crash and the amount of images is user defined so it could be a lot. So I then tried to create an HTML file but when the file is transferred to a computer the images do not display because the file paths are different on android.

Right now I have settled with creating a ".doc" file that just has the text and no images. But its not really what I'm trying to do as the images are a very important part of the document.

Does anyone have any suggestions for me? Any help is much appreciated.
:sign0163:
 

mc73

Well-Known Member
Licensed User
Longtime User
So I then tried to create an HTML file but when the file is transferred to a computer the images do not display because the file paths are different on android.

Why not create a separate html file which uses the correct (relative) paths and ask users to open this one?
 
Upvote 0

HimeAnator

Member
Licensed User
Longtime User
Why not create a separate html file which uses the correct (relative) paths and ask users to open this one?

Ok so I just need to create a folder and put the HTML file into the new folder and copy the pictures into the folder as well and just put in <img src="picture.jpg"/> and because the images are in the same folder as the HTML file, the file path does not matter. Thank you so much! Been awhile since Ive dabbled in HTML :D
 
Upvote 0
Top