Skip to content

About

An example android app built with Kotlin to convert view to image & PDF.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Android View To Image And PDF

This is an example Android app demonstrating how to export a specific view to an image or PDF.

Overview

The main functionality resides in the Utility class, which contains two public functions:

  • saveViewAsPdf(context: Context, uri: Uri, view: View): Saves the given view as a PDF file.
  • saveViewAsImage(context: Context, uri: Uri, view: View): Saves the given view as an image file.

In the example project, the file location to save the exported view is chosen using Intent.ACTION_CREATE_DOCUMENT, allowing the user to select the location. The chosen URI is then passed to the utility functions.

If you prefer to programmatically create the file without user interaction, you can generate a file URI and use that instead. However, you will need to handle the necessary permissions for file access.

Feedback

If you have any queries or feedback, please feel free to reach out!

About

An example android app built with Kotlin to convert view to image & PDF.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages