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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:41:01+00:00 2026-05-12T18:41:01+00:00

I have built a web application that can be seen as an overcomplicated application

  • 0

I have built a web application that can be seen as an overcomplicated application form. There are bunch of text areas with a given character limit. After the form submission various things happen and one of them is PDF generation.

The text is queried from the DB and inserted in the PDF template created in iReports. This works fine but the major pain is overflowing text.

The maximum number of characters is set based on ‘average’ text. But sometimes people prefer to write with CAPS or add plenty of linefeeds to format their text. These then cause user’s text to overflow the space given in PDF. Unfortunately the PDF document must look like a real application form so I cannot allow unlimited space.

What kind of approaches you have used to tackle this?

  • Clean/restrict user input?
  • Calculate the space requirement of the text based on font metrics?
  • Provide preview of the PDF? (too bad users are not allowed to change their input after submission…)
  • 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-12T18:41:01+00:00Added an answer on May 12, 2026 at 6:41 pm

    Ideally, calculate the requirement based on metrics. I don’t know how iReports handles text, but with iText, it lays everything out itself, you just present the data as a streaming document, so we don’t worry about overflowing text.

    However, iReport may not support that, or you may need to have the PDF layout fit within certain bounds. I’d try to clean the input (ie: if it’s all caps, lowercase/sentence case/proper case it), strip extra whitespace. If cleaning the input can’t be reliably done, or people are still getting past that, I’d also restrict it.

    As a last resort, I’d present the PDF for the user to authorize. Really, users shouldn’t be given more work to do, and they’re not going to do it anyways.

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

Sidebar

Related Questions

I have been asked to build a web application that will be used to
I have an application that sends messages to an external web service. I build
I'm early in development on a web application built in VS2008. I have both
I am using Spring MVC to build my web application, and I have a
I have built a web page which contains a Crystal Report built using the
I am a broke college student. I have built a small web app in
Over the years most web developers will have built an arsenal of tools or
I have a web app built against asp.net 2.0, but keep getting the following
I have no experience with web services. Historically I've built client-server systems using proprietary
I have a new web app that is packaged as a WAR as part

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.