Pdfdocument Support API (API 19) version from API 14

Asked

Viewed 310 times

0

I am in need of implementing a way to generate a PDF and send an email as confirmation of an order. I realized that was added in API 19 the Pdfdocument that already creates a PDF from a Canvas object.

I wonder if anyone knows any support API that works in a similar way and can be used for previous version of android (my minSdk=14).

I have seen other libraries working on PDF generation but in different ways (not being created from Canvas objects).

These other third-party libraries also have the problem of being paid.

1 answer

2

This is the first time I’ve heard of a library that generates PDF from the canvas of a View. I don’t believe there are any alternatives to this library. With any luck, the Android development team will add this feature in an upcoming version of the compatibility library.

Anyway, there’s this library here which serves to create PDF files. The only problems are that

  1. it does not generate PDF from canvas as you want,
  2. the license of the application is not free of charge and
  3. the library’s developer company is known for exchanging the content of its licenses leaving developers in the lurch.

There is a tutorial on how to use it on Vogella.

There is also this library here that I have never used and really have no knowledge to talk about. Apparently does not have full support for android, but you can take a look if you want. Only license is also not free. You can see a Helloworld example from the library here

  • I had already reached these libraries, but none of them served me, including by the facts of the licenses. and I’m also already creating the on-screen report with Canvas, so this native API would be a hand on the wheel. since it wouldn’t need a new conversion. Even try to implement my own source-based support API Pdfdocument android, more has features that are only available within the android package.

  • iText PDF is actually very powerful and simple to use. I’ve used it in a project that had to create and edit Pdfs and the response was excellent. I also point out its use.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.