cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

LEP with APP

otudor
10-Marble

LEP with APP

Hi,

I am new with APP, better said with how APP works. I am trying to put together a list of effective pages (LEP).

 

I do understand the concept of traversing the document, extract the page number for each page and put it into a javascript global variable of type array and extract the info from the array into a lep page set or page region. What I am having trouble with is where (in what edit source?) to declare the array global variable and then how to access the array from the page set or from the page region.

 

Thank you for help in advance!

 

Florin

ACCEPTED SOLUTION

Accepted Solutions

I would use application.arrays to store the LEP information. You will need to clear it before formatting, which is the part I'm not clear on. You may be able to clear on the outermost element (e.g. <document>) but that may accidentally clear after format too.

 

Once you're formatting then you can add edited source at each relevant element/context/condition that triggers a change page. Your code would be something like application.arrays.lep[pgnum] = 1; where pgnum is the current page number (formatting.currentPage.pageNumber).

 

After the format, you then need to interrogate the "lep" array. Any array index whose value is 1 indicates a changed page. You may still find extra pages marked due to the way APP formatting works around page ends, but this should give you most of what you need.

View solution in original post

5 REPLIES 5

I would use application.arrays to store the LEP information. You will need to clear it before formatting, which is the part I'm not clear on. You may be able to clear on the outermost element (e.g. <document>) but that may accidentally clear after format too.

 

Once you're formatting then you can add edited source at each relevant element/context/condition that triggers a change page. Your code would be something like application.arrays.lep[pgnum] = 1; where pgnum is the current page number (formatting.currentPage.pageNumber).

 

After the format, you then need to interrogate the "lep" array. Any array index whose value is 1 indicates a changed page. You may still find extra pages marked due to the way APP formatting works around page ends, but this should give you most of what you need.

Hi Gareth,

 

Thank you for the reply and sorry for the delay, but I was trying to implement your hints and to understand better the mechanics behind APP.

I understand your approach, but I would have to implement another approach using same mechanics due to the fact that my LEP requires to indicate the level of change (see attached picture), and not just if there is a change on the page; and therefore, I would store the page numbers by using the pageString into an array and the change levels into another array, both indexed on pageNumber, and then pair them up based on index.

To do that I have created a property set to which I added a source code that would capture in two separate variables the pageString (formatting.currentPage.pageString) and pageNumber (formatting.currentPage.pageNumber) and store the pageString into the application.arrays.lep. I stored the pageString because some pages in the document would be counted as A, B, C…, i, ii, iii, iv, …, and I used the pageNumber as the index for the array. Once the edited source completed, I did add the property set to all the relevant elements/contexts/conditions.

One of the problem I have encountered is that adding edited source to each relevant element/condition/context would not “register” all the pages that the element spans on. For example, if an element has so much content that can be span on several pages, only the first page would be captured to be stored into the array. I tried to add edited source on page sets and then on page types but I did not get any different result than adding source code on elements. How do I capture blank pages if there is one?

Any idea, any advice?

Thank you very much for help!

Have a blessed day!

Florin

For the blank pages, it would depend on how they are being output. Perhaps if you have a UFE or something that is wrapping the "intentionally left blank" text, then you could use that to trigger the LEP capture.

 

For the content that spans multiple pages, the easiest method would be to store the start and end page folio for that element and calculate the values in between. e.g. for <table> and </table> you would store the start and end folios. That will be a pain if your change starts on a folio "iii" and ends on "F" or "13" instead. The other approach is to have APP do something at the top or bottom of every page but that will get complicated ("frame reference" and "page event" respectively).

Hi Gareth,

Thank you for the hints. I will try them out.

I am making big progress generating the LEP; and therefore, I will accept your post as solution.

On the other hand, I do not understand WHY???? PTC does not build a standard feature to generate LEP, just like they have done with TOC and indexes. List of Effective Pages is such an indispensable component of every TM out there, but also a pain and time consuming to generate it. Personally, I consider that a Styler without a LEP feature build in is an incomplete solution for the publishing community.

Thank you one more time for the hints. I hope to find a simple solution and then I will post it on the community board.

Have a blessed day!

Florin

Arbortext Change Page for Defense was the product that did LEP, but this has been discontinued. It was based on FOSI rather than APP.

Announcements

Top Tags