A Python application that converts digital text into realistic handwritten documents on lined paper.
This tool transforms plain text into handwritten-style documents that look like they were written with a blue ballpoint pen on lined paper. Perfect for creating personalized notes, letters, or study materials with an authentic handwritten appearance.
- Convert any text file to handwritten document
- Multiple handwriting styles (regular, neat, messy)
- Blue ballpoint pen effect with realistic ink variations
- Customizable paper templates
- Natural character spacing and text flow
# Clone the repository
git clone https://github.com/prajwal-38/text_to_handwriting.git
cd text_to_handwritten
# Install dependencies
pip install -r requirements.txt
python main.py --input sample_txt.txt --output handwritten.png --style regular
--input, -i
: Input text file path (required)--output, -o
: Output image file path (default: output.png)--style, -s
: Handwriting style (regular, neat, messy) (default: regular)--config, -c
: Config file path (default: config.yaml)
Dear Friend,
This is a sample text that will be converted to handwriting.
Isn't technology amazing?
Best regards,
Your Name
You can customize the appearance by modifying the config.yaml
file:
- Change paper template
- Adjust margins and line spacing
- Modify handwriting size and variation
- Scan your paper at 300 DPI
- Save it as PNG in the
assets/templates
folder - Update the template name in
config.yaml
- Font creators for the handwriting fonts
- PIL/Pillow library for image processing