Text Highlighting issue with TextSnapshot object

Hi,
I am working with a digital book application. I make use of swf loader to load swf pages created from pdf. I use TextSnapsot to draw inline text highlight on the pages. The highlight is thoroughly retained on the respective pages throughout the session and later it can be updated/deleted without any problem. Everything was working great till I made the following changes in the swf loading approach to enable page caching:
I am now loading swf loader object into application memory and while doing jumping from one page to other page I am just copying the content of the next page to the current swf loader which is on the display to the user. There are two sets of swf loaders - one for displaying the page and other to cache the next/previous page(s). On the caching side, I load the swf into application memory and after getting it loaded I pick all the contents of the loaded swf page (the children of it's movie clip) into an array collection. While changing the page I copy the cached content into the swf loader's movie clip which is displaying the page.
Now when I highlight on the page on display and navigate back/forth from the page and comeback again to the page where I did the highlighting: It shows the highlight I did. But as soon as I try to draw another highlight on that page, the previous highlight is instantly disappears from the page.
I suspect that the Textsnapshot object which draws highlight while navigating (to the target display page) is different from the one which redraws/update the highlight on the same page next time. Although the Textsnapshot object id for both the objects is same.
Here are some code snippet:
For copying the content from the swf loader object cached in application memory:
        private function copyPageContent():void
            var contentCollection:ArrayCollection = new ArrayCollection();
            _pageContentVO = new PageContentVO();
            _pageContentVO.contentHeight = MovieClip(_swfPageLoader.content).height;
            _pageContentVO.contentWidth = MovieClip(_swfPageLoader.content).width;
            var count:int = MovieClip(_swfPageLoader.content).numChildren;               
            for(var i:int=0;i<count;i++)
                var dispObject:DisplayObject = MovieClip(_swfPageLoader.content).removeChildAt(0);               
                contentCollection.addItem(dispObject);
            _pageContentVO.pageContentCollection = contentCollection;
            _swfPageLoader = null;
For copying the content to the swf loader which is displaying the page:
        private function copyContent(pageContentVo:PageContentVO):void
            for(var i:int = 0;i<pageContentVo.pageContentCollection.length;i++)
                var dispObject:DisplayObject = pageContentVo.pageContentCollection.getItemAt(i) as DisplayObject;
                MovieClip(this.content).addChild(dispObject);
            this.content.height = this.height;
            this.content.width = this.width;
after this I dispatch swf loader's complete manually and in the handler of that event I take the text snap shot object.(highlightManager.as)
Code I use to draw highlight manually(using mouse drag on the page).
       public function setHighlight():void
            removeAll();
            if(_textSnapShot!=null && _textSnapShot.getText(0,_textSnapShot.charCount)!="")
                if(_isCoveredTextSelectedAtAnyInstance)
                    _textSnapShot.setSelected(_beginIndex,_endIndex+1,false); //this is the global variable to the class
                else
                    _textSnapShot.setSelectColor(0xfff100);
                    _textSnapShot.setSelected(_beginIndex,_endIndex+1,true);
                if(saveHighlight)
                    countHighlightedSegments();
Code I use to redraw previously drawn highlight when I return to the page:
       public function showHighlights(textSnapShot:TextSnapshot,currentPageNum:int):void
            if(currentPageNum >= 0)
                textSnapShot.setSelected(0,textSnapShot.charCount,false);
                var pageVO:PageVO = _model.eBookVO.eBookPagesVO.getItemAt(currentPageNum) as PageVO;
                var objColl:ArrayCollection = new ArrayCollection();
                objColl.source = pageVO.highLightSelection;
                for(var i:int=0;i<objColl.length;i++)
                    var highlightVO:HighlightVO = new HighlightVO();
                    highlightVO.beginIndex = objColl.getItemAt(i).beginIndex;
                    highlightVO.endIndex = objColl.getItemAt(i).endIndex;
                    setHighlightedSegment(textSnapShot,highlightVO.beginIndex,highlightVO.endIndex);
        private function setHighlightedSegment(textSnapShot:TextSnapshot,beginIndex:int,endIndex:int):void
            textSnapShot.setSelectColor(0xfff100);
            textSnapShot.setSelected(beginIndex,endIndex,true);
Looking forward to your support to resolve this issue.
Regards,
JS

Hi, I've resolved this issue.
It was a textSnapShot GC issue.
I just added the textsnapshot object into an array to avoid GC and that resolved my issue.

Similar Messages

  • Performance issue with Business Objects Java JRC API in CRXI R2 version

    A report is developed using java JRC API in CR XI release 2. When I generate the report in the designer, it took less than 5 seconds to display the results in crystal report viewer inside the designer. But in the QA environment, when I generate the same report from the application, it takes almost 1 to 1.5 minutes to display the same results in PDF. I also noticed that if the dataset contains bigger volume of data, then the reports are taking even longer almost 15 to 20 minutes.
    While generating the report from the application, I noticed that most of time is taken during the execution of the com.crystaldecisions.report.web.viewer.ReportExportControl Object method as shown in following line of code
    exportControl.processHttpRequest(request, response, context, null)
    We thought the delay in exporting the report to PDF might be the layout of the report and data conversion to PDF for such a bigger volume of data.
    Then we investigated the issue and experimented quickly to generate the same report with same result set data from the application using XML, XSL and converted the output XSL-FO to PDF using Apache FOP (Formatting Objects Processor) implementation. The time taken to export the report to PDF is less than 6 seconds. By doing this experiment, it is proved that the issue is not with conversion of data to PDF but it is the performance problem with Business Objects Java JRC API in CR XI R2.
    In this regard, I searched for the above issue in the SAP community Network Forums -> Crystal Reports and Xcelsius -> Java Development -> Crystal Reports. But I did not find any answers or solutions for this kind of issue in the forums.
    Any suggestion, hint in this matter is very much appreciated.

    Ted, The setReportAppServer problem is resolved. Now I could able to generate the report with hardcoded values in the SQLs in just 6 seconds where as the same report was generated in CRXI R2 in 1 minute 15 seconds as mentioned in the earlier message.
    But, our exisiting application passes the parameter values to the SQLs embedded in the report. For some reason the parameters are not being passed to the report and the report displays only the labels without data.
    As per the crj 12 samples codes, the code is written as shown below.
    1. Created ReportClient Document
    2. SetReportAppServer
    3. Open the report
    4. Getting DatabaseController and switching the database connection at runtime
    5. Then setting the parameters as detailed below
    ParameteFields parameterFieldController = reportClientDoc.getDataDefController().getParameterFieldController();
    parameterFieldController.setCurrentValue("", "paramname",paramvalue);
    parameterFieldController.setCurrentValue("", "paramname",paramavalue);
    byteArrayInputStream = (ByteArrayInputStream)reportClientDoc.getPrintOutputController().export(ReportExportFormat.PDF); 
    6. Streaming the report to the browser
    Why the parematers are not being passed to the report?  Do I need to follow the order of setting these parameters?  Did I miss any line of code for setting Params using  crj 12?
    Any help in this regard would be greatly appreciated.

  • Weblogic 10.3.0 issues with remote object calls.

    All:
    I was wondering if anyone has experienced any issues with Weblogic 10.3.0 dropping initial remote object calls over AMF Secure Channel. Here are the issues we are experiencing.
    1.     FLEX applications fail consistently on the first remote object call made across the AMF Secure Channel. Resulting in the request not returning from the application server; which has had varying affects on the different applications including missing data, application freeze and general degrading of the user experience.
    2.     FLEX applications require a browser/application refresh once the application has been inactive for a certain period of time. In our experiences the behavior occurs after 30 minutes of inactivity.
    I've deployed this same code to Weblogic 10.3.3 and the behaviors go away. Are there any patches to 10.3.0 that might take care of this issue that we are not aware of?
    Thanks for you help,
    Mike

    Hello,
    I found the problem. But I needed change the target of all my datasources until discover that one of my datasource didn´t answer and no errors was trigged.
    My server was waiting this datasource, and not get started.

  • Text display issues with htmlText, Embedded Font

    Hey All,
    I'm having an issue with the display of my hyperlinks in a
    textfield that is using embedded fonts. It offsets the hyperlinks
    to the left along the line they are on and the underline doesn't
    stretch all the way under the text field. The text display normally
    when I don't embed the font. For some reason I think this might
    have to do with the embedded character range so I opened it up.
    Does anyone know if this range is enough or if there are special
    characters flash uses that need to be embedded for their width even
    though they arn't displayed.
    Embedded range:
    [Embed(source='MyriadPro-Regular.otf', fontName='Myriad Pro',
    unicodeRange='U+0000-U+00fe')]
    Here's a link to the related code:
    http://pcpnew.privatepaste.com/a7eKaAuCTt

    Any ideas?

  • Mx.controls.Text zoom issue with wrapped text. Is this a bug?

    We have created a diagram drawing tool in Flex, but we are having a serious issue with zooming. Everything zoom fine expect the Text control if it contains wrapped text. At certain zoom levels, some of the text seems to disappear (usually text at the end). I have tried everything, embedding fonts, turning anti-aliasing on and off, setting anti-aliasing to normal or advanced, but it doesn't seem to fix the problem. Is this is a known bug?
    If you check out the pictures (see attachments), you will see that the part of the text ('34') disappears at a certain zoom level.
    There is another blog who suggest to embed the font and set the antiAliasType to ‘animation’ (http://www.mehtanirav.com/2008/08/20/zooming-text-area-in-flex-messes-up-word-wrap-bug%20), but this doesn't seem to work for me either. I don't know if I am doing this correctly though, but I embedded a font and called text.setStyle("fontAntiAliasType","animation"). However, 'animation' is not one of the  AntiAliasType contants. According to the official documentation, the AntiAliasType constants are 'advanced' or 'normal'.
    Any help will be appreciated.

    Try this:
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.text.*;
    class textpaneColor extends JFrame {
       JTextPane tp = new JTextPane();
       JButton button = new JButton("color");
       public static void main(String args[]) {
          textpaneColor obj = new textpaneColor();
          obj.showMe();
       void showMe() {
          button.addActionListener(new buttonListener());
          setSize(200,200);
          getContentPane().setLayout(new BorderLayout());
          getContentPane().add(tp, BorderLayout.CENTER);
          getContentPane().add(button, BorderLayout.SOUTH);
          setVisible(true);
       class buttonListener implements ActionListener {
          public void actionPerformed(ActionEvent e) {
             SimpleAttributeSet set=new SimpleAttributeSet();
             StyleConstants.setForeground(set,Color.BLUE);
             StyledDocument doc=tp.getStyledDocument();
             doc.setParagraphAttributes(0,999999,set,true);
    };o)
    V.V.

  • Anybody have this TEXT TOOL ISSUE with CS5???

    i'm on a pc that meets all system requirements for cs5 photoshop and notice that whenever i use the text tool and try to increase/decrease the size, leading or anything, i can not see my results in real time, i have to manually CLICK outside of the text area or in the gray area of the document for photoshop to actually make the change, almost like when you use the transform tool and resize things but have to *commit* the changes, so imagine if you were doing that only you couldnt actually see what size you were resizing your object to.
    someone else in the office seems to be having this exact same issue as well. it's like closing your eyes to do your work and then opening them back up once you *think* you have the right font size or leading.
    any help would be much appreciated!!!!!

    If it's a "Mobility" card then chances are it's in a laptop, and many laptop manufacturers are required to be the source for driver updates.  You might have
    to check with the computer maker.
    If there's not a driver update for it, it's possible you could try downgrading the driver to an older version if one can be found.
    What operating system are you running (XP, Vista, 7, 32 or 64 bit)?
    I see they have a new release for your card for Vista and Windows 7 32 bit, for example, here:  http://support.amd.com/us/gpudownload/windows/Pages/radeonmob_win7-32.aspx
    -Noel

  • Issue with Info Object Transport after changing Data Type

    Hi Experts,
    We have a DSO which is running past 5 years. And recently(3 days back) we added new fields into that DSO. Delta loaded for last three days and new info object (Say XXX) data populated into DSO.
    Now the problem is, We identified that, info object data type is not correct. We used data type NUMC  instead of CHAR.So Character information is missing for that field.
    Example:
    Data from ECC: ABC123
    Data Loaded to DSO: 123 (Missed character ABC)
    So we deleted data from DSO and changed the info object data type in Development system.
    And also I have deleted only last three days delta records from DSO and transported my info object to Production. But its giving error as: Info object contains data in DSO".
    But that info object field is empty in DSO. I have already deleted last three days delta.
    Do I need to Delete all 5 years data from DSO to change the data type of recently added new info object ?
    Please give me your solutions and ideas to solve this issue.
    Thank you,
    Best Regards,
    Santhosh

    Hi Raman,
    Thank you for your answer.
    When I changed the data type of info object in Dev, I deleted the content of DSO. And same thing transported to QA as well. Before importing changed info object, I just deleted the content of DSO from QA. So transport done successfully QA.
    But in Production we have a history of past 5 years. So I cant delete all contents of DSO.
    So just deleted only the delta request's which contains data for that info object(3 days back, we moved that info object(NUMC data type) to production,So last 3 days delta only loaded for that info object). And tried to transport it. But it was failed. I am sure we need to drop all data from DSO, if I am interested to go with same info object.
    I have some comments on your first approach,
    1. If we delete info objects from Dev DSO and transport to Production will give transport failure, Why because, my previous transports errors clearly saying that info object contains data in DSO . So it wont allow to remove that info object from DSO.
    2.We are using same info object technical name in BO Data federator also. So if we change add new info objects again we need to make changes with BO as well. I am thinking this point as my last option if i cant find any other solution.
    Thank you.
    Best Regards.

  • Issue with authorization objects

    Hi,
    We are running on ECC 6 . There is an issue while adding t-codes to a role.
    When we add a transaction code in the Menu tab, for eg, a Z transaction code, it throws up a whole lot of open authorization objects under the authorization tab (open authorizations under FI, MM, so on). The open values proposed are all the default values in SU24. This happens even if we use the 'Read old status and merge with the new'. Our check indicator maintenance for all t-codes seem to be fine. Pls advise.
    Cheers!!

    > The default values (SU24 values) are once again populated if they were not maintained during the earlier maintenance.
    They are populated again if they were deleted during the earlier maintenance or are in a changed status of the original authorization where new values in SU24 are proposing something different.
    That is why you should never delete standard or maintained authorizations and try to avoid the copy & change strategy by maintaining SU24 to meet your needs.
    It shounds like SU24 is not as "fine" as you have stated before hand.
    Cheers,
    Julius

  • IS-U: Migration- Issue with DEVICE object using EMIGALL

    Hello Friends,
    I need a quick help. The issue is here below.
    I am using the object DEVICE to create Device/Equipment. I could able to create an Equipment however I found that in EQUI table the field SERNR is not updated.  Actually this field should have the value of EQUNR.
    I had tried many times wih differenct possible options but this field is empty in all the trials. I am also using the auto structure CONTR and its sub strucutures COMMIT, UPDATE, INDIV, CONV filling with  'X'   but the result is only this field SERNR is not updated in the table EQUI.
    Without this field SERNR being field I cannot perform Device Installation (Full/Technical/Billing).
    Please share your ideas.
    Thanks in Advance,
    Vijay.

    Hi Vijay
    That's possible...
    I assume transaction IQ01 and EMIGALL are using the same function EQUIPMENT_INSERT.
    If NEW_VEQUI-EQUNR contains already a number, the function does not get a new number from the number range object, for example with external numbering. In case there's no EQUNR given, a new number is taken from the number range object, internal numbering.
    If no SERNR is provided when calling EQUIPMENT_INSERT, there won't be a SERNR in EQUI. Just check if IQ01 provides the serial number when calling EQUIPMENT_INSERT.
    This means another possible solution is to get a new number for EQUNR in EMIGALL and populate EQUNR and SERNR before calling the service function module ISU_M_EQUI_INSERT. Call function module NUMBER_GET_NEXT for object EQUIP_NR.
    This can be done on field level by setting the Processing Type to 4 = Rule (check which of the two fields comes first - EQUNR or SERNR - to assign the number from NUMBER_GET_NEXT and copy the value for the second field) or via events see menu item Utilities: Event, when you're in the object maintenance screen.
    Yep
    Jürgen

  • Hi Experts, I have small issue with Mime object in webdynpro component?

    Issue: i have imported mime object with some changes on existing mime object, But this is not reflecting it was displaying old one only,New changes are not reflecting.
    Requirement : We are creating buttons with some CSS style and that image type .PNG and that image we are importing into web dynpro component as a Mime object , This same image we are creating for defferenet languages(EX : image name : Searcch_EN.png , Search_DE.png), this images we are binding the button image source property . and we are calling this image through the code.
    Now problem : I want change one image Ex : Sumbit_EN.png . i need to change this button i image like " SUBMIT_EN.png". So i have created this image as per requirement and i have imported into mime object. But it was not reflecting.
    Please Help me on this...
    Regards,
    Venugopal.P

    Hi Venu,
    You need to clear the cache of mime object to see the changes done.
    Please follow the below steps
         Right click on mim object or your image
    Choose option "Expiration Time client cache"  from menu
    Check the individual expiry date check box and un-check the Expiry active as below
    Note: you can do it for individual imange or for all mimes in a component
    Hope this helps you.
    Regards,
    Rama

  • Colour (possibly profile) issues with certain objects

    Hi,
    I'm trying to put together my folio but have run into a frustrating issue.
    As the file is a web PDF, it's obviously RGB (sRGB to be specific). All of my swatches have RGB values, all of my links have embedded Adobe RGB (1998) or sRGB profiles.
    The main issue is, a link on one page (PNG-24) shows correct colours, while on another it seems to be bluer in shadow tones. I found that what's causing it is any of my other objects that have blending modes activated:
    Two different rectangles with RGB swatches, Multiply, 62% Transparency
    Two identical JPG textures. One on background layer and one a top layer which is set to Color Burn
    Once all of these are removed, the effected object returns to its correct tones, but if even one of the above objects returns anywhere to the spread, the colour goes off again. Similarly, if any of these objects are taken to another page, other swatches used (say a solid rectangle) are effected.
    It's driving me insane and I've tried everything I know. Any ideas? I have a feeling this may have something to do with blending modes, but I just don't understand why it would.

    Yep, that was it
    I knew it had to be something along those lines, but I honestly expected that sort of thing to be within Color Settings; maybe I should have just looked two menu items up
    Thanks for the help. Seems it's getting harder and harder to find what you're looking for on Google these days when all you have is vague keywords... Yay SEO (sarcasm)

  • Issue with available object

    Hi,
    I have a WEBi report built on BEx query using BICS connection. The issue which am currently facing is if i add the not-compounded filed from the available objects to the grid, then if i refresh the report then the results are never getting finished its just running.
    The issue is identified only with that not-compounded field which is tied with customer Infobject in BW.
    Any idea?
    thanks,
    Vinay

    Hi,
    I have a WEBi report built on BEx query using BICS connection. The issue which am currently facing is if i add the not-compounded filed from the available objects to the grid, then if i refresh the report then the results are never getting finished its just running.
    The issue is identified only with that not-compounded field which is tied with customer Infobject in BW.
    Any idea?
    thanks,
    Vinay

  • SAP BW 7.31 - Transport Issue with Generated Objects

    Team,
    We have two landscapes, Business As Usual (BAU on SAP BW 7.01SP8) and Project Landscape (on SAP BW 7.31 SP10). The Project landscape Development system is a copy of BAU landscape development System and got upgraded to 7.31. Same case with QA System also.
    Issue: We are trying to collect InfoProviders (which are created in 7.01 SP8) in to a transport request in 7.31 System, it’s not allowing to collect in a transport request. Getting the below message.
    Object CUBE 0FIGL_R10 is generated and cannot be transported
    Message no. RSO887
    Diagnosis
    The object CUBE 0FIGL_R10 is generated (for example, for a semantically partitioned object) and cannot be transported.
    System Response
    The object is not written in a transport request.
    Procedure
    You do not need to do anything. The main object (the semantically partitioned object) simply needs to be transported. Here the object CUBE 0FIGL_R10is automatically created in the target system.
    Could you please let me know if you come across the above situation and solution.
    Warm Regards,
    Surya

    Hi,
    you are not yet collected the cube CUBE 0FIGL_R10.
    go to RSA1 -> select the transport connection -> select the object types -> select the info cube -> expand the node -> double click on the select object -> give the cube name  CUBE 0FIGL_R10 -> select the transfer selection.
    collect the dependent objects like info package, ds, dso, cube, dtp, transformations.
    now click on the truck symbol form standard tool bar.
    now it will collect.
    then do transport to target system.
    Thanks,
    Phani.

  • Text Box issues with a poster template

    This sounds stupid and all but, I am trying to type lowercase in a text box in one of the poster templates and it will only type caps. I cannot seem to find anything to clikc or unclick. It seems like this shouldn't be so difficult.

    Hi there,
    I too am having problems with the text box. I have a line at the beginning of each sentence, I can't seem to get rid of. Now this problem does not exist on the first page, but any other pages I try to edit the text on I get this line. I've looked everywhere, but can't seem to find the solution. Any help out ther? Or if you need further clarification to the issue, just let me know!
    Bryan

  • CC 9.2 (trial) - issues with rasterised objects in ePUB

    hi all
    We currently use CS5.5 to create our ePUBs and that works well for us, now we know and work around its quirks. I'm playing with the demo of CC (9.2) since I am interested in the pop-up footnotes.
    As a test I have opened up some old docs I had prepared in CS5.5 into CC. They contain images with some text on top which we have grouped and (in CS5.5) set to be rasterised and sided "Relative to Page Width". This means they fill the width of the page, even if the device is rotated/software window resized. Which I what I want to happen. I output an ePUB from CC and these images now are way too big and are not being sized to fit the screen. Looking in the CS5.5 code ID was adding width=100% to the img tag but CC is not. When I check the Object Export Options the size option is now "Relative to Text Flow" (not "Relative to Page Width").
    What does "Relative to Text Flow" actually mean? I can't find anything about it in the help files. I hate Adobe help files these days - all I can find is a page which claims to cover CS5.5, CS6 and CC but how can that be if CC is different in this respect from CS5.5 & CS6! 
    Anyone know how I can get ID to behave as it did previously? I know I can fix it in the code but obviously the less I do of that the better.
    thanks,
    Iain

    I don't have time to research an answer to your question but I can give you a link to changes in InDesign CS6, CC 9.0 and CC 9.2. There have been a ton of changes.
    Here is a link to changes in InDesign CS6:
    https://helpx.adobe.com/indesign/using/export-content-epub-cs6.html
    Here are links to changes in InDesign CC 9.0:
    https://helpx.adobe.com/indesign/using/epub-enhancements-indesign-cc.html
    Here are more changes in InDesign CC 9.2:
    InDesign_EPUB_Changes_CC_9.0_to_9.2.pdf

Maybe you are looking for

  • ITunes crashes on launch for all but one user

    iTunes works fine for me (main user), but it crashes for any other user. I've tried deleting and creating new accounts, but no matter what I do iTunes crashes on launch for any user but me. Here's the crash report: Date/Time: 2007-08-12 13:09:51.731

  • "file error: 1 file(s) recognized, 0 access denied, 1 unknown."

    I have raw footage that was created as a high definition mpg on a PC but I can't open it on my mac. I've tried everything..Perian, the Quicktime mpeg-2 upgrade, handbrake...but nothing will let this play on my computer. When I try to play it on Quick

  • Trapping in shell export and import errors

    I'am exporting a table with a unix shell and reimporting data to another database . Both database are ORACLE 11g How i can handle errors during export or import ? Thanks

  • SAP Netweaver trial version from internet

    Gurus - I have finally managed to install the trail version of SAP 7.0 in my home PC running on XP Home I am only able to access the system from my home network.  When I am outside of the network am not able to access it.  I think I have to configure

  • Transporting BRFPlus Objects

    We are going to use BFRPlus (NW 702)  in SAP GRC access control develoment for conditional checks. We want to limit customers can make to delivered application ONLY in giving them ability to add modify/content to expressions or at max add more rules