Expand my Community achievements bar.

Text overflow to next page.

Avatar

Former Community Member
We are trying to create documents in Adobe Designer 7.0. Some imported text will be lengthy, and we want the text to flow to the next page to accomodate the information if necessary, and have the page numbers automatically be added to the total. Page 4 of 4 would automatically grow to page 5 of 5. Can this be done? Also, we want some information kept together, and if there is not enough room on the page, the whole group would overflow to the next page. I would really appreciate help with this - even if it's just to say that this is not possible.



Thanks in advance.



KP
15 Replies

Avatar

Former Community Member
Hi,<br /><br />what you are trying to do is possible. There are atleast two general ways of doing this.<br /><br />If the text data comes from a single field, then the xdp form can easily place the data onto each page and create a new page when required. You can repeat a header and footer onto each page as well.<br /><br />in the repeating part of the page, you need to create your field that will repeat. This can be a single row field with the layout width property set to expand. Bind this field to your data source.<br />Wrap the field in a subform and set the subform property to Position Content. Once the following header and footer subforms are created, set the overflow leader and overflow trailer properties for this subform to those of the header and footer subforms.<br /><br />Then, wrap this subform in another larger subform. This will be set to Flow Content. Add the header and footer subforms here (with appropriate fields).<br /><br />That should give you an idea of how it can work. <br /><br />If the repeating data is a concatonation of several fields, then it can be done programmatically. The same structure is used as created above, however, don't bind the repeating text field to the data source. Instead, here is a javascript code snippet that will help to create multiple subforms:<br /><br />var fileBlk = xfa.record.files.files_item.all;<br /><br />for (i=0; i<fileBlk.length; i++) {<br /> attPoliceFile = fileBlk.item(i).agency_code.value + ":" + fileBlk.item(i).policeFileNo.value;<br /><br /> this.Attachment.AttachmentDetail.instanceManager.addInstance();<br /> this.Attachment.AttachmentDetail.all.item(i).policeFiles.rawValue = attPoliceFile;<br />}<br /><br />To get page numbers, go to the Custom Library tab, and grab the Page n of m field.

Avatar

Former Community Member
Thanks, John. Your information was extremely helpful and probably makes Adobe Designer the program that I need. The User to User Forum is a great resource, as it utlimately puts me in contact with those with experience in many facets of Adobe- such as yourself.



Kind regards,



Kathy Potter

Avatar

Former Community Member
John, I thought you might be able to help me with a similar problem:



Data flow between content areas



GregRWelch - 05:05pm May 12, 2005 Pacific



The following statment is from LiveCycle Help: ...if an object that merges data expands so much that it will no longer fit in one content area, the object spills into the next and subsequent content areas...



MY PROBLEM IS... the width of the first content area dictates the width of the second content area... and so forth.



My QUESTION IS... is it possible to allow text to spill over and into a contant area of a different width?

Avatar

Former Community Member
Hi



I am not exactly sure what you are trying to do.



Do you have a content area that when it's width increases, for example, you want an adjacent content area's width to decrease? Or when a content area is filled, that you then overflow the remaining data into a second content area . Both options are possible.



First, here are two different things to think about:



1. A Flow Content subform can have a flow direction of 'Western Text'. This will flow the fields within the subform horizontally across the page first, then vertically. (see the object subform tab)



2. The second thing you might try is create a text object and then within that text object you can create floating fields. These fields will automatically stretch to the width of data entered. A floating field is available through the insert menu. (although if using floating fields, save often. My designer occassionally blows up when I resize a text object that has floating fields)



If you want to overflow text into a second content area then let me know. I have written some javascript that determines if a set of data records will fit within the physical bounds of a text field. If the records do not fit, then I write them out onto a subsequent attachment page which spans an unlimited number of pages.



John

Avatar

Former Community Member
Hi John,



I was originally attempting to flow rich text from one text field into another with Acrobat Pro 7.0. When the first text field fills up, the remaining text spills into the next field.



Well, the only way to do this is to use javascript in the Custom Keystroke area of the properties within the first text field. I have the beginnings of a javascript that will allow text to flow into another field but... the second text field strips away the rich formatting.



I cannot find any assistance in completing my script so I thought I would work around the issue by exploring "content areas" in LiveCylcle.



