我想显示pdf
的封面。但我不知道该如何进行。我有pdf文件的URL,我想像图像一样显示首页。我正在使用pdf库,但我不知道该如何进行。
答案 0 :(得分:1)
几天前我也在寻找相同的产品,并找到了解决方案。 您可以使用以下软件包:https://pub.dev/packages/pdf_rend
您可以在小部件中像这样使用它:
PdfDocumentLoader(
assetName: 'assets/hello.pdf',
filepath: 'path of the file in local storage',
pageNumber: 1,
pageBuilder: (context, textureBuilder, pageSize) => textureBuilder()
)
答案 1 :(得分:0)
https://github.com/PDFTron/pdftron-flutter处有一个用于PDF SDK的Futter包装器示例。以及相应的博客:https://www.pdftron.com/blog/flutter/build-a-document-viewer-in-flutter/