Skip to content

Adding Page Number on Page Bottom

Takashi Kawasaki edited this page Jan 4, 2025 · 2 revisions

If you want to add page number on each page, you can do that by PdfViewerParams.pageOverlaysBuilder:

pageOverlaysBuilder: (context, pageRect, page) {
  return [
    Align(
      alignment: Alignment.bottomCenter,
      child: Text(
        page.pageNumber.toString(),
        style: const TextStyle(color: Colors.red),
      ),
    ),
  ];
},