【问题标题】:PDF not showing jpeg images in flutterPDF未在颤动中显示jpeg图像
【发布时间】:2021-05-20 06:56:23
【问题描述】:

图像以 base64 编码的形式存储在 sqflite 数据库中。使用此代码可以完美显示 PNG 图像。 From here

   try {

bytes = base64.decode(<base64 Image String>);

image = PdfImage.file(

pdf.document,

bytes: bytes,

);

} catch (e) {

bytes = null;

image = null;

}

但不适用于 jpeg base64 编码图像。

任何帮助将不胜感激。

【问题讨论】:

    标签: flutter pdf flutter-layout flutter-dependencies


    【解决方案1】:

    这篇博文有误。

    这是一个更好的例子: https://gist.github.com/DavBfr/a70e763582e95f70331d14ad03ddfe7d

    【讨论】:

      猜你喜欢
      • 2019-04-06
      • 2012-02-06
      • 2020-11-15
      • 2022-08-15
      • 1970-01-01
      • 2019-04-07
      • 2014-01-07
      相关资源
      最近更新 更多