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 3876160
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:20:59+00:00 2026-05-19T22:20:59+00:00

I generate a PDF file using Prawn and the Prawnto plugin in my rails

  • 0

I generate a PDF file using Prawn and the Prawnto plugin in my rails application.

I create a standard form with a standard textarea, and submit that as the body of the PDF file.

However, I need to be able to format words and sentences with:

  • bold
  • underline
  • maybe different type sizes

I want to be able to do it from within the textarea input box. Right now, because I use prawnto, I basically am genering a view which outputs what is in the textarea.

But if I put, say, bold in the text area, it doesn’t format, it just renders.

How do I do this?

  • 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-05-19T22:20:59+00:00Added an answer on May 19, 2026 at 10:20 pm

    we may have similar apps…

    Prawn can do basic inline formatting based on (simple) HTML – take a look at the text/inline_format.rb example on github. In fact, take a look at the whole Prawn Example Gallery if you haven’t – it’s one of the best I’ve seen.

    To get the HTML you need you can either type HTML straight into the textarea (a bit ugly – might not be a good idea if anyone besides you will be entering text) or use something like Markdown to interpret more user-friendly “style codes” like StackOverflow does. I think BlueCloth is the best-known ruby implementation, but I’ve never used it myself.

    Bold and underline? No problem. Font size might be harder – I imagine it would be tricky to get BlueCloth to emit something like the (deprecated) < font > tag they use in the Prawn example…

    Hope this helps – cheers!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using iText to generate PDF invoices for a J2EE web application and
I'm using the Prawn Ruby library ( http://prawn.majesticseacreature.com/ ) to generate some pdf documents.
Is it possible to reorder an already generated PDF file programmatically, and using as
I'd like to dynamically generate content and then render to a PDF file. This
Is it possible to generate PDF Documents in an Adobe AIR application without resorting
We have a requirement to generate PDF documents using information from a PDA /
Is there an easy way to generate a PDF report from an RDL that's
I have a PHP application and a need to generate a PDF with the
I want to be able to generate PDF output from my (native) C++ Windows
If a business needed to connect to a various database and generate PDF mostly

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.