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

Joel Shapiro jsfmp at earthlink.net
Tue Sep 12 19:33:27 MDT 2006


Hi Kevin

I wish I'd thought of using images before I spent time on FPDF  
(though of course that may come in handy some other time...)

That's a great idea to use Lightbox-type of layering.  I like it.

Thanks so much,
-Joel


On Sep 12, 2006, at 6:28 PM, Kevin Futter wrote:

> On 13/9/06 11:15 AM, "Joel Shapiro" <jsfmp at earthlink.net> wrote:
>
>> Hi all
>>
>> OVERVIEW:
>> 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.
>>
>>
>> SITUATION:
>> 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.
>>
>>
>> OPTIONS EXPLORED:
>> 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.?)
>
> I would go with the image, as you then avoid running foul of users'
> preferences (and platfrom differences) for how PDFs are handled in web
> pages. Also, you could explore some of the newer JS libraries out  
> there that
> actually open new content in a dynamically generated layer over the  
> existing
> page (Lightbox being the most famous example). Most only handle  
> images, but
> there is one, whose name escapes me at the moment, that can load  
> most any
> document, including HTML files. This is a much friendlier approach  
> than
> pop-up windows, and also avoids pop-up blockers too.
>
> -- 
> Kevin Futter
> Webmaster, St. Bernard's College
> http://www.sbc.melb.catholic.edu.au/
>
>
>
> ------------------------------------------
> This e-mail and any attachments may be confidential.  You must not  
> disclose or use the information in this e-mail if you are not the  
> intended recipient.  If you have received this e-mail in error,  
> please notify us immediately and delete the e-mail and all copies.   
> The College does not guarantee that this e-mail is virus or error  
> free.  The attached files are provided and may only be used on the  
> basis that the user assumes all responsibility for any loss, damage  
> or consequence resulting directly or indirectly from the use of the  
> attached files, whether caused by the negligence of the sender or  
> not.  The content and opinions in this e-mail are not necessarily  
> those of the College.
>
>
> _______________________________________________
> 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