Drawing patterns of lines on PDF document by FPDF class in PHP using color and width of the line

preview_player
Показать описание
Drawing multiple boxes by reducing the edge from the end of the pages will create patterns. First we will draw one squire by drawing all sides using Line() function in FPDF class.

We will declare a variable $gap and assign value to it. We will find out the width and height of the page by using GetPageWidth() and GetPageHeight(). Using these three values we will fix the coordinates and draw the box by drawing four sides.
Top horizontal line, bottom horizontal line , Left vertical line and right vertical line will be by manging width and height along with the $gap variable.
After drawing the box , this has to be kept inside one for loop where counter variable will be the $gap and it will incremented by equal intervals. This incremental interval will change the coordinates of the box and a pattern will emerge out of the loop.
The loop will continue till the value of $gap reaches half of the width of the page.
We can change the line width and line colour by using SetLineWidth() and SetDrawColor() functions.
#linepatterns #PDFLINEPATTERNS #LINESPDF
Рекомендации по теме
join shbcf.ru