How can I hide particular words in a PDF on Android? - android

I am trying to implement reading a PDF within an Android app. I want to hide particular words from it.
I have downloaded a PDF viewer library. It opens properly but am not sure whether it is possible to hide words in that document.
Is there any library available that can do this?
Please help me!
Thanks in advance.

May be you are using muPDF Library and seriously muPDF or other libraries which renders PDF uses Images for rendering data they are not in text format so the modifications you want will be pretty hard to do so.
You may use iText Library for this, itext Library can extract the text from PDF and then you show the text as you want.

Related

Android: how to load pdf within app?

I have:
First goal: figure out how to load a PDF from the internet and display it whithin my app
Second (maybe more complex) goal: download a pdf and display OFFLINE within my app
I looked for some solution on stackoverflow and on the Internet but I can't figure out how to implement it
For example I found Mupdf and the source code of some PDF viewer for Android but I'm quite confused: why is so difficult to display a "simple PDF"? Is there any Java library that will do it without incorporate external source code etc.?
Any suggestion is really appreciated.
Thanks in advance!
There are some libraries and sdk.
This might help you
http://www.qoppa.com/android/pdfsdk/
http://code.google.com/p/droidreader/

PDF Markup and Annotation Tool

Hello Fellow Developers,
I am developing a PDF annotation for Android Tablet and would like to open/display PDF file within my android application to edit. I have done research on how to open PDF file and most methods and libraries suggest to convert the PDF to a image file. I don't want to convert to image file because the image file pixelate when I increase resolution. Now the problem I am facing are.
1) Which method I must use to display the pdf file within my application to annotate
2) I also want to implement text reflow in my app
Please suggest.
Thank you.
Regards,
Marcello
If you will read pdf file specification, you will find, that pdf have no any type of flow. Actually each letter just is strictly coordinated on a page. Therefore:
It is simple to annotate any content of pdf document by the coordinates the mark on an any rendering content.
It is impossible to use pdf as a "what you see is what you get" editor. Even it is impossible to perfectly correct parse pdf to editable and back. It is the basically WRONG idea to do, because PDF is just the representation, not the design.
Funniest part of the pdf is text. Especially - unicode text. I want to say, that catching non-english text from the pdf file will return unpredictable results.
Thank you!

How can I convert an image to pdf in android?

I want to convert an image taken from my camera to a PDF so that I can programmatically read the text in it. I saw some links which suggested I use itext jars. I wanted to know the best approach for my requirement. Thanks in advance guys.
For image to PDF there are may libraries available like iText, droidtext so you can use it. But for your actual requirement is
so that I can programmatically read the text in it.
to read
text from your image file instead of converting it to PDF file, I suggests you to use OCR library for it. There are many Android-OCR Libraries ( tesjeract, mezzofanti ) which are used for read text from image.

How to create a PDF and add the contents usnig iText library in android...?

I am using iText library to create PDF documents.
I am able to create and add contents to the document programmetically like "new Paragraph("This is new pdf")".
My question are
Can I add the
contents by typing something in the
document and save it as PDF using
iText library? As like we are
creating word documents...?
Suppose if I want to insert an image in my
document, it will be done by picking
an image from my External storage
using a dialog box...?
Is it possible using iText library in
andriod...?
These are multiple questions. I'll try answering them all. However it seems one answer to all your questions is, first try, study, learn what iText is about, then ask questions
but my question is can i able to add
the contents by typing something in
the document and save it as PDF using
iText library? like we are creating
word documents...?
No, you have to do it programmatic. iText is not a WYSIWYG tool like Adobe Acrobat or other GUI-PDF Editors.
suppose if i want to insert a image in my document, it will be done by picking an image from my External storage using a dialog box...
If you create the dialog box and the code logic to add it to a PDF in the iText way it is possible.
is it possible using iText library in
android...?
The general available iText is not fit for Android. You can contact iText Sales department to know more about iText Android.

Custom pdf viewer in android

I need to have a custom pdf viewer inside my application where i have my own menu and all.
It is not working with webview and i tried by converting each page into image but i feel its not a good way and it make my application big and complex.
Is there any way to create custom pdf view in
suggest me some link and tutorial
Thanks
You obviously need a pdf renderer/viewer. Since core Android OS does not provide one you will need a 3rd party one.
Take a look at http://andpdf.sourceforge.net/

Categories

Resources