Open pavelsust opened 6 years ago
Hi. I'm new in android. I have used this pdfview library in my app but I want to add search text in the viewer. have you found any way to do it?
no still now i don't find this solution. If you found something let me know or if i found something i will comment.
Hello.. Am working on a project where i should contribute with a github repository and solve an issue with it.. so i'll work to add the search feature into the application :)!
Hi Masud How are you? Unfortunately I couldn't find any solution for searching through PDF android app. I used a PDF viewer but it doesn't have search function. I couldn't understand! Sorry! did you mean you could find a way to search through PDF?
On Tue, Dec 4, 2018 at 9:54 PM Nourhanjx notifications@github.com wrote:
Hello.. Am working on a project where i should contribute with a github repository and solve an issue with it.. so i'll work to add the search feature into the application :)!
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/barteksc/AndroidPdfViewer/issues/697#issuecomment-444204448, or mute the thread https://github.com/notifications/unsubscribe-auth/AqpjLftDykl3bURAi6Os6qi6c4oCKFGHks5u1r3QgaJpZM4XXH2W .
Yes! What i meant to say that i’ll work to solve this issue and add the search feature into the application! But I guess you guys should approve first before i start the implementation of it :)?
I can't understand you. Can you tell me how?
Would you mind please how you can search through a pdf in android???
@Nourhanjx how i can help you? and what do you mean by approve first? what need to approve.
I want to search through PDF file. Is it possible to tell me how
On Thu, Dec 6, 2018 at 11:16 AM Md.Masud Parvez notifications@github.com wrote:
@Nourhanjx https://github.com/Nourhanjx how i can help you? and what do you mean by approve first? what need to approve.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/barteksc/AndroidPdfViewer/issues/697#issuecomment-444778896, or mute the thread https://github.com/notifications/unsubscribe-auth/AqpjLVU2qL9kw-dC3K5rCA2n0DvbXfuUks5u2MtvgaJpZM4XXH2W .
Yes! What i meant to say that i’ll work to solve this issue and add the search feature into the application! But I guess you guys should approve first before i start the implementation of it :)?
I don't think you need any approval to fork the code or implement your solution. You check check it out and make changes.
how can we add a search in pdfview
how can we add a search in textview also
any one can help me to highlight text or paragraph while reading pdf ? Let me know how to code it
Though i like this library very much. But i need a feature like search text in pdf and keyword will be highlighted and go to that page where keyword found.
Did u find any?
Hlo, Is it possible to Search a word and Indexing in this library...?
This thread is still active. Hopefully someone can provide us solution for good. :+1:
implementation 'com.google.android.gms:play-services-vision:20.1.3' // search from pdf
ParcelFileDescriptor fileDescriptor2 = getContentResolver().openFileDescriptor(Uri.parse(getSource), "r");
PdfRenderer pdfRenderer = new PdfRenderer(fileDescriptor2);
for (int i=0; i<pdfRenderer.getPageCount(); i++) {
PdfRenderer.Page page = pdfRenderer.openPage(i);
Bitmap bmp = Bitmap.createBitmap(page.getWidth(), page.getHeight(), Bitmap.Config.ARGB_8888);
page.render(bmp, null, null, PdfRenderer.Page.RENDER_MODE_FOR_DISPLAY);
TextRecognizer textRecognizer = new TextRecognizer.Builder(getApplicationContext()).build();
Frame imageFrame = new Frame.Builder().setBitmap(bmp).build();
String imageText = "";
SparseArray<TextBlock> textBlocks = textRecognizer.detect(imageFrame);
for (int j = 0; j < textBlocks.size(); j++) {
TextBlock textBlock = textBlocks.get(textBlocks.keyAt(j));
imageText = textBlock.getValue(); // return string
//Log.i("here", imageText);
}
page.close();
}
pdfRenderer.close();
help pls
@ncpy do you have source code to zoom the next textblocks when there are many detected bitmaps?
Though i like this library very much. But i need a feature like search text in pdf and keyword will be highlighted and go to that page where keyword found.
This app is all ready done anyone can use reverse engineering.
https://play.google.com/store/apps/details?id=pdf.reader.pdfviewer.pdfeditor
pdfium should have this function, the problem is to implement it for android. I remember the old app "google pdf viewer" which however was based on pdfium and had this function
I did some research and found some libraries that have implemented the search, but I don't know if they work, they should be tested. It would take someone to test them and maybe fork and keep an updated fork.
Test them and let me know if they work in any way
https://github.com/gulshan98185/AndroidPdfViewer
https://github.com/beeline09/AdvancedPdfView
Though i like this library very much. But i need a feature like search text in pdf and keyword will be highlighted and go to that page where keyword found.