Issue
I am using flutter pdf plugin.This is my code:
pdf.addPage(pw.Page(
pageFormat: PdfPageFormat.a4,
build: (pw.Context contex) {
return pw.Image(image,fit:pw.BoxFit.fill);//pw.Container(
//child:
//pw.Image(image,fit:pw.BoxFit.fill));
}));
The problem is that I want to make pictures fulfill all pdf pages.
but it looks like this:
There are spaces around the edges.
Solution
I used FullPage and it worked.
pdf.addPage(pw.Page(
pageFormat: PdfPageFormat.a4,
build: (pw.Context contex) {
return pw.FullPage(
ignoreMargins: true,
child: pw.Image(image,fit: pw.BoxFit.fill),
);
//pw.Container(
//child:
//pw.Image(image,fit:pw.BoxFit.fill));
}));
Answered By - cvsrt
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.