[FX.php List] Display text within a static-sized rectangle (for eventual printing)?

Joel Shapiro jsfmp at earthlink.net
Tue Sep 12 19:40:53 MDT 2006

hmm... that's interesting...
I'd certainly prefer to do the calculating in PHP instead of in FMP...
although without a fixed-width font, using a character count would  
still be 'fuzzy'
I think my preference would be to try to simulate the printed version  
as closely as possible (visually -- so users can decide how to make  
changes to fit), but your suggestion is some thinking outside the  
rectangle (d'oh! sorry).  I will think about it a bit more.
Thanks Jonathan!

On Sep 12, 2006, at 6:28 PM, Jonathan Schwartz wrote:

> Joel,
> My first thought was to create a calculation that takes into  
> account not only word and character count, but line returns as well.
> Let's say the limit is 1000 characters over 10 lines, or 100  
> characters per line.  That would be the max. The person could put  
> one character on each of ten lines and fill the space. Charcount is  
> 10 but line count is 10.  Line count overides char count.
> Did I miss something along the way?
> J
> At 6:15 PM -0700 9/12/06, Joel Shapiro wrote:
>> Hi all
>> I'm looking for creative ways to give immediate feedback to Web  
>> users when their text (entered into a textarea) won't fit in its  
>> alotted space on its printed form -- without users having to wait  
>> for the admin to print the form and give it to them -- possibly  
>> the next day.
>> I've got a project where users enter text into a textarea on a web  
>> page (FX.php).  There is a word-count limit on the field which  
>> works fine *technically* (i.e. users cannot submit text over the  
>> limit).  The text in this field is later printed from FileMaker  
>> client by an admin.  The field prints on a form and has pre- 
>> defined dimensions of approx 2.5" x 4". The problem is that users  
>> want to be able to enter their text differently, e.g. some as a  
>> paragraph, some as a list, some with blank lines, etc, so a word- 
>> count doesn't really make that much difference (e.g. 5 words in a  
>> list can take up as much physical space as 20 words in a  
>> paragraph).  And getting all users to only enter text in one way  
>> (e.g. paragraphs only, no lists) is not an option at this time.   
>> (We'd originally used a character count, but they preferred word- 
>> count)
>> One other complication is that some reports are printed in OS X,  
>> and some in Windows XP, so even there there is a discrepancy  
>> between how much text will fit into this text box -- however I'd  
>> be happy to display at least an *approximation* of what the  
>> printed form will look like.
>> I've been playing with creating a PDF (via FPDF) to display just  
>> this text field within a bordered rectangle.  This seems to work  
>> _OK_, but it's certainly not ideal -- opening a new browser window  
>> and/or a PDF-reader app window, with a message to close the window  
>> to continue editing.  I don't like how it interrupts the UI of:  
>> (1) select record to edit; (2) edit record; (3) click to submit  
>> changes. It would be an additional step (2a) to optionally(?) view  
>> an approximation of how the field will print, and then (2b) to  
>> close that window and continue editing before submitting (step 3).
>> If I could display this in just a small pop-up window, it would be  
>> more acceptable, but that doesn't seem possible since as a PDF it  
>> could open up either in the browser or in a PDF-reader app.  And I  
>> don't want to put the whole form into a PHP-generated PDF, as it's  
>> a large, 2-sided report with very tight text-formatting (and I'm  
>> lazy).
>> Then I thought of maybe creating an image (GD) with the text  
>> inside the sized rectangle -- which probably *could* display in a  
>> small pop-up window -- but before I tackle that one, I thought I'd  
>> ask for suggestions.
>> Anybody got any for me?
>> (And if I use a PDF or an image, how consistent will these be for  
>> users on different browsers, different platforms, etc.?)
>> TIA,
>> -Joel
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
> -- 
> Jonathan Schwartz
> FileMaker 8 Certified  Developer
> Associate Member, FileMaker Solutions Alliance
> Schwartz & Company
> jonathan at eschwartz.com
> http://www.eschwartz.com
> http://www.exit445.com
> 415-381-1852
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

More information about the FX.php_List mailing list