scrollDirection property

PdfScrollDirection scrollDirection
final

The direction in which the PDF page scrolls.

Defaults to PdfScrollDirection.vertical

Note: When pageLayoutMode is PdfPageLayoutMode.single then this property defaults to horizontal scroll direction and does not have any effect on vertical scroll direction for now.

This example demonstrates how to set the scroll direction to 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,
         scrollDirection: PdfScrollDirection.horizontal,
       ),
     ),
   );
 }
}

Implementation

final PdfScrollDirection scrollDirection;