Skip to main content
October 6, 2009
Question

TextLine

  • October 6, 2009
  • 1 reply
  • 473 views

Hi,

I have a query about textlines in TextFlow.

My requirement is I need to remove certain lines (eg. last 2 lines) from the TextFlow while exporting it. Also I need to find whether a line is outside the compositionSize in height.

How I can achieve this?

Thanks,

Rajesh

This topic has been closed for replies.

1 reply

Adobe Employee
October 6, 2009

Unfortunately there is no way to export part of a TextFlow. But you could delete the last two lines, do your export, and then add them back in. If the last two lines were to always form, for instance, the last paragraph, you could also delete the last paragraph from the XML that is exported; that would only work well if they were to form a single element that is easy to find in the exported XML using E4X. I'd suggest trying the deletion method, unless you have a compelling reason to go the other way.

How to figure out the height of a line. This is something that happens as a result of composition in TLF. TLF will compose the text, and based on that, it will either fit in the compositionHeight or not. You can compose without updating the screen, see IFlowComposer composeToController, for example. You could compose the text, then check the controller to see if the composed line fit inside it. controller.absoluteStart + controller.textLength is the last character that fit within the compositionHeight and width.


Hope this helps,

- robin