Fit To Box and Determine if Doesn't Fit In Box

I hope the subject line says it all.
First step - how can I determine if the TexFlow that needs to get rendered fits into the target area? Is there a boolean of some sort or do i have to check the overflow length?
Once I've done that is there any easy method to get the content that did not fit?
More complex - is there a way to force the flow to fit within a container by some means? Or is this too complicated of a situation requring iterating through all flows and resizing, adjusting leading/tracking, etc. until it fits?
thanks for any advice!

It depends a little on how you have set up the container. For your purposes, it might be easiest to turn scrolling off. You can do this by setting the ContainerController's verticalScrollPolicy and horizontalScrollPolicy to "off". Once you have done this, and forced a recompose (you can do this by calling the flowComposer's updateAllControllers() method), then you can see how much text fit into the container by looking at the container's textLength property. If controller.absoluteStart + controller.textLength < textFlow.textLength, then there was more text than fit in the container, and you have overset text.
This will also, by the way, tell you exactly which text did not fit, and how much there is, which is very useful if you intend to do any copyfitting. So, the text that didn't fit is the text starting at controller.absoluteStart + controller.textLength and going up to the end of the TextFlow (textFlow.textLength).
Forcing the flow to fit is more complex. There are some simple truncation methods that work on the TextLineFactory classes to remove text. You can define how many lines you want, etc. If you want to be able to see the whole text, then it gets more complicated. In that case, you may need to do some osrt of iterative process where you apply things such as scaling the text, applying tracking, etc. according some algorithm that gets reasonable results for what you're trying to do. In this case, I would suggest using the FlowComposer's compose methods to force composition up to date, then see how much text fits at each stage before applying the next transformation. That will look better and be slightly faster than calling updateAllContainers each time.
Hope this helps,
- robin

