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?
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....
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.
Pardon the mic echo in the video. I had to record this on the fly and I didn't have my normal setup.
Finally I fond the dinamically pdf generator, Thanks Sir
That is great. It comes in handy very often.
Great video. It was comprehensive
That is good to hear. Glad you liked it
Thanks for sharing, are you also in audea btw? I'd like to listen more of your contents
I am not on it but I will look into it
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?
Image size is 100*100 px
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.
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....
Hey that's a great idea, thank you. I will see what I can do.
The google font import doesn't work for me, and breaks the rest of the styles until I remove it
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.
@@DevDrawer thanks for the reply, this is the approach I went with and it seemed to work without further issues.
Awesome. Glad I could help