Detecting Text Box Size

The PDF Creator enables you to create secure PDF documents and to view, print and process existing PDF documents.
If you have any questions about the installation and usage of the PDF Creator please post them here.
Post Reply
mtsdave
Posts: 6
Joined: Fri Feb 08 2008

Detecting Text Box Size

Post by mtsdave »

Hi

I am running a PDF creator 2.01b and using this to output a series of fields onto a user designed template. Recently however, we have found that one of our clients needs to use this functionality to output a rather large text field, in some cases more than a they can allow on a page for a single text box.

I know that a text element cannot span 2 pages, so does anyone know if there is there any way to detect if the text in a field has overrun the visible area of it, and capture either the remaining text or the visible text so that the rest can be dropped into another text box on a subsequent page?

Many Thanks

Dave
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

Are you asking about regular text box or editable fields?

In the PDF Creator you can specify the number of characters that can be entered in a field.
Custom Brand the Amyuni PDF Printer Driver http://www.amyuni.com/en/developer/branding/index.html

Amyuni PDF Converter tested for true PDF performance. View results - http://www.amyuni.com/benchmark
mtsdave
Posts: 6
Joined: Fri Feb 08 2008

Post by mtsdave »

I'm using labels, but that could be changed easily enough I suppose to a different type of object if necessary.

Unfortunately, a fixed length of characters would not work as we are allowing users to design a the document on screen. So some users may set it to be the entire sheet, whilst the more awkward ones may only give the field a dozen or so lines after they have put all of their header information in.

This is then replaced by a text string from our application database which can be up to 1000 characters long depending on the particular output of that day. Obvously I can find the length each time the import is performed, however, I either need to be able to find out if this will run out of space in the field, or the maximum number of characters that can be stored in the particular text box that I'm using.

Hope that makes a little more sense

Dave
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

The text can not be spaned over two pages, however there are two attributes of the text object that helps you display all the text even if it is larger than the text box:

TextClipping: If set to true, it shows text that is spilled outside the rectangle.

AutoResize: Automatically resize the text object to fit all its text.

You will find more information about these two attributes in the Text object attributes section (page 127) of the Developers manual.

I am assuming that 1000 characters will fit on 1 page and will not drop to the second page.
Custom Brand the Amyuni PDF Printer Driver http://www.amyuni.com/en/developer/branding/index.html

Amyuni PDF Converter tested for true PDF performance. View results - http://www.amyuni.com/benchmark
mtsdave
Posts: 6
Joined: Fri Feb 08 2008

Post by mtsdave »

Thanks for the reply, I am aware of the 2 functions you have highlighted and unfortunately they are not what I am looking for.
I am assuming that 1000 characters will fit on 1 page and will not drop to the second page.
That is incorrect. The 1000 characters in my example will not fit on a single page and need to be moved to a second. For example, the text element on the first page can fit 400 characters (but I do not know this as the user can change the font or text size prior to importing the data from the database) so I need to be able to either detect that only 400 characters can be displayed, or detect the additional 600 characters that have not been shown on the sheet so that I can insert a second page and show them on it
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

I have good news for you: We are currently developing this feature and it will be in the next release.


Hope this helps.
Custom Brand the Amyuni PDF Printer Driver http://www.amyuni.com/en/developer/branding/index.html

Amyuni PDF Converter tested for true PDF performance. View results - http://www.amyuni.com/benchmark
mtsdave
Posts: 6
Joined: Fri Feb 08 2008

Post by mtsdave »

That sounds great, do you have any estimates on a date on this?
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

The next release is planned for end of April.
Custom Brand the Amyuni PDF Printer Driver http://www.amyuni.com/en/developer/branding/index.html

Amyuni PDF Converter tested for true PDF performance. View results - http://www.amyuni.com/benchmark
Post Reply