We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fun generatePdf() { if (!::targetView.isInitialized) { Log.e("PdfGenerator", "Target view is not initialized.") return }
PdfGenerator.getBuilder() .setContext(componentActivity) .fromViewIDSource() .fromViewID(componentActivity, targetView.id) .setPageSize(PdfGenerator.PageSize.A4) // Set A4 size here .setFileName("Demo-Text") .actionAfterPDFGeneration(PdfGenerator.ActionAfterPDFGeneration.SHARE) .savePDFSharedStorage(observer) .build(object : PdfGeneratorListener() { override fun onFailure(failureResponse: FailureResponse) { super.onFailure(failureResponse) // Handle failure } override fun onStartPDFGeneration() { // Do something when PDF generation starts } override fun onFinishPDFGeneration() { // Do something when PDF generation finishes } override fun showLog(log: String) { super.showLog(log) Log.d("PDF-generation", log) } override fun onSuccess(response: SuccessResponse) { super.onSuccess(response) // Handle success } })
}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
fun generatePdf() {
if (!::targetView.isInitialized) {
Log.e("PdfGenerator", "Target view is not initialized.")
return
}
}
The text was updated successfully, but these errors were encountered: