Skip to content

pdf image  #47

Closed
Closed

Description

@IGated876

i realize when try to place an image it crashes when i take out the code it works fine. is there something i am missing?

PdfImage image = PdfBitmap.fromBase64String('R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7');

//Draws the image to the PDF page
page.graphics.drawImage(image, Rect.fromLTWH(pageSize.width - 30, pageSize.height - 70, 0, 0));

Activity

  1. Anand3595 commented on Nov 6, 2020

    @Anand3595

    Hi IGated876 ,

    We have validated the provided code and identified that the issue is not from the code snippet to draw an image. We are suspect the provided base64 string is for an image type GIF. As of now, We have support to draw only JPEG and PNG images to PDF document by using flutter-pdf library. So, We suggest you to add JPEG or PNG images to PDF document instead of using GIF.

    Please find the documentation for drawing PNG and JPEG image to PDF document from https://help.syncfusion.com/flutter/pdf/working-with-images.

    With Regards,
    Anand Panchamoorthi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions