Print Page | Close Window

SetFormFieldValue text overflow

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2872
Printed Date: 05 May 24 at 2:13PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: SetFormFieldValue text overflow
Posted By: lambda
Subject: SetFormFieldValue text overflow
Date Posted: 22 Apr 14 at 1:04PM
Hi
I use SetFormFieldTextSize to set the form field text size to 10.
but sometime data length is too long to I have set the size to 0 which auto adjust the Text size.
I cannot set it permanently to 0 because when text data is just "no" the text is sized to the maximum that will fit, and you and up with extremely large text.

The problem is: How do I know the text is too long to fit it the given form field?

Is there a call I can make to check if the text has overflowed After SetFormFieldValue?

OR Is there a call to limit the text size to a given value after SetFormFieldTextSize =0?





Replies:
Posted By: AndyD
Date Posted: 22 Apr 14 at 1:23PM
Afternoon, I'm not sure where you call this from but I use VB6 and I set the field lengths in my app to a maximum so I don't end up with minute text in the PDF.
To stop the text being too large, what you could do is to analyze the string before it is passed to the PDF and if it is short, i.e "no" you could auto fill to a pre-determined length with spaces. Therefore when it is passed it would hopefully size on the total string giving you a more acceptable size. 
 
This may or may not work but thought I'd suggest it.
 
Regards


Posted By: lambda
Date Posted: 22 Apr 14 at 3:19PM
Thanks, filling with banks could be a start to avoid massive text. the problem is the end customer create the PDF Field not me, so I cannot predict there size vs Text length.  sometime is can be a name some time it can be lengthy text. There has to be be a way to detect if the text has overflown. 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk