Search code examples
pythonalgorithmimage-processingpdf-generation

Any algorithm for generating layout in a document?


First of all, I apologize my bad English.

I want to generate document image set which of layouts are randomly assigned in image.
Specifically, the size of paper is 2000*1500. And each layout's (paragraph, figures, etc) width and height should be 300 * 500 as minimum.

enter image description here

There's no rule on generating but what I only want is it should look like real "document" (like paper PDF). Attached drawing depicts what I'm thinking about.

oh yes, I do think this pic is horrible

*p.s.) Sorry but I don't want to split paper two side so make it easy. Just wondered how it makes possible!
Code in Python 3 most welcome.


Solution

  • Problem solved!

    Since i said i don't wanna split two sides in layout, I tried to split width and height with randomly chosen number of area. And it did looks good.

    enter image description here