Created
March 19, 2024 13:31
-
-
Save MyricSeptember/79065c001e95d16ba1bfb33edda11bbd to your computer and use it in GitHub Desktop.
Load and save PDF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
result?.pdf?.let { pdf -> | |
val fileOutputStream = FileOutputStream( | |
File( | |
filesDir, | |
"$documentName.pdf" | |
) | |
) | |
contentResolver.openInputStream(pdf.uri).use { | |
it?.copyTo(fileOutputStream) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment