getSelectedText() from flex
Posted: Wed Feb 13, 2008 5:21 am
Hi, I found your product while looking to render PDF's within flex, and with the SDK it looks great some personal projects of mine.
Just some quick questions:
From flex im trying to get the contents of selected text into a label for display. I'm having a problem in that the resulting string seems to be encoded in some way, text that is in bold is visible, but the rest when assigned to flexlabel.text shows up as squares.. just in case here is what i tried:
- set the onSelection event for the Print2FlashDoc component to a method,
- from the method called doc.getSelectedText(anothermethod)
- the signature for the callback method was anothermethod(result:String) (it wasn't documented that i had to do this..?)
- anothermethod then used the parameter result to set the text attribute of a flex label.
When running, the events were called ok, but the resulting text was not displayed correctly. Not sure how far i got, but trying typeof result parameter did echo string. I tried using a flex rich text component with the same results.
Any ideas on how to get the text from the selection correctly? Or decode the output into plain text? I dont mind loosing any formatting.
Also
- Noticed the performance of the resulting swf's is not so good for large pdf's (say 90 pages plus) the mouse skipping frames when over the pages of these large docs, any tips, as id like to display documents with a few hundred pages.
- If i were to register the pro version, does that cover all future updates, or just to a specific version?
Thanks for any help.
Just some quick questions:
From flex im trying to get the contents of selected text into a label for display. I'm having a problem in that the resulting string seems to be encoded in some way, text that is in bold is visible, but the rest when assigned to flexlabel.text shows up as squares.. just in case here is what i tried:
- set the onSelection event for the Print2FlashDoc component to a method,
- from the method called doc.getSelectedText(anothermethod)
- the signature for the callback method was anothermethod(result:String) (it wasn't documented that i had to do this..?)
- anothermethod then used the parameter result to set the text attribute of a flex label.
When running, the events were called ok, but the resulting text was not displayed correctly. Not sure how far i got, but trying typeof result parameter did echo string. I tried using a flex rich text component with the same results.
Any ideas on how to get the text from the selection correctly? Or decode the output into plain text? I dont mind loosing any formatting.
Also
- Noticed the performance of the resulting swf's is not so good for large pdf's (say 90 pages plus) the mouse skipping frames when over the pages of these large docs, any tips, as id like to display documents with a few hundred pages.
- If i were to register the pro version, does that cover all future updates, or just to a specific version?
Thanks for any help.