how to convert ppt slide to png using apache POI in android? - android

I want to convert each slide of a ppt file into corresponding png file using Apachi POI or any other mechanism.
Any good suggestions are welcome.

I am working on the same Application. Converting into images is a tedious process where u need to make changes in the entire POI API especially in draw function.So the better option is you can change it into web or html view.

Related

Android: Any faster way of generate PDF into images and drawing onto the pdf.

I am currently using Xfinium PDF to generate pdf into images and do some drawing on to the pdf using their Graphics api e.g. drawing cubic paths.
There is a constructor PdfFixedDocument which I used it to load the document. The problem is when I tried to load a 30mbyte document to get the page information it would take 10+second to call the PdfFixedDocument constructor which is quite inefficient if I just want to fetch the page information or just loading a single page.
Does anyone have any better idea? I can't use PDFRender on android because I am running kitkat. Will there be a better api which can give me a better efficiency.
For extracting a single page you can open the file using the PdfFile class and then extract the page using the PdfFile.ExtractPage method.
You can also extract the basic page information (width, height, rotation) using the PdfFile.ExtractPageInfo method.
The PdfFixedDocument constructor loads the entire file into memory and maps it to XFINIUM.PDF object model so that any object can be easily updated and depending on the objects in the PDF file this can take some time.
Disclaimer: I work for the company that develops XFINIUM.PDF library.

I have a map that's a vector image. Whats the best way of showing this in android?

I want to add a vector that's a map. I want to show this to the user, but I'm unsure of the best way to do this.
The only requirements I have are:
Show a vector
Start "zoomed" in (start at a specific point of the the map)
Work on 4.0 and up
I'm up for suggestion on which file type to use
Ah, that is definitely not how I interpreted "I don't want to specify one".
SVG is probably the lightest-weight solution. There are libraries that can display SVG in an ImageView as a Drawable, though these will only handle a subset of SVG. WebView on Android 3.0+ is supposed to be able to handle SVG files, though I haven't tried it.
Many, perhaps most, Android users have a PDF viewer, so if you're willing to open up a third-party app, you can do that easily enough. There are PDF libraries as well, though PDF is a more complex file format than is SVG, and therefore the libraries suffer.
I am not aware of any easy way to show an AI file directly, and those are the primary 2D vector formats in use today.

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.

What solutions do we have to read and display Autocad DWG files on Android?

I would like to display rich maps contained in Autocad .dwg files in my Android app. I'd like to know if there is an existing java library to do so?
If not, is it doable to translate a dwg file to a model and draw that model shape by shape on the screen?
I can't use Google maps instead of these files. The whole point of the app is to display a map with a lot of data and all that data is contained in my autocad files library.
Besides, is there an alternative format to DWG that I could use to do exactly this? (UPDATE: would SVG do the trick?)
What I ended up doing is to convert all my files in KML. I've selected this format because it might be the most used format on Android to do GIS.
To make a custom map, I'm drawing overlays on a mapview using these hints. It's basically the most interesting solution. I don't need to pay attention to geolocation stuff, the cursor and the scale are manage by Google API itself.
If you're going to convert I'd probably suggest DXF. I haven't used it, but YCad is a java DXF library. There are also a number of DXF to SVG converters available but it's probably best to avoid two conversions.

Display image using a RSS feed

I have an application in which use a RSS feed reader. My problem is that I don't know what is the best way to display an image. The closer I could get was to pull the image description (). I know I could parse this String by myself and get the image url, but I was wondering if there is a more elegant way to solve this issue. I tried using the SAX and the DOM classes, but I couldn't figure it out.
Best way to DISPLAY the image? I'm not sure if that's actually what you're asking, but just use an ImageView. Use an AsyncTask to download the image in the background, and then create a new Drawable from that downloaded image (might even want to cache it to storage) and set that as the source for the ImageView.
there is a library for downloading and caching images in background from the URL
https://github.com/koush/UrlImageViewHelperSample
=)
Are you asking how to get the image URL from the XML RSS feed? There's nothing built into the SDK that's going to help you parse the XML, other than SAX or DOM which you have already noted. There is a learning curve to those, but they are reasonable approaches.
There's a project called ROME that is an API for robustly parsing all sorts of feeds, including RSS. You could import this library into your android app. Note that this library has other dependencies, so you'd have to import them also. I haven't done it personally, but I have heard of people using ROME in Android apps, so it's doable.
Or more simply, if you just want the image URL and you don't need a complete feed parser, you can use java.util.regex to parse out the fields you want.
If you are asking how to display the image after you have the URL, kcoppock's answer explains it.

Categories

Resources