我想创建一个 flutter 应用程序,可以填写 PDF 上的可填写表单,我应该使用哪个免费库以及如何使用?有些表格会填写系统时钟。
我尝试使用 pdftron 和syncfusion,但它们不是免费的,因此每当试用结束时,我的应用程序将无法运行。
您可以使用 PDF 依赖项:
在 pubspec.yaml 添加以下依赖项
dependencies:
flutter:
sdk: flutter
pdf: ^3.0.0
之后在您的 .dart 页面中添加以下行
final pdf = pw.Document();
和
pdf.addPage(
pw.Page(
build: (pw.Context context) {
return pw.Center(
child: pw.Text('This is a fillable PDF form'),
);
},
),
);
pdf.save();
作为回报,您可以在 pdf 中设计您想要的内容。