PDF file. How to import them?

mauri74doc

Member
Licensed User
Longtime User
Hello to all. I wanted to know how to view files in. Pdf application that I'm creating. Let me explain: I am using sqlite database to manage many text files (. Txt) which are then displayed in the APA. As you know, with Notepad, I have no chance of being able to change the fonts (I would like to make my application a little more attractive) and so I thought I convert each file. Txt existing pdf (perhaps using the converter in Word or other software deputy to convert formats). I searched the forum, but have not found anything useful to my cause. So how do I? What is the code?
 

ilan

Expert
Licensed User
Longtime User
Android doesn't natively support PDF files. You will need to install a PDF reader and then send an intent to this reader with the PDF file.

hallo erel, if android does not support PDF files how do it all the PDF readers that are available in google play??

i am also searching for a way to load a pdf file to a view in my app
i just need to load it as text, maybe there is a way to get all the text from the pdf file and load it to a label??
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Erel said android doesnt support PDFs natively. Other apps runing code to read an pdf-file. Search google for pdf-file-format. But all this seems for me as shooting with a cannon on birds. Why you dont read the text directly from db which you just manipulated and display the text in a label?
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
You could consider using HTML or the RichString library to format your text for display.

enemotrop was extracting text from pdf's recently, I don't think he was worried about formatting though, find it here

Using intent's to display the PDF's in an external reader is the way to go if you want to keep using PDF's. There are libraries available for Android that allow you to load and manipulate PDF's within an app, but when I've looked they all seem to have shortcomings, unless you're willing to pay for an expensive commercial license. And they will require wrapping for use with B4a.
 
Upvote 0
Top