Open deniscass opened 5 months ago
const double inch = 72.0;
const double cm = inch / 2.54;
body: Container(
height: MediaQuery.of(context).size.height,
color: AppTheme().kirlibeyaz,
child: PdfPreview(
canDebug: false,
canChangePageFormat: false,
canChangeOrientation: false,
pdfFileName: '${customerModel.musteriAdiSoyadi!.replaceAll(RegExp(r' '), "-").toString()}-${AppLocalizations.of(context)!.production}',
maxPageWidth: (MediaQuery.of(context).size.height),
build: (format) => _generatePdf(
// ? Veriyi Pdf'e Aktarma!
// Margin
const PdfPageFormat(21.0 * cm, 29.7 * cm, marginAll: 0.5 * cm),
),
)),
``` Hope it will solve your problem.
Thank so much @bksbora i will try this
Hi guys,
I need a help about change printer margins from this module in Flutter. For example, i have a Epson Thermal printer T20 thats accept print pdfs. I need change all margins to 0.5cm a print some text content in 80 columns layout.
When i attempt change PdfFormat and Document settings in my code, i get large default margin in printed result. How work with document and page setting to get margin changed:
Thanks in advance