Category / Section
How to load a PDF document from URL in Flutter PDF Viewer (SfPdfViewer)?
1 min read
This article explains how to load a PDF document from a URL in Syncfusion® Flutter PDF Viewer.
The Syncfusion® Flutter PDF Viewer widget provides the support to load a PDF document from Asset, Network, File, and Memory. The SfPdfViewer.network is used to load a PDF document from a URL, which creates a widget that displays the PDF document obtained from the provided URL. The following code explains the same.
@override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text('Syncfusion Flutter PDF Viewer'), ), body: SfPdfViewer.network( 'https://cdn.syncfusion.com/content/PDFViewer/flutter-succinctly.pdf', ), ); }
A complete working sample can be downloaded from here.
Take a moment to peruse the documentation for loading PDF documents. You can also find other options like Asset, File, and Memory to load the PDF document.