![]() ![]() The sound-equivalent of this is the sample. Most image generating AIs work with pixels as their building blocks. If you run into problems at any step of the way, paste your errors into ChatGPT, and it’ll help you out! Pdf.line(x, BORDER_WIDTH, x, BORDER_WIDTH + grid_rows * GRID_SIZE)Īnd the final PDF output (after the script is run locally) Pdf.line(BORDER_WIDTH, y, BORDER_WIDTH + grid_columns * GRID_SIZE, y) Grid_height = A4_HEIGHT - 2 * BORDER_WIDTH Do not draw partial squares.Ī4_WIDTH = 297 # Width of A4 paper in mm (landscape)Ī4_HEIGHT = 210 # Height of A4 paper in mm (landscape)īACKGROUND_COLOR = (41, 31, 88) # Dark purple In the remaining space, figure out how many 1cm x 1cm squares would best fill the remaining space, and build a 1cm x 1cm grid with thin white lines. Please write a python script using fpdf that will output a file “my-grid.pdf” which is a landscape a4 pdf file with a background color of dark purple, and has a border of at least 2cm. It does take an extra step, but it figured it out in python! ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |