我使用这个包(https://pub.dev/packages/pdf)来用app创建PDF文件。现在我找不到旋转PDF页面的方法。
尝试这个:
pdf.addPage(
pw.Page(
pageTheme: pw.PageTheme(
// this set the orientation of the content of the page, not the page itself which confuses most people.
orientation: pw.PageOrientation.landscape,
// this is what you want.
pageFormat: PdfPageFormat.a4.landscape,
...
),
build: (BuildContext context) => ChildWidget(),
...
),
)
Run Code Online (Sandbox Code Playgroud)
来源: https: //github.com/DavBfr/dart_pdf/issues/557
| 归档时间: |
|
| 查看次数: |
2315 次 |
| 最近记录: |