microsoft / genalog

Genalog is an open source, cross-platform python package allowing generation of synthetic document images with custom degradations and text alignment capabilities.
https://microsoft.github.io/genalog/
MIT License
310 stars 32 forks source link

Can we add line_spacing? #44

Closed egenc closed 3 years ago

egenc commented 3 years ago

Hello, I am trying to add linespacing. Even though I add new lines manually from txt, it still removes them.

with open(txt_path, 'r') as f:
    text = f.read()

# Initialize Content Object
text = text.replace('\n', '\n\n')
paragraphs = text.split('\n\n\n')

printing paragraph gives the demanded result, however, default_generator.set_styles_to_generate(new_style_combinations) somehow removes blank lines. Thank you in advance

laserprec commented 3 years ago

Hey there, thanks for the feedback! Could you please provide a little more of context here? Did you run into an issue following the documentation? If I am interpreting correctly, are you trying to increase the margin between paragraphs?

laserprec commented 3 years ago

Closing this issue due to a lack of participation/clarification. Please feel free to re-open this issue at any time!