Skip to content
New issue

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

pdfGenerator.generatePDF("FILE_NAME.pdf"); #13

Open
webappdevlopers opened this issue Oct 14, 2023 · 3 comments
Open

pdfGenerator.generatePDF("FILE_NAME.pdf"); #13

webappdevlopers opened this issue Oct 14, 2023 · 3 comments

Comments

@webappdevlopers
Copy link

webappdevlopers commented Oct 14, 2023

pdfGenerator.generatePDF("FILE_NAME.pdf"); getting crash here

@kariot
Copy link
Owner

kariot commented Oct 14, 2023

Can you attach a stack trace if you have any?

@amirhoseein63
Copy link

same problem

@mnguyen081002
Copy link

pdfGenerator.generatePDF("FILE_NAME.pdf") throw this error

FATAL EXCEPTION: main
Process: com.example.sportstore, PID: 15210
java.lang.ClassCastException: android.graphics.drawable.VectorDrawable cannot be cast to android.graphics.drawable.BitmapDrawable
	at me.kariot.invoicegenerator.utils.InvoiceGenerator.initInvoiceHeader(InvoiceGenerator.kt:150)
	at me.kariot.invoicegenerator.utils.InvoiceGenerator.generatePDF(InvoiceGenerator.kt:121)
	at com.example.sportstore.OrderAdapter.lambda$onBindViewHolder$1$com-example-sportstore-OrderAdapter(OrderAdapter.java:137)
	at com.example.sportstore.OrderAdapter$$ExternalSyntheticLambda1.onClick(D8$$SyntheticClass:0)
	at android.view.View.performClick(View.java:7448)
	at android.view.View.performClickInternal(View.java:7425)
	at android.view.View.access$3600(View.java:810)
	at android.view.View$PerformClick.run(View.java:28305)
	at android.os.Handler.handleCallback(Handler.java:938)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:223)
	at android.app.ActivityThread.main(ActivityThread.java:7656)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants