Currently working on a rather complex invoice structure and have 99% of the project complete except for two instances where the "label" of my "labeled field" appears on one page, but the "field" itself spills over onto the next page.
In these two situations the next page has a block of header data, separators and a row of column header data between the page top edge and the "field" to be captured. I imagine this needs to be overcome with script. Is this possible and can anyone point me in the right direction? Perhaps there's a similar example somewhere I could reference?
In these two situations the next page has a block of header data, separators and a row of column header data between the page top edge and the "field" to be captured. I imagine this needs to be overcome with script. Is this possible and can anyone point me in the right direction? Perhaps there's a similar example somewhere I could reference?
Comments
12 comments
There are several approaches you could take and without seeing the documents it is hard to give you advise what is the best and easiest way of achieving what you want.
First of all you could define an absolute search area for your elements. This area should exclude your Header Data.
Instead of using a labeled field you can use an element "Static Text", to search for your keyword/label.
As field you use the element "Character String", you can restrict the search area of this string by using relations but you can also limit what values are valid for this element. For example you can limit the characters that can be found with Alphabets and wiht Character count limit how big a word can be.
I hope this helps you futher.
The second example is similar but I am capturing the element line on the upper most page as the static text word "Country" is located on that same page. I am not however capturing the "Country Code" "ID" from the lower page. I think I need script/code to overcome this problem.
Could you please provide flexi layout project with sample images for analysis?
Regards
Timur
Try using dropbox or googledrive, be sure to upload the whole flexilayout project not just the .afl file.
Regards
Timur
Could you please provide some sample images and a description of expected behavior?
Regards
Timur
Here's an example invoice. First page shows the elements to be captured in black rectangles. I reliably capture 99% of the invoice with a repeating group containing a "line of elements" and a "static text" + "character string" for the country that corresponds to each line of elements. I use the horizontal separators and the word "Country" for relations, in order to capture each line of elements and corresponding country code. The problem is with page number 9 and 23. As you can see on the attached document the last element on page 9 "bleeds" on to page 10. Same goes for page #23 except the word "country" appears at the bottom prior to bleeding over onto page 24. Hope that's a better explanation than what I provided previously.
In order to capture line items in these images you need a more complex approach.
Check sample project in attached documents.
First of all, we need to exclude page header area from our search area. In order to do this we need to find them first, this is what rgrHeaderElemet does.
It is a repeating group with one instance per page, by finding page headers we are able to norrow down our search area.
rgnSearchArea is needed to store the resulting region of repeating group.
Next thing we want to do is find our line items headers, i used the left code to find rows. Now that we have found all rows we are able to create one more repaeting group with search areas for each seaparate item check rgrItemSearchAreas group.
This groups' search area is restricted by rgnSearchArea element so that it doesnt include any elements from page header. Instances in this group are created based on our previous repeating group results.
As result we have separate instances with correct search areas for each item, which can be used to find whatever elements you need.
Regards
Timur
Post is closed for comments.