I use this package (https://pub.dev/packages/pdf) to create PDF files with app.. Now I can't find a way to rotate the page of PDF.
I use this package (https://pub.dev/packages/pdf) to create PDF files with app.. Now I can't find a way to rotate the page of PDF.
Try this. Comments in code.
pdf.addPage(
pw.Page(
pageTheme: pw.PageTheme(
// orientation: pw.PageOrientation.landscape, //this set the orientation of the content of the page, not the page itself. Which confuses most people
pageFormat: PdfPageFormat.a4.landscape, //this is what you want
...
),
build: (ctx) => ChildWidget(),
...