Learn How To Dynamically Create A PDF Using PHP - #96

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

КОМЕНТАРІ • 16

  • @DevDrawer
    @DevDrawer  2 роки тому +1

    Pardon the mic echo in the video. I had to record this on the fly and I didn't have my normal setup.

  • @Bikinin
    @Bikinin 3 місяці тому

    Finally I fond the dinamically pdf generator, Thanks Sir

    • @DevDrawer
      @DevDrawer  3 місяці тому

      That is great. It comes in handy very often.

  • @tyjjjj9730
    @tyjjjj9730 Рік тому

    Great video. It was comprehensive

    • @DevDrawer
      @DevDrawer  Рік тому

      That is good to hear. Glad you liked it

  • @jamaicaigot9335
    @jamaicaigot9335 2 роки тому

    Thanks for sharing, are you also in audea btw? I'd like to listen more of your contents

    • @DevDrawer
      @DevDrawer  2 роки тому

      I am not on it but I will look into it

  • @gauravsharma3610
    @gauravsharma3610 2 роки тому

    Great videos, i have a question ❓ i want to create a pdf with 5 images in a row and 5 rows in a page means 5*5 in a single page of a pdf if we have more images then append new page in pdf? Should I try the with html table for this?

    • @gauravsharma3610
      @gauravsharma3610 2 роки тому

      Image size is 100*100 px

    • @DevDrawer
      @DevDrawer  2 роки тому

      I would create this with a table so you can keep the col and row structure. Once you get you five rows add a new page and repeat the process.

  • @rahmandarmaji7469
    @rahmandarmaji7469 2 роки тому

    Hi Dev, good video...
    Anyway, could you made video about OTP login and login in one device, when user login other device it will logout other device...
    Thanks in advance....

    • @DevDrawer
      @DevDrawer  2 роки тому

      Hey that's a great idea, thank you. I will see what I can do.

  • @HartAttackV1
    @HartAttackV1 11 місяців тому

    The google font import doesn't work for me, and breaks the rest of the styles until I remove it

    • @DevDrawer
      @DevDrawer  11 місяців тому

      PDFs are iffy about including fonts or other stylesheets. You can get around the font issue by using mPDF's built in font library.
      1. Download the font from Google or wherever you are getting it
      2. Copy the downloaded files to the /ttfonts directory
      3. In the config_fonts.php file, you can add a new font to it. Something like this:
      $this->fontdata = array(
      ...
      "open-sans" => array(
      'R' => "OpenSans-Regular.ttf",
      'B' => "OpenSans-Bold.ttf",
      'I' => "OpenSans-Italic.ttf",
      'BI' => "OpenSans-BoldItalic.ttf",
      ),
      );
      4. Now in your stylesheet, you can call the font like this:
      p {
      font-family: open-sans,sans-serif;
      }
      Just remember, you have to refer to the property name of your custom font that you declare in the config_fonts.php in your stylesheet.
      I hope that helps.

    • @HartAttackV1
      @HartAttackV1 11 місяців тому +1

      @@DevDrawer thanks for the reply, this is the approach I went with and it seemed to work without further issues.

    • @DevDrawer
      @DevDrawer  11 місяців тому

      Awesome. Glad I could help