在android中将word文档转换为pdf [英] Conversion of word document to pdf in android
问题描述
我知道在 stackoverflow 中有 n 个问题与同一个问题有关,但我没有得到我想要的.我什至尝试使用 Qoppa
软件中的 jwordconvert.jar
,但是唉!!!它说
I know that there n number of question in stackoverflow which is about this same issue, but i didn't get what i was looking for. I even tried using jwordconvert.jar
from Qoppa
software, but alas !!! it said
Unable to execute dex: Java heap space
Conversion of dalvik format failed.
现在我在 android 市场上看到了一个应用程序,它的名字是 Word To Pdf
来自 ThinkTI.com.br
.它只是做了我想让我的程序做的事情.
Now i have seen an app in android market, thats name as Word To Pdf
from ThinkTI.com.br
. It just did what i want my program to do.
那么谁能告诉我这个应用程序背后的机制或类似或更好的方法......
So can anyone tell me about the mechanism behind this application or a similar or better way to do it....
推荐答案
披露:我在 docx4j 上工作
docx4j 可以生成 PDF 输出;见 ConvertOutPDF.java
docx4j can produce PDF output; see ConvertOutPDF.java
如果您的目的可以接受这种质量,那么您可以使用 docx4j Android 版本.参见 jaxb-can-be-made-to-run-on-android
If that quality is acceptable for your purposes, then you can use the docx4j Android build. See jaxb-can-be-made-to-run-on-android
你仍然需要给Java足够的堆空间;根据博客文章,要为 Eclipse 提供更多堆空间(症状是您无法执行 dex:Java 堆空间"),请编辑 eclipse.ini,例如:
You'll still need to give Java enough heap space; as per the blog post, to give Eclipse more heap space (symptom is ‘you get Unable to execute dex: Java heap space’) edit eclipse.ini, with something like:
-Xms256m
-Xmx4096m
这篇关于在android中将word文档转换为pdf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!