Newspaper Layout #1221
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
As I already mentioned in a comment on Reddit, please provide some minimal code when asking for programming guidance: https://stackoverflow.com/help/minimal-reproducible-example Have you tried to use What code have you tried to use already, and what are the precise problems that you are trying to solve? |
Beta Was this translation helpful? Give feedback.
-
Hi, Yes i tried TextColumns but it just chains text one by another i can manage to put for example TextColumns with 2 columns on 2/3 of page width with title above those two columns and then 1/3 of page width i just one column. I also tried using multicell and the result was close but i want to have fixed height for multicell can not be done as I saw an regular cell doesn't wrapp text. I haven't posted any code since actually there is none. None of my attempts is working and it is not a good reference for anything....I think Ill have to look for another lib maybe :/ |
Beta Was this translation helpful? Give feedback.
-
Fpdf2 is primarily designed for "normal" documents in smallish formats like A4. Newspaper layouts are very tricky. they consist of a patchwork of elements, which typically are arranged in some kind of raster, but may flow in quite unexpected ways. And since the text as written rarely fits the allocated space exactly, layout designers use tricks like changing the size of images or stretching the font of headlines to make it fit. Fpdf2 is not a layout software, even if it has recently grown some basic layout features. It is very unlikely that it will ever directly support complicated tasks like newspaper layouts. For those, the client software will have to manage the distribution of text columns and images within the design grid. @andersonhc has given you an example with a few pointers about a possible approach. Now if someone were to write a front-end package for creating newspaper layouts using fpdf2 as a backend, we would certainly all be very happy to see that. 📰 👍 |
Beta Was this translation helpful? Give feedback.
I found it interesting and decided to create a code snippet:
https://github.com/andersonhc/fpdf2-snippets/tree/main/newspaper
You will find there all the basic concepts you need.