Skip to content Skip to sidebar Skip to footer

How To Generate A Pdf Using Android Drawing Commands?

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

Solution 1:

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.

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.

Solution 2:

That was very long ago. If anybody happens to find this question nowadays, Android has it since KitKat: PrintedPdfDocument.

Post a Comment for "How To Generate A Pdf Using Android Drawing Commands?"