-
-
Notifications
You must be signed in to change notification settings - Fork 630
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
PDF background Image not show #154
Comments
You cannot use Your code: DecorationImage(
image: pdfImage,
fit: BoxFit.cover,
), will take care to stretch the image to fill the page, keeping the aspect ratio. |
Sir, I have already used pdfImageFromImage and pdfImageFromImageProvider functions into the code but still couldn't show the background image. And as per your suggestion, I have changed the width and height (414x815) which is exact pixel dimensions of the RGBA buffer I am passing, but it wan't work. |
ok, replace the line final PdfDocument pdfDocument = _generateDocument(); with final PdfDocument pdfDocument = pdf.document; and Buy Me A Coffee. |
Thank you for helping me and its worked. |
Describe the bug
I am trying to add background image for pdf. As per the PDFImage widget requirement, I am convert background image into UInt8List and its converted, but didn't show expected background image and its gave the white background and its doesn't give any error.
Background Image
My Code
Code snippet to reproduce the behavior:
Expected behavior
I want to add background image into pdf background.(i.e. same as like watermark)
Flutter Doctor
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: