Articles in this section
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',
    ),
  );
}

 

loading PDF from URL-SfPdfViewer-Flutter.

 

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.

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied