Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues LinkedIn

Flutter Web PDF Generation and Download Example

Flutter Web PDF Generation and Download Example

This is a sample Flutter Web app that demonstrates how to generate and download PDF files using the Syncfusion_flutter_pdf package. The app allows the user to create a PDF document with custom content and download it to their device for offline use.

Requirements

  • Flutter version 3 or higher
  • Syncfusion_flutter_pdf package (version 21.2.4 or higher)

Installation

  1. Clone this repository or download the ZIP file.
  2. Run flutter pub get to install the required packages.
  3. Run flutter run -d chrome to launch the app in Chrome.

Usage

  1. In the app's home screen, you will see sample data displayed in a table format.
  2. Click on the floating action button to generate a PDF document with the table data and download it to your device.
  3. The downloaded PDF file will be saved in your device's default download directory.

Code organization

  • main.dart: The app's entry point, which sets up the UI and routes.
  • customer_model.dart: A model class that defines the structure of a customer object and sample data list.
  • pdf_service.dart: A class that encapsulates the PDF generation logic, such as creating a PDF document, adding pages, and download pdf file.
  • table_screen.dart: A widget that displays the customer data in a table format.

Contributing

If you have any feedback, suggestions, or issues, please feel free to create an issue or submit a pull request. We welcome all contributions!

License

This code is released under the MIT License. Feel free to use and modify the code for your own use.

About

This is a sample Flutter Web app that demonstrates how to generate and download PDF files using the Syncfusion_flutter_pdf package. The app allows the user to create a PDF document with custom content and download it to their device for offline use.

Topics

Resources

Stars

5 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages