如何用ItextG或者droidtext对PDF进行追加操作?

世外大帝
博客专家认证
2016-06-08 03:40:13
最近做一个项目,要对PDF文件进行证书加密签名,解析可以用mupdf,这个基本已经搞定了,但是对PDF的操作始终没什么头绪,用droidtext和ItextG都可以生成pdf,但是项目经理说是不是生成,是最pdf文件进行追加数据,就是2个eof结尾,关于ItextG在网上也没有找到有效的资料,希望大神们给点建议,多谢!!!
...全文
321 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
世外大帝 2016-09-03
  • 打赏
  • 举报
回复
引用 2 楼 linjimu 的回复:
droidtext只有0.5,3年前的东西。ItextG应该和ItextPDF差不多,只是itextG被谷歌移除一些不被Android支持的东西,增强通用性。 我也刚遇到需要处理PDF的小项目。 原文ref: If you want to use iText on Android or the Google App Engine, you need to use iTextG. iTextG is almost identical to iText, except that it only uses classes that are white-listed by Google. All references to java.awt, javax.nio and other "forbidden" packages have been removed. You can download the source code and binaries from the release page on GitHub. As there are no dependencies on classes that aren't supported on Android in the PDF/A and XML Worker packages, you can download the Java version of these projects.
谢谢,itextG通用性是有的,但是不如itextPDF强大,升级到5.6以后签名等功能都没有了,我从5.3到5.5.9的源码都看过了,稳定性比较好的,建议用5.1-5.3版本
沐NeMo 2016-09-02
  • 打赏
  • 举报
回复
droidtext只有0.5,3年前的东西。ItextG应该和ItextPDF差不多,只是itextG被谷歌移除一些不被Android支持的东西,增强通用性。 我也刚遇到需要处理PDF的小项目。 原文ref: If you want to use iText on Android or the Google App Engine, you need to use iTextG. iTextG is almost identical to iText, except that it only uses classes that are white-listed by Google. All references to java.awt, javax.nio and other "forbidden" packages have been removed. You can download the source code and binaries from the release page on GitHub. As there are no dependencies on classes that aren't supported on Android in the PDF/A and XML Worker packages, you can download the Java version of these projects.
世外大帝 2016-06-13
  • 打赏
  • 举报
回复
之前有大神写了一个手写签名系统,很不错的,但是原理实际上并不是对PDF直接操作,而是用国外大牛改的jar包droidtext进行生成操作,其实就是在一张透明图片上进行操作,然后生成新的PDF文件,现在ItextG到了5.5.9,这几天试了一下,是可以直接对PDF文件进行操作的

80,472

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