Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8373411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:40:12+00:00 2026-06-09T14:40:12+00:00

I have a string with the text precisely spaced the way I want it

  • 0

I have a string with the text precisely spaced the way I want it displayed. It’s sort of an ascii art project. I want to convert this text to a pdf so I can print a poster with the text at my local printshop.

The font needs to be fixed width and there are no tabs or anything like that. The lines end in the ‘\n’ character. There are several space characters.

The image is several hundred characters wide and several hundred high. So, it doesn’t fit in the space of a typical page.

How do I do this in python?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T14:40:14+00:00Added an answer on June 9, 2026 at 2:40 pm

    Try the module pyPdf, might do the trick for you!

    Or pyfPdf, that allows you to set the font when you create new PDF-files (setFont example)

    From pyfPdf Tutorial Page :

    from fpdf import FPDF
    
    pdf=FPDF()
    pdf.add_page()
    pdf.set_font('Courier','B',16)
    pdf.cell(40,10,'Hello World!')
    pdf.output('tuto1.pdf','F')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like: hello #this# is #some text string# text text I
I have a string of text like so: var foo = FooBar; I want
Suppose I have this code: String encoding = UTF-16; String text = [Hello StackOverflow];
Simple example: we have string Some sample string Of Text. And I want to
I have large String variable named text . I want to be able to
I have a string ( $string for this example) and I want to do
I have this string: some text\nandsomemore I need to remove the \n from it.
Say I have a string text, a caret position caret and then want to
hi all i have a string text that may contains urls (this text is
I have string like this: Some standard text CONST_INSIDE_QUOTES blah blah CONST There might

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.