1 Reply Latest reply on Dec 21, 2010 7:39 AM by C LAB

    AlivePDF and Scrollbar clipping

    C LAB

      I am exporting my Flex Charts into a PDF file using AlivePDF.  This is easy to do and works great, but there is a problem when the charts are placed inside a scroller container.  The only part that gets exported to the PDF is the content that is visible in the scroller window.  If don't use a scrollbar, the content is completely exported to the PDF.  If I remove the scrollbar during runtime, the content is still clipped.

       

      Is there a way to access the content that is not visible inside the scroller?

        • 1. Re: AlivePDF and Scrollbar clipping
          C LAB Level 1

          I figured this out by changing the scroller.viewport.height to the height of the content inside and setting the scroller.viewport.clipAndEnableScrolling=false.

           

           

          var tmpNum:int=scrBar.viewport.height;

          scrBar.viewport.clipAndEnableScrolling=false;

          scrBar.viewport.height=groupContentInsideScroller.height;

           

          //CREATE ALIVEPDF CODE GOES HERE (4 or 5 lines of simple code)

           

          //RESTORE VIEWPORT

          scrBar.viewport.height=tmpNum;
          scrBar.viewport.clipAndEnableScrolling=true;

           

           

          -------------------------------------------------------------------------------

           

          I have a new problem when the content inside the scroller is greater than 8192px though.  This is Flex's limit for BitmapData, so the PDF creation crashes when converting the groupContentInsideScroller to PDF.