How to Generate a PDF in FlutterFlow

Поділитися
Вставка
  • Опубліковано 1 гру 2024

КОМЕНТАРІ • 14

  • @raheelkhan-qn4ln
    @raheelkhan-qn4ln Місяць тому +2

    please create more videos like these bec you are the best 😍

  • @wheza99
    @wheza99 5 місяців тому +2

    this video help me alot.. you should do more like this

  • @OliverWittmannWilsmann
    @OliverWittmannWilsmann Місяць тому +3

    how to download the pdf now?

  • @wernerbruhns5516
    @wernerbruhns5516 5 місяців тому +2

    Great video! Can you show us how to email the generated email please?

  • @bharathraj-mg9hx
    @bharathraj-mg9hx 6 місяців тому +3

    Hi how to add image in this pdf?

  • @DQ940
    @DQ940 2 місяці тому +1

    great video. would be helpful to know how then to email it or to have this done automatically.

  • @angrub99
    @angrub99 2 місяці тому

    Hi, excellent videos! Do you happen to have one on how to create a download button for downloading an image, like in wallpaper download apps? How can I contact you? Thanks and best regards.

  • @jaguarconsultoriadigital8147
    @jaguarconsultoriadigital8147 6 місяців тому

    Please create a video showing dynamic product data, invoices, etc....
    Thanks

  • @mikethomas3637
    @mikethomas3637 6 місяців тому

    Can you do one for a word document?

  • @misterzer_officiel
    @misterzer_officiel 4 місяці тому

    Thank you

  • @monawang73
    @monawang73 3 місяці тому +1

    Hi how to add image in this pdf tks

    • @anuragsen3001
      @anuragsen3001 2 місяці тому

      To add the images in the PDF or Watermark you need to convert your assets/images files anyfile type for example PNGs into Uint8List -> this converts your image into bytes. Then use that data to populate your images in your code.
      For example:
      // Load the images from assets
      final Uint8List logoBytes = await rootBundle.load('assets/logo.png').then((data) => data.buffer.asUint8List());
      final Uint8List watermarkBytes = await rootBundle.load('assets/watermark.png').then((data) => data.buffer.asUint8List());
      final Uint8List backgroundBytes = await rootBundle.load('assets/background.png').then((data) => data.buffer.asUint8List());
      final pdf = pw.Document();
      // Define common styles
      final titleStyle = pw.TextStyle(
      fontSize: 28,
      fontWeight: pw.FontWeight.bold,
      color: PdfColors.blue900,
      );
      final subheadingStyle = pw.TextStyle(
      fontSize: 18,
      fontWeight: pw.FontWeight.bold,
      color: PdfColors.black,
      );
      final normalTextStyle = pw.TextStyle(
      fontSize: 14,
      color: PdfColors.black,
      );
      final highlightedTextStyle = pw.TextStyle(
      fontSize: 20,
      fontWeight: pw.FontWeight.bold,
      color: PdfColors.black,
      );
      // Add a page to the PDF
      pdf.addPage(
      pw.Page(
      pageFormat: PdfPageFormat.a4,
      margin: pw.EdgeInsets.all(32),
      build: (pw.Context context) {
      return pw.Stack(
      children: [
      // Ensure the background image fits the entire A4 page
      if (backgroundBytes != null)
      pw.Positioned.fill(
      child: pw.Image(
      pw.MemoryImage(backgroundBytes),
      fit: pw.BoxFit.cover, // Ensures the image covers the full page
      ),
      ),
      Hope this would help you :)
      Cheers,

  • @عقلانعبدالكريمالنعمه

    is it support arbic language

  • @QUEPASARIASI-j1n
    @QUEPASARIASI-j1n 4 місяці тому

    asombroso, me gustaría saber cómo se puede descargar ese documento