Back in January 2012, there was a request by Hugh Senior on the livecode-dev mailing list for 'pageChars' and 'pageChunks' field properties to complement the 'pageHeights' property. I seconded that request, but the RunRev team couldn't fit it in the schedule. But now that LiveCode is open source, I can do it for us all instead
Perhaps some clarification is in order for those who haven't a clue what this is about...
Fields have a property 'pageHeights' which helps to determine the page breaks when printing the field over multiple pages, taking into account the fixed line height property and the height of the individual blocks of text within the field.
Its output is a return-delimited list of integers.
Example:
Code: Select all
168
340
280
Therefore I'd like to add a 'pageRanges' property which maps these page breaks onto the exact character offsets.
Its output would be a return-and-comma delimited list of integers, where each line gives the offset of the first and last characters of the page.
Example:
Code: Select all
1,80
81,168
169,200
Code: Select all
function getPageHtmlText pSourceField, pPage
get line pPage of the pageRanges of fld pSourceField
put item 1 of it into tStartChar
put item 2 of it into tEndChar
return the htmlText of char tStartChar to tEndChar of fld pSourceField
end getPageHtmlText
So what's the next step to contribute this back?
Should I file an entry at quality.runrev.com first?
Or just issue a pull request for the team?
TIA,
Jan Schenkel.