Can anyone help me in converting a pptx into html view using docx4j.jar. Though I have gone through a lot of related questions already asked in this forum but none helped me. Please give me a brief conversion process(just name the related classes and their methods to invoke).
Well, m doing all this in my "Android" app and dont want any third party software(need to open pptx within my app only).
First, see jaxb-can-be-made-to-run-on-android
Next, try RenderAsSvgInHtml.java
Or, try the pptx to xhtml conversion in Java first, to confirm it is enough for your needs (before you go to the Android-related effort). At present, it is basically just text, lines and images, not custom shapes.
Disclosure: I wrote the stuff referenced above.
Related
I have found Is there a way to decode a .ICO file to a resolution bigger than 16x16? from 2 years ago and the best suggestion was to use image4j. Unfortunately it does not work under android in particular (also), because the classes "IndexColorModel", "BufferedImage" and "WritableRaster" are not available.
While working around "BufferedImage" by replacing it with "Bitmap" may perhaps work and not using "WritableRaster", but instead setting individual (or a group of) pixels using setPixel may work as well, I cannot manage to replace "IndexColorModel", because I cannot wrap my head around it.
I am currently downloading a favicon from a website, which stores usually more than one image inside of it. The images are of different size. I read up on the structure of ICO files and analyzed image4j as much as I could. Yet I have troubles refactoring the various classes to not use AWT.
BitmapFactory is able to load ICO files; unfortunately it only loads the first image (this is my guess at least) and thus does not let me decide which image to load (let alone load them all and let me chose).
Does anyone know if anything changed from 2 years ago and/or would anyone be willing to help me refactor e.g. BMPDecoder from image4j? Or is there perhaps a totally different, easier approach to it?
I have created a library based on image4j that will allow reading ICO files into a List of Bitmap-objects. In contrast to image4j ico4a does not use any AWT-classes, but instead only makes use of Bitmap / Bitmap.createBitmap.
See https://github.com/divStar/ico4a .
While the library's performance might not be the best as it uses a Bitmap-object's setPixel method in a loop, it gets the work done and it's good enough for me.
In comparison to image4j my library (ico4a) only decodes/reads files. While saving ICO files could be done probably relatively easy, I have not done so since I do not need it myself.
If you have further questions or issues with the library, post them on gitHub and I will see if I can help.
Around 2 days ago, i found out about the DexClassLoader Library by Android. As a rather mediocre programmer i have a few questions regarding this library/class/tool. The questions i have mainly focus on this Documentation:
It states, that it loads a external .jar or .apk file. Now lets assume i have my Project as follow:
com.me
-->src
---->main
---->fragment1
---->fragment2
-->layout
---->layout_main
---->layout_fragment1
---->layout_fragment2
How exactly would i now extract fragment1 with its corresponding layout into an .jar or .apk file, that my DexClassLoader can implement this file. And more importantly how do i transform these into such a file.
How do i implement all the functions i do have in my module (the exported Fragment)? I am guessing it is via an Interface, but i am neither sure, nor have found a good example online, as it kind of seems, as if it is a kind of underused feature.
Quiet similar to point 2, but how do i display this Fragment. If it is solved via an Interface, then i dont really have a way to call getFragmentManager().beginTransaction().add(R.id.smthng,Fragment1).commit();
Thanks for any sort of answer regarding any of these questions :) If i have more questions i will update this post. Cheers
Jacobus
I'm trying to really get to know the android source code. I've downloaded what I thought would be the code, but it seems to lack many files that I would have expected there.
I'm looking for the hardware/hardware.c (cpp) file, and the hardware/power.c files.
Does anyone know where I could find some samples of this. Or perhaps where I could find a book on the topic.
I think it's here:
https://android.googlesource.com/platform/dalvik/
See also: Where to get the source to Dalvik?
Please help me about how I convert a pdf file to text(string or character) in android.I have tried using a jar file of jpedal.But it has a problem that decodePdf.openPdfFile(file_name) function does not work.It show a problem like that javax.swing required.How I can solve this?please help me.
I used google to find Android PDF Library it looks pretty solid. There are also a lot of previous StackOverflow questions regarding this topic.
Is there a definitive method of creating either a PDF or a MS Word Doc file within the app and email it immediately (and possibly, also store it).
I have been trying for quite some time and have found out the JAVA libraries: apwlibrary and iText. But both of them dont provide any tutorials of sorts.
Could anyone point me in the right direction?
EDIT: Come to think of it, is could an online PDF generator be used, first by sending the data to the service, then retrieve the result and save it on the phone?
I would recommend apache fop http://xmlgraphics.apache.org/fop/
you can use standard FOP to generate pdf.
Unless it is a core feature of your device to create a pdf file I would suggest not to do it yourself. Adding PDF creation is going to be quite a lot of work potentially depending on your performance needs. Java libraries will be easier to add but less performant. Native libraries combined with Java will be more hazzle to maintain build and bug fixing wise.
If you just need to email some information why dont you create a message text in html and use a intent to email it with the build in email program instead? Or if you want you could e.g. put the PDF generation on a server and just email a link..
I'm working right now with JasperReports, an open source library to create reports in Java and export them to PDF, DOC, XLS... Using it in conjunction with iReport to create a group of templates makes it really easy to create files filled with content from different types of sources (I'm using JavaBeans).
If you don't like the idea of having static templates (That's a bit annoying depending on your needs), you can always take a look at DynamicJasper (The examples on the website are great).
Good Luck!
I have used Apache POI. It seemed to work well. http://poi.apache.org/
This actually, http://poi.apache.org/hwpf/