如何生成采用了android绘图命令的PDF文件? [英] How to generate a PDF using android drawing commands?

查看:160
本文介绍了如何生成采用了android绘图命令的PDF文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有画线和文本到画布上的机器人计划。 (这些都是矢量绘图操作。)没有人有任何建议出口的帆布为PDF?我已经研究过改变Bitmap.Com pressFormat的画布是基于,希望有会是一个PDF(或某种载体)格式,但没有运气。

I have an android program which draws lines and text to a canvas. (These are all vector drawing operations.) Does anyone have any advice for exporting that canvas to a PDF? I've looked into changing the Bitmap.CompressFormat that the canvas is based upon, hoping there'd be a PDF (or some sort of vector) format, but no luck there.

我的目标是输出某种矢量文件适用于印刷。

My goal is to output some sort of Vector file suitable for printing.

我倒是AP preciate任何意见。谢谢!

I'd appreciate any advice. Thanks!

推荐答案

有没有在Android的这一点。你可以在拍摄看是否有人有对Java(例如,iText的)一个PDF库工作在Android上,但这些库的可能很大。

There is nothing in Android for this. You can take a shot at seeing if somebody has a PDF library for Java (e.g., iText) working on Android, but these libraries may be large.

有一个更好的解决方案可为您节省在简单的东西(例如,SVG,XML格式),让您的服​​务器,转换为PDF或其他任何需要的。

A better solution may be for you to save in something simpler (e.g., SVG, an XML format) and have your server convert that to PDF or anything else desired.

这篇关于如何生成采用了android绘图命令的PDF文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