I created three horizontal content areas on a single page (top: 5"w / middle: 3"w / bottom: 5"w)and one text field (in Body Tab) within the top content area. When text fills up the text field (within the top content area) the rest spills into the middle content area and then into the bottom content area. The problem is... the middle content area is set at 3" not 5". The text field does NOT spill from a 5"w to 3"w to 5"w... it spills at 5"w to 5" to 5". The middle content area's narrower width is ignored most-likely because the text field has to be set to expand in height before the delimted content area causes a spilling action.



Anyway, my goal is to create an interactive form (poster) that will allow a user to paste their rich text into a text field (top) that will flow into a second (narrower) text field. I would prefer to do this in Acrobat instead of LiveCycle but I'm not very good at Javascript yet. This is what I have so far:



var Text1 = this.getField("Text1")

var Text2 = this.getField("Text2")



console.println(event.fieldFull + " " + event.change)

console.println(" " + event.changeEx)

console.println(event.change.length + " - " + event.changeEx.length)

if (event.fieldFull == true) {

N1 = event.change.length

N2 = event.changeEx.length

Text2.value = event.changeEx.substr(N1);

this.getField("Text2").setFocus();

}

Avatar

Former Community Member
Do any of these methods work with proportional type faces? I have a requirement to start a narrative on page 2 of a four-page form, continue said narrative to page 3 and end it on page 4, and the requirement specifies the use of either the Arial or Times New Roman type faces. Further complicating matters is that the narrative areas on the form do not take up the entire page; there are two fields at the top of pages 2 through 4 that repeat information entered on page 1.

Avatar

Former Community Member
No. The javascript I posted is not only incomplete but it strips rich text during overflow to a second field.



Designer does allow overflow from one text field to another but only if the second field is on another page.



BRICK WALL



Greg

Avatar

Former Community Member
I have yet to figure out how to do that. Every scheme I've tried in Designer greets me w/a disabled "Allow Page Breaks Within Content" selection, so I have yet to figure out how to draw three 6"x6.5" text boxes and have them flow one into another. And yes, the fields are on separate pages.

Avatar

Former Community Member
I have not used Designer in a while. I do remember checking the HELP docs under the "keyword overflow."



Greg

Avatar

Former Community Member
I'll try that again. Primary reason I started asking around the fora was because the help docs were strangely silent on how to make this dog hunt.

Avatar

Former Community Member
Make sure you save your file as either a dynamic PDF or an XDP file. The flow won't work if you have a static PDF file.



Also, you should not be using three different text fields. You should be using one text field, but three different content areas.

Avatar

Former Community Member
The dynamic PDF I figured out fairly early on in the game. The one-field-over-many-content-areas trick is a new one on me; I didn't find that in the tutorials. How would that work?

Avatar

Former Community Member
Try this out to see for yourself:



- Create a new template in designer and save it as a dynamic PDF.

- Create two master pages. For each page, restrict the page occurrence to a max of 1.

- Set the content area of the first page to a 2X2 inch square on the left hand side of the page

- Set the content area of the second page to a 2X2 inch square on the right hand side of the page

- You should already have one subform in the template that is now the same size as your content area on the first page. Add a second subform to your template. It should place it into your second content area. Adjust the height and width to fit into the content area.

- Add a text field to the first subform. Set its width to 2 inches. Set the height to "Expand to fit". Click the checkbox to "Allow Multiple Lines".

- Set the subform type of your first subform to "Flow Content".

- Now preview your PDF. Type a bunch of data into the text field so that it will be larger than the first content area (adding line feeds by typing 'Enter' will get you there quicker). When you are finished, click anywhere outside of the text field. The text will automatically wrap into the second content area.



There is a limitation to this solution. When the text flows into the second content area, an exact copy of the text field will be placed into that content area. This copy of the text field has the exact same width as the first text field. As a result, you cannot display text with different widths in different content areas.

Avatar

Former Community Member
OK, different width content areas won't be a problem for me in the current situation. However, I can guarantee the users won't follow a box that scrolls off the top as you type into it, only revealing how much you entered after you leave the box. And my current situation, as stated in other posts (and possibly this one), has the multi-page text field starting on page 2, which differs markedly from page 1 and has a header that differs from those on pages 3 and 4, where the narrative continues. How much of this can Designer accommodate?

Avatar

Former Community Member
> However, I can guarantee the users won't follow a box that scrolls

> off the top as you type into it, only revealing how much you entered

> after you leave the box.



I don't think there's much you can do about this with Designer from what I can tell. Regarding your other concern, it should not be a problem that the text field starts on page 2 and that the headers are different on each of the pages. This can be accomplished by defining different master pages with different content areas on each. Once your text field wraps to the next page, it will display it in the content area located on that page.