Similar Messages

  • I went to iCloud and my mail doesn't recognize my password but even worst my iTunes does not want to open because it says my library is blocked somewhere on a hard disk where I  have no access ...

    I went to iCloud and my mail doesn't recognize my password but even worst my iTunes does not want to open because it says my library is blocked somewhere on a hard disk where I  have no access ...
    HELP HELP

    To confirm, your existing mail client isn't communicating with your existing and remote mail services at Dreamhost? Which mail client are you using (Apple mail?), and how is mail on the client set up?
    It would initially seem that your client is still referencing the server, either for its inbound or outbound mail. (And I'm not sure how unplugging the server helps here, unless there's some sort of a configuration issue, or a duplicate network address or such.) This would usually be something within the configuration of the mail client.
    The Mac OS X Server is significantly easier than the many other servers and server operating systems I've dealt with over the years, but it requires reading the manuals and/or some knowledge of networking and of server environments.
    Small shops and home folks without the time or inclination to "spin up" on these server areas can be well-served with some help initially configuring the server. Servers are different from clients. Stuff that you're implicitly used to using when you're running a client -- the DHCP server, for instance -- are what the servers provide you with.
    As for Mac OS X Server and particularly if you head outside of the default settings and sequences and off into the customizations, which is what has happened here, you might want to engage some assistance. Not just for the direct and obvious initial set-up sequence, but also for getting you set-up and started with backups and other such tasks. Before you get too deep in here and get too much underway and too much saved on your disks, do seriously consider getting somebody in to help set this box up for you.
    Mac OS X Server is not "no IT", but it is rather closer to "less IT" than most. Particularly once you get it configured and running.

  • In Mail, Reply To and Subject area doesn't appear

    In Mail, Reply To and Subject area doesn't appear on an opened email.

    Hi
    Go to Mail / Preferences
    on the Viewing tab - Show header detail  - drop down box
    Select whatever suits you. - try default
    /Dennis

  • I imported videos from photo into iMovie when I set up iMovie (obvious mistake) and now iMovie doesn't work properly, nor can I move specific videos into a folder where I want them. How do I fix this?

    I imported videos from photo into iMovie when I set up iMovie (obvious mistake) and now iMovie doesn't work properly, nor can I move specific videos into a folder where I want them. How do I fix this? I even tried deleting iMovie, bought a new copy and installed it, but the folder "iPhoto Videos" is still there and I can't get new clips loaded to iMovie, especially where I want them. Please help.

    The iPhoto Videos do occasionally have problems. I've seen a lot of people write messages to this Discussion group describing similar problems. The only thing that seems to get around this problem is to pull the video clips out of iPhoto then import them directly into iMovie. Once the troubles with iPhoto Videos starts, I haven't yet seen anyone write back with something that they did to fix it.
    The most difficult part of doing this is the movies in iPhoto might be a little difficult to track down. But you can create a smart alum that does that for you. Go to iPhoto > File Menu > New Smart Album:
    Set the first pulldown menu to keyword, second to contains, then in the last box type Movie with a capital 'M'. Then click OK. This smart album more or less does as search of the whole iPhoto Library and only displays items that match your search tearm of "Movie" exactly. In that smart album then you can find the original Movies you want to move out of iPhoto and into iMovie, <CTRL> click on the Movie clip, then choose Reveal in Finder. That will jump you out of iPhoto temporarily and into the iPhoto Library folder. From there you can move that movie file to the desktop. Move all the clips you want, once they're all collected up go to iMovie and go to the File Menu > Import Files. Then point it to the desktop where you moved your video clips.
    This will put all those videos into an Event folder in iMovie and bypass iPhoto Videos altogether.

  • Reading a PWM and determining pulse width using a digital input pin on a NI 9425 DAQ

    Hello!
    I have been experimenting with LabVIEW for about a week now and have run into a brick wall.  I have found a fairly effective way of reading a PWM signal through an analog input and determining the pulse width.  However, it is becoming necessary for this project to do this same thing using a digital input.  I've been playing with this for about a day now and am not making much headway.
    For reference, I will be using a 9524 device
    Any ideas?

    Also, if it is helpful at all, I've attached two vi's.  One, functions just as I need it to - but it doesn't involve data aquisition.  The second should be similar to the first, but is non functional - I keep getting an error that my amplitude is zero.
    Any thoughts?
    Attachments:
    DigitalEdgeDetectionKnown.vi ‏47 KB
    DigitalEdgeDetectionRead.vi ‏148 KB

  • Deploy the larger rulebases and determinations-server to WSL 10.3.5 slow

    On : 10.1.0.27 version, Oracle Policy Automation
    Determination Server
    WLS managed server
    ACTUAL BEHAVIOR
    Deploy the larger rulebases and determinations-server to WSL 10.3.5
    It takes around 20 minutes to deploy.
    Often the WLS times out during the deployment and we find the only way of getting the determinations-server to run again is to restart the WLS managed server.
    EXPECTED BEHAVIOR
    No time or delay to deploy.
    Business impact
    On the way deploy rule base WLS server sometimes timeout.

    The customer improved as follows solution.
    The customer have changed the way deploy the rulebases and this has reduced the deployment time dramatically.
    They have 3 rulebases and one of Billing is the largest by far.
    They have split the billing into an out of the box determinations-server and are deploying it as a war.
    The whole process is now acceptable.
    === ODM Data Collection ===
    <Info> <WebService> <c17ssit1.lab.gov> <opasit1_server1> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <bfeae85a12c63a65:-b8294b1:13ad04153dd:-8000-0000000000000003> <1352114445944> <BEA-220103> <Async web service support is not fully configured. The async response web service /AsyncResponseServiceHttps for this server was not fully deployed because the JMS reliability queue was not defined/deployed: weblogic.wsee.DefaultQueue. The server will periodically retry completing the deploy for the service. This message can usually be ignored unless there are async web service applications. To completely disable async web service support, thus avoiding this message, set -Dweblogic.wsee.skip.async.response=true.>
    <Warning> <Socket> <c17ssit1.lab.gov> <opasit1_server1> <ExecuteThread: '0' for queue: 'weblogic.socket.Muxer'> <<WLS Kernel>> <> <> <1352204469466> <BEA-000450> <Socket 328 internal data record unavailable (probable closure due idle timeout), event received 0>
    <Warning> <Socket> <c17ssit1.lab.gov> <opasit1_server1> <ExecuteThread: '2' for queue: 'weblogic.socket.Muxer'> <<WLS Kernel>> <> <> <1352204534404> <BEA-000450> <Socket 342 internal data record unavailable (probable closure due idle timeout), event received -32>

  • After loading the new OS now my songs do not play correctly. Titles are wrong on songs and it just doesn't play certain songs in random play or even if you select them individually. What's up? Kind of frustrating!!!

    After loading the new OS my songs do not play correctly, is anyone else having this issue? Titles are wrong on songs and it just doesn’t play certain songs in random play or even if you select them individually. What’s up? Kind of frustrating!!!

    I had the same issue.  In fact I posted it yesterday, but didn't get any replies.  I physically synched my phone to PC iTunes.  on the PC, under the phone/music tab, I unchecked the synch music box and then the apply button to remove all of the music from my phone.  Then once that synch finished, I went back and selected all music, and synch music and apply to put it back on to the phone.  So far, I haven't had an issue again, but I also haven't listened very long.  Hope this helps!

  • I have iPhone 4S with new ios7, and panorama wallpaper doesn't work ! It let me shoose it, but it's not work, why?

    I have iPhone 4S with new ios7, and panorama wallpaper doesn't work ! It let me shoose it, but it's not work, why?

    These prices are for the U.S.
    Out-of-Warranty Service
    If you own an iPhone that is ineligible for warranty service but is eligible for Out-of-Warranty (OOW) Service, Apple will service your iPhone for the Out-of-Warranty Service fee listed below.
    iPhone model          Out-of-Warranty Service
    iPhone 5          $229
    iPhone 4S          $199
    iPhone 4, iPhone 3GS,
    iPhone 3G, Original iPhone          $149
    A $6.95 shipping fee will be added if service is arranged through Apple and requires shipping. All fees are in U.S. dollars and are subject to local tax.
    When setting up out-of-warranty service, Apple will request credit card pre-authorization for the maximum service fee listed above.  This amount will be deducted from your credit limit. The final service fee we charge will be determined during testing and may be less than the service fee listed above.
    Certain damage is ineligible for out-of-warranty service, including catastrophic damage, such as the device separating into multiple pieces, and inoperability caused by unauthorized modifications. However, an iPhone that has failed due to contact with liquid may be eligible for out-of-warranty service.
    Apple reserves the right to determine whether or not your iPhone is eligible for Out-of-Warranty service. iPhones that are repaired or replaced have a 90-day limited hardware warranty or assume the remainder of your standard warranty or AppleCare service contract coverage, whichever is longer. Please see Apple's Repair Terms And Conditions for further details.

  • Delete and close gap doesn't

    When I delete a clip the gap does not close.  I held the shift ctrl key down one time and now the ripple effect seems to be off.
    Michael

    It's audio clips.  My audio is separate from the video so that solves that problem. I managed to do a reasonable facsimilie of the Mary Tyler Moore credits for our parody video.It's not perfect, but it does the job.   Michael
    Date: Sat, 29 Oct 2011 17:25:45 -0600
    From: [email protected]
    To: [email protected]
    Subject: delete and close gap doesn't
        Re: delete and close gap doesn't
        created by Bill Hunt in Premiere Elements - View the full discussion
    Michael, The most common reason that gaps do not close, is that there is either an Audio Clip that "covers" the gap, or perhaps Video that does. Is either the case in your instance? Good luck, Hunt
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/3997474#3997474
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/3997474#3997474. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Premiere Elements by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • TS1363 i downloaded the the itunes and now it doesn't reconize my ipod

    downloaded new itunes version and now it doesn't reconize m ipod

    1. Plug in your iPod. If iTunes still can't recognize it, then in iTunes in the top left corner click help> run diagnostics. On the box that comes up, check the last two things. Click next and it should identify your iPod.
    2. Click on your windows start menu. Type in "services". Click on it and when it pops up, on the bottom of it click on "standard". Now Scroll down to find "Apple Mobile Device" Right click it when you see it and click on "Start". When it has started, close iTunes and replug in your iPod and it should show up.
    3. Check the USB cable
    4. Verify that Apple Mobile Device Support is installed
    5. Restart the Apple Mobile Device Service and verify that the Apple Mobile Device USB Driver is installed.
    6. If you just want to add some photos, songs and movies from computer to your devices, you can use an iTunes alternative to do the job.
    7. Check for third-party software conflicts.

  • I downloaded a new version of firefox. It said it had problems with my norton toolbar and now it doesn't feature it in the window. I'm not that comp savvy. How do I either get the Norton toolbar up or go back to the old firefox? Thank you.

    I downloaded a new version of firefox. It said it had problems with my norton toolbar and now it doesn't feature it in the window. I'm not that comp savvy. How do I either get the Norton toolbar up or go back to the old firefox? Thank you.

    Please authorize ADE 3 with same credentials that you used with older version of ADE

  • I have updated to itunes 10.5 and now it doesn't recognize our iphones and says we need a driver installer but then throws a notice saying an error occured. Anyone know anything about this?  :)

    I have updated to itunes 10.5 on my Mac computer and now it doesn't recognize my iphones and says i need to install a device driver but when i try to install it it throws up a notification saying an error occured and to contact the makers of my device 's suppot website.  Anyone know?

    Have you tried repairing your application from within the Control Panel?

  • I downloaded 2 cds onto my ipod nano through itunes.  Recently my itunes account changed and now it doesn't recognize the songs from the cds.  How to transfer from ipod back to itunes?  I don't have the cds anymore.

    I downloaded 2 cds onto my ipod nano through itunes.  Recently my itunes account changed for some unknown reason and now it doesn't recognize the songs from the cds.  The songs are still on my ipod.  I am affraid to sync now because the songs may be deleated, and I don't have the cds anymore.  How can I transfer the songs from the cds on my ipod back to itunes so that I don't lose them? 

    What you have on your computer is your iTunes library, not your "account."  The "account" you have for iTunes is your Apple ID, which you use when purchasing or downloading from the iTunes Store.  If these songs came from music CDs that you imported into iTunes, those songs are not related to your Apple ID.
    Recently my itunes account changed for some unknown reason and now it doesn't recognize the songs from the cds
    How are they not "recognized"?  Are the songs still listed in your iTunes music library, but grayed out?  They no longer appear in your iTunes library at all?
    If you search your computer (not in iTunes) for the song files, using one of the song names, can you find the song files?

  • Last week, I had no problems streaming my MacBook Pro to my sony Bravia with a logix hdmi cable. I came back from holidays and now it doesn't work anymore.  What settings should my computer be on and what settings should my tv be on?

    Last week, I had no problems streaming my MacBook Pro to my sony Bravia with a logix hdmi cable. I came back from holidays and now it doesn't work anymore.  What settings should my computer be on and what settings should my tv be on?

    TarahCurrie Sep 10, 2014 3:48 PM
    Restore From Time Machine Backup
    Reinstall OS X
    Get Help Online
    Disk Utility
    MacBook Pro, Mac OS X (10.5.8)
    You are running 10.5.8
    Did you try booting off your Install disk holding the c key down.  From here you can get to the drop down menu just a few clicks in (you are not going to install) and run  the Disk Utility>Repair Disk.  See if it will let you do this.

  • Did up date for 10.7.4 to 10.7.5 and update for Aperture and now  Aperture doesn't open.  How do I fix?

    Did up date for 10.7.4 to 10.7.5 and update for Aperture and now  Aperture doesn't open.  How do I fix?

    I heard dump the app and reinstall?  How do I go about that?

Maybe you are looking for