pageSpacing property

double pageSpacing
final

Represents the spacing (in pixels) between the PDF pages.

If this property is set as 0.0, then the spacing between the PDF pages will be removed.

Defaults to 4.0

This example demonstrates how to set the page spacing in the SfPdfViewer.

class MyAppState extends State<MyApp>{

late PdfViewerController _pdfViewerController;

@override
void initState(){
 _pdfViewerController = PdfViewerController();
 super.initState();
 }

 @override
 Widget build(BuildContext context) {
  return MaterialApp(
     home: Scaffold(
       appBar: AppBar(
          title: Text('Syncfusion Flutter PdfViewer'),
       ),
       body: SfPdfViewer.asset(
         'assets/flutter-succinctly.pdf',
         controller: _pdfViewerController,
         pageSpacing: 0.0,
       ),
     ),
   );
 }
}

Implementation

final double pageSpacing;