merge-pdf-android
is a Kotlin library for Android that enables developers to merge multiple PDF files into a single document. It is designed to be lightweight, efficient, and easy to integrate into any Android project.
Add the following to your build.gradle
file:
dependencies {
implementation("com.victorcarreras:merge-pdf-android:1.0.0")
}
Here’s a basic example of how to use the library:
val merger = PdfMerger(context)
val pdfList = listOf(file1, file2, file3) // List of File or Uri
val output = File(context.cacheDir, "merged.pdf")
merger.merge(pdfList, output) { success ->
if (success) {
// Handle success
} else {
// Handle failure
}
}
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new branch (git checkout -b feature/your-feature-name).
- Commit your changes (git commit -am 'Add new feature').
- Push to the branch (git push origin feature/your-feature-name).
- Open a Pull Request.