initialZoomLevel property

double initialZoomLevel
final

Represents the initial zoom level to be applied when the SfPdfViewer widget is loaded.

Defaults to 1.0

This example demonstrates how to set the initial zoom level 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,
         initialZoomLevel: 2.0,
       ),
     ),
   );
 }
}

Implementation

final double initialZoomLevel;