Wrapping: Flex vs. InDesign

Hi
Here's a screenshot showing the same text in a PDF from InDesign, and in Flex/TLF/Flash:
(Sys info below.)
The fourth line wraps differently in Flex. It would be great if someone
(perhaps from the TLF team) could help me with finding out why.
For the project I'm working on, it's crucial that the text wraps
the same way it does in InDesign. What options do you see to
ensure that?
Ideally, all of the text would wrap the same right after TextConverter.importToFlow.
(But the Flex app could make some adjustments if necessary.)
Here's a screenshot showing the "s: d" from the first line:
In the InDesign PDF the colon is a lot closer to the "s" than in Flex, it seems.
Do you have any idea where the different distances between the
characters could come from?
It seems to me as if the TLF has a different way of calculating
the exact distances/positions (different from the implementation
in InDesign.) Is that true?
One aspect that I noticed: The font in the PDF seems bolder.
Tobi (Sys info and code below.)
Sys info:
Flash Builder Beta 2, Windows XP.
The guy who created the PDF using InDesign says:
        We're using Adobe Single-line composer, the same OTF font, and
        fontsize, with hyphenation off, kerning=0, and tracking="0"
Code: (Also attached as file.)
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/halo"
               minWidth="1024" minHeight="768"
               creationComplete="main()" viewSourceURL="srcview/index.html">
    <fx:Script>
        <![CDATA[
import flashx.textLayout.container.ContainerController;
import flashx.textLayout.conversion.TextConverter;
import flashx.textLayout.elements.TextFlow;
private var tlfns:Namespace =
    new Namespace('http://ns.adobe.com/textLayout/2008');
private var cc:ContainerController;
private var textFlow:TextFlow;
public var layoutDoc:XML;
private function main():void {
    layoutDoc = new XML('<frame type="TextFrame" x-offset="72.0000" ' +
        'y-offset="18.0000" width="324.0000" height="411.0000" rotation="0" ' +
        'overflow="false"><TextFlow xmlns="http://ns.adobe.com/textLayout/2008" ' +
        'verticalAlign="top" blockProgression="tb"><div><p textAlign="left" ' +
        'marginTop="0" marginBottom="0"><span fontFamily="Myriad Pro" ' +
        'fontStyle="normal" fontWeight="normal" fontSize="12" lineHeight="14.4" ' +
        'baselineShift="0" textDecoration="none" trackingLeft="0" ' +
        'trackingRight="0" kerning="off">There are two main types of ' +
        'arguments: deductive and inductive. A deductive argument is ' +
        'an argument such that the premises provide (or appear to provide) ' +
        'complete support for the conclusion. An inductive argument is an ' +
        'argument such that the premises provide (or appear to provide) some ' +
        'degree of support (but less than complete support) for the conclusion. ' +
        'If the premises actually provide the required degree of support for ' +
        'the conclusion, then the argument is a good one. A good deductive ' +
        'argument is known as a valid argument and is such that if all its ' +
        'premises are true, then its conclusion must be true. If all the ' +
        'argument is valid and actually has all true premises, then it is ' +
        'known as a sound argument. If it is invalid or has one or more false ' +
        'premises, it will be unsound. A good inductive argument is known as ' +
        'a strong (or “cogentâ€�) inductive argument. It is such that if the ' +
        'premises are true, the conclusion is likely to be true. A fallacy is, ' +
        'very generally, an error in reasoning. This differs from a factual error,' +
        ' which is simply being wrong about the facts. To be more specific, ' +
        'a fallacy is an “argumentâ€� in which the premises given for the ' +
        'conclusion do not provide the needed degree of support. A deductive ' +
        'fallacy is a deductive argument that is invalid (it is such that it ' +
        'could have all true premises and still have a false conclusion). An ' +
        'inductive fallacy is less formal than a deductive fallacy. They are ' +
        'simply “argumentsâ€� which appear to be inductive arguments, but the ' +
        'premises do not provided enough support for the conclusion. In such ' +
        'cases, even if the premises were true, the conclusion would not be ' +
        'more likely to be true.</span></p></div></TextFlow></frame>');
    var sprite:Sprite = new Sprite();
    displayArea.addChild(sprite);
    var layoutDocFrameWidth:Number = parseFloat(layoutDoc.@width);
    var layoutDocFrameHeight:Number = parseFloat(layoutDoc.@height);
    displayArea.width = layoutDocFrameWidth;
    displayArea.height = layoutDocFrameHeight;
    var layoutDocTextFlowXML:XML = layoutDoc.tlfns::TextFlow[0];
    textFlow =
        TextConverter.importToFlow(
            layoutDocTextFlowXML,
            TextConverter.TEXT_LAYOUT_FORMAT
    cc =
        new ContainerController(
            sprite, layoutDocFrameWidth, layoutDocFrameHeight
    textFlow.flowComposer.addController(cc);
    textFlow.flowComposer.updateAllControllers();
        ]]>
    </fx:Script>
    <s:Panel id="display" horizontalCenter="0"
        title="Wrapping Example"
        width="740" height="510">
        <s:layout>
            <s:VerticalLayout
                paddingTop="20" paddingBottom="20"
                paddingLeft="20" paddingRight="20"/>
        </s:layout>
        <s:SpriteVisualElement id="displayArea"
            height="100%"/>
    </s:Panel>
</s:Application>

Hi everyone,
Here's an update. The situation has improved, but the problem hasn't been solved yet.
(Info:
The TLF text didn't get rendered using the embedded font. In Flash
Builder Beta 2, the following fixed the issue:
[Right-clicked on the project] -> Properties -> Flex Build Path ->
  Library Path -> Framework linkage -> Merged into code)
Wrapping compared to the InDesign PDF:
System font:
  (Info:
    http://forums.adobe.com/thread/449201
    "Device fonts not only reside on the local system, they are
    rendered by the OS and not by the player. The player does not
    currently have the capability to render them internally." So it
    seems with sys fonts, anti-aliasing opts can't be set in Flex?)
  Wrapping: Line 4 wraps differently.
Embedded font:
  advancedAntiAliasing: true
    Wrapping: Line 19 wraps differently. All lines before that wrap
    correctly - this situation is much better. Thanks Daniel!
  advancedAntiAliasing: false
    Wrapping: Not different from above (advancedAntiAliasing true).
This is one version of the CSS rule:
@font-face {
    src:url('assets/MyriadPro-Regular.otf');
    fontFamily: MyriadProEmbeddedCFF;
    embedAsCFF: true;
    advancedAntiAliasing: true;
Does anyone have an idea what else I could try to get the wrapping
in sync? Perhaps some other @font-face properties? Or some other
properties/settings/etc?
If nothing works, the finished Flex app will try fix the wrapping.
But ideally the wrapping would be the same as in the InDesign PDF
right away.
Tobi

Similar Messages

  • Flex and indesign server

    Hello
    Can anyone show me a sample to communicate with ID SERVER via a flex app.
    Thanks

    Hi,
    look her.
    cu

  • Text wrap type syntax is not supported in Indesign CS4

    Dear all,
    Text wrap type syntax is not supported in Indesign CS4. How to set the text wrap type in indesign CS4

    Hey!
    app.selection[0].textWrapPreferences.textWrapMode = TextWrapModes.CONTOUR;
    TextWrapModes.BOUNDING_BOX_TEXT_WRAP
    Wraps text around the object's bounding box.
    1651729523 = 'bsds'
    TextWrapModes.CONTOUR
    Wraps text around the object following the specified contour options.
    1835233134 = 'mcon'
    TextWrapModes.JUMP_OBJECT_TEXT_WRAP
    Forces text to jump above or below the object, so that no text appears on  the object's right or left.
    1650552420 = 'band'
    TextWrapModes.NEXT_COLUMN_TEXT_WRAP
    Forces text to jump to the next available column.
    1853384306 = 'nxfr'
    TextWrapModes.NONE
    No text wrap.
    1852796517 = 'none'
    tomaxxi

  • InDeSign Server - Flex - SOAP - Business cards tutorial - MISSING Arguments for Script

    Hello, <br /><br />I test even Adobe Flex with InDesign server. I am occupied with<br />the Business cards tutorial. The Problem is, which no arguments are<br />transferred to servers at InDesign. The Script is executed and the new document and the pdf are produced.<br />But without contents!? Is the error situated in it WSDL file? Here my<br />data:<br />InDesign Server Port = 8070<br />Mac Localhost = http://localhost:8888<br />The IDSP Root = http://localhost:8888/IDSP.wsdl<br /><br />IDSP.wsdl Content<br /><br /><?xml version="1.0" encoding="UTF-8"?><br /><definitions name="Service"<br /> targetNamespace="http://localhost:8888/IDSP.wsdl"<br /> xmlns:tns="http://localhost:8888/IDSP.wsdl"<br /> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"<br /> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"<br /> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<br /> xmlns:xsd="http://www.w3.org/2001/XMLSchema"<br /> xmlns:IDSP="http://ns.adobe.com/InDesign/soap/"<br /> xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"<br /> xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/"<br /> xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"<br /> xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"<br /> xmlns="http://schemas.xmlsoap.org/wsdl/"><br /> .........<br />......<br /><service name="Service"><br /> <documentation>gSOAP 2.7.8c generated service definition</documentation><br /> <port name="Service" binding="tns:Service"><br />  <SOAP:address location="http://localhost:8070"/><br /> </port><br /></service><br /><br /></definitions><br />  <br />Flex MXML Content:<br /><br /><?xml version="1.0" encoding="utf-8"?><br /><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"><br />     <mx:WebService id="wsIDSP"<br />          wsdl="http://localhost:8888/IDSP.wsdl"<br />          endpointURI="http://localhost:8070"<br />          useProxy="false"><br />          <mx:operation name="RunScript" resultFormat="e4x"><br />               <mx:request><br />                   <runScriptParameters><br />                      <scriptLanguage>javascript</scriptLanguage><br />                      <!--Optional:--><br />                      <scriptFile>/Volumes/Macintosh HD/Applications/Adobe InDesign CS3 Server/Scripts/myScripts/businessCards.jsx</scriptFile><br />                      <scriptArgs><br />                     <scriptArg><br />                         <name>name</name><br />                         <value>{nameInput}</value><br />                    </scriptArg><br />                    <scriptArg><br />                         <name>company</name><br />                         <value>{companyInput}</value><br />                    </scriptArg><br />                    <scriptArg><br />                         <name>title</name><br />                         <value>{titleInput}</value><br />                    </scriptArg><br />                      </scriptArgs><br />                   </runScriptParameters><br />               </mx:request><br />               <br />          </mx:operation><br />     </mx:WebService><br />     <mx:Script><br />          <br />              [Bindable]<br />              public var nameInput:String="";<br />              [Bindable]<br />              public var companyInput:String="";<br />              [Bindable]<br />              public var titleInput:String="";<br />              <br />              private function makeCards(name:String, title:String, company:String):void<br />              {<br />                   nameInput = name;<br />                   companyInput = company;<br />                   titleInput = title;<br />                   <br />                   wsIDSP.RunScript.send();<br />              }<br />          <br />     </mx:Script><br />     <mx:Form width="410" height="277" x="46" y="34" horizontalScrollPolicy="off"><br />          <mx:FormHeading label="Business Card Information"/><br />          <mx:FormItem label="Name"><br />               <mx:TextInput id="textName" width="100%" /><br />          </mx:FormItem><br />          <mx:FormItem label="Title"><br />               <mx:TextInput id="textTitle" width="100%" /><br />          </mx:FormItem><br />          <mx:FormItem label="Company"><br />               <mx:TextInput id="textCompany" width="100%" /><br />          </mx:FormItem><br />          <mx:FormItem x="75"><br />               <mx:Button x="150" label="Print Cards" <br />                         click="makeCards(textName.text, textTitle.text, textCompany.text)"/><br />          </mx:FormItem><br />          <mx:Text x="47.5" y="194" text="{wsIDSP.RunScript.lastResult.errorNumber}" width="383" height="20"/><br />          <mx:Text x="47.5" y="224" text="{wsIDSP.RunScript.lastResult.errorString}" width="381" height="20"/><br />          <mx:Text x="47.5" y="254" text="{wsIDSP.RunScript.lastResult.scriptResult.data}" width="383" height="24"/><br />     </mx:Form><br /><br />     <br /></mx:Application>

    I am curious where you got the tutorial, and which version of InDesign Server you are using. Also, can you show the contents of the businesscards.jsx script?
    In the meantime, it seems like the connection from Flex to InDesign is working since your script is running and producing output. The next step is to check the arguments being passed to the script, and how the script is accessing and using the arguments.
    You can add this to your jsx script to test the values of the arguments:
    var myName = app.scriptArgs.IsDefined("name") ? app.scriptArgs.getValue("name") : "name undefined";
    app.consoleout("scriptArg name = " + myName);
    var myCompany = app.scriptArgs.IsDefined("company") ? app.scriptArgs.getValue("company") : "company undefined";
    app.consoleout("scriptArg company = " + myCompany);
    var myTitle = app.scriptArgs.IsDefined("title") ? app.scriptArgs.getValue("title") : "title undefined";
    app.consoleout("scriptArg title = " + myTitle);
    To see the values, watch the InDesign Server console window. If you are not getting the values you expect, check your mxml code to make sure the variable names are valid, etc. If you are getting the values you expect, examine your businesscards.jsx to make sure you are using the values as required to populate the InDesign document.
    Susan

  • How to send event from flex extension to other flex extension in InDesign?

    I have two extensions created using flex for InDesign. I need to send an event from one of these extensions and capture that event in other extension. How can it be done? Please help me.

    Hi,
    What I believe that data cannt be send from flex to java as hash maps...... we can send data from flex to java, but this data can be in form of array, string or boolean value..... Then the data can be send using ExternalInterface...............
    and if it is web application you need to use java script in between to communicate and if it is desktop application you can send data using MERAPI...
    MERAPI will act as a bridge for sending data from java to flex and vice versa... and you can send any type of data using merapi.

  • How do you adjust the offset of a text wrap?

    I'm trying to adjust the offset of the text wrap and the Indesign help I found just says to specify it.  But WHERE?  I see the text wrap options on my tool bar but there doesn't seem to be a corresponding place to change the offset distances.

    I finally found a way.  You can go to Window and open the Text Wrap Dialoge Window.  It can then be anchored to the side with your other special effects windows and you can make adjustments there.

  • Debugging FlexUI with InDesign

    Hi,
    I have a InDesign Plug-in which uses Flash/FlexUI for user interface.
    I am using Flex Builder 3 for FlexUI development.
    How do I debug my flex code(ActionScript code) which is used by Adobe InDesign?
    Please suggest some best practices on working with Flex and InDesign.
    Thanks,
    -PS

    No idea why that would happen ...
    Try this
    Troubleshooting 101: Export to .idml or .inx to clear file corruption
    And/or this
    Troubleshooting 101: Replace, or "trash" your InDesign preferences

  • Need help with InDesign 2.02

    I have an old version of InDesign: InDesign 2.02. It is quitting when I open it, telling me that I have a conflict with Text Wrap plugins, and to remove one of them, which I did, without success. I also used my Mac disc utility app and cleared up any problems that might have occurred with the hard drive. Also, I would like to upgrade to the next InDesign version, but don't even know what to upgrade to. Can someone help here? I have a 2003 IMac running OS 10.4.11.

    Given those hardware and budget constraints, I'd try to fix the existing system.
    First do a Finder search for Text Wrap plugins.
    There should be exactly three (the path to the InDesign folder may differ)
    /Applications/Adobe InDesign 2/Required/Text Wrap
    /Applications/Adobe InDesign 2/Required/Text Wrap Path
    /Applications/Adobe InDesign 2/Plug-Ins/Layout/Text Wrap Panel
    Eventually it is sufficient to log in as a different user, and launch InDesign from there.
    Then clean your preferences. Take Peter's instructions below with a grain of salt - ID2 will differ.
    http://forums.adobe.com/thread/526990
    I think the keyboard shortcuts to purge prefs have only been added with InDesign 3 (CS1).
    More desparate measures:
    Remove (archive, or at least rename) the useless old InDesign installation before you retry the Installer.
    If nothing else helps:
    Do you have any spare disk (i.e. external firewire) or separate internal volume that you could use for a clean OS and InDesign install? There are cheap FW to SATA adapters that you could use for a new disk, most budget disks today internally have SATA. Back in that time I was only using Laptops, so I do not know whether your system already has the faster USB2. If so use that, you'd then not need FW.
    Dirk

  • Using Flex components in Java application

    Hello,
    I was learning Flex previously, and I thought I remembered reading somewhere that I can use Flex UI components in a Java application. For instance, I could use Flex for the UI, and Java for the backend. I can't find though the documentation for this. I read this last summer. I don't mean using Flex as a UI in a browser and Java on the server, but a Java application that runs on the client with a Flex UI. I thought what I needed was the flex compiler api, but I looked at the flex compiler api documentation and it isn't what I want.
    Does anyone know what this "part" of Flex is that I am talking about, but can't remember?
    Thanks,
    Vance

    No, thanks, but that wasn't what I was thinking of.
    What I remember looking at was some library that allowed wrapping Flex UI componnts in Java Swing components. Then the Swing components could be used in the Java app. One main objective of my wrapping Flex in Java is to use flash.media.Video class to play flash video.

  • Annoying bug...

    Trying to get Character contents from an InDesign text:
    for(var a:uint = 0; a < myParagraph.characters.length; a++){
         var myCharacter:Object = myParagraph.characters.item(a).contents;
    Obviously this simple routine works correctly in ETK and returns the character or the special character enumerator (eg. FORCED_LINE_BREAK etc...).
    In FlexBuilder when character is a special character I got this error:
    "In wrapReturnedHostObject(), attempted invalid wrap: com.adobe.indesign::Enumerator returned as Object"
    It lloks like there's no way to solve this, since it is a bug.
    Any suggested workaround?
    Thanks!

    I will capture the bug internally. For the short term here is a workaround.
    for(var a:uint = 0; a < myParagraph.characters.length; a++){
            var myCharacter:HostObject = myParagraph.characters.item(a).hostObjectDelegate;
            trace(myCharacter.contents);

  • Text Wrap options not showing in InDesign CS3

    Using InDesign CS3 on a Mac 10.4.  I've had this problem for a couple of months now and it's getting past the point of annoying.  When I open my text wrap options pallete it's blank even when I expand options.  I can see the text wrap icons in my header panel, but I no longer have options to change the right/left/top/bottom margins.  Just a general "add wrap" and "remove wrap".  Is there any way I can get my pallete back?  I've tried defaulting my tools, but still it does not show up.  I don't know what to do to get it back.

    Did you try resetting preferences? While pressing Shift+Option+Command+Control, start InDesign. Click Yes when asked if you want to delete preference files. If you don't get the message about deleting preferences, you weren't fast enough.
    http://livedocs.adobe.com/en_US/InDesign/5.0/help.html?content=WSa285fff53dea4f86173837510 01ea8cb3f-6d1e.html
    Ken

  • Text will not wrap around a photo in indesign cs3?

    we have tried EVERYTHING. we use adobe indesign for our school newspaper and for the past 3 days we have been trying to get one of the articles (text) to wrap around a photo.
    the photo is a simple rectangle shape. for all of the other pages, the text wraps around photos perfectly fine. but for some reason on this one page it will not wrap around any picture at all.
    of course "text wrap" is selected for the photo and we also tried going to the text frame options and unchecked ignore text wrap. that still didn't work.
    we tried putting it on "detect edges" and that also did not work. ):
    please please please if you have any suggestions, add them!!! we really need to fix this issue because this page needs these pictures!

    I just encountered the same problem, the text did not wrap around the image whatever i did. I found the solution on my problem, that i had an imagebox underneath the image, which i was not aware of. I discovered it when i deleted first the textframes and the image. After i deleted the second imagebox the text wrapped around the image as i wanted it!

  • Text wrap in InDesign cs2

    I have InDesign cs2 and the text wrap feature has completely disappeared--listed in window but GONE! How can this be recovered?

    Start by asking in that forum
    http://forums.adobe.com/community/indesign

  • InDesign CS6 Text Wrap increments not accurate.

    My work jumped from CS4 to CS6 so I don't know if CS5 had the same issue. Anyway. Text wrap (around bounding box) seem to now be very limited. For example, If I have, say a .25 text wrap on the bottom of a object, but I need to change it slightly to .245 the text does not move. The box shows the change, but the text below just doesn't follow suit. CS4 I was able to make tiny incremental changes to the wrap, but it is not working for me now in CS6. Any ideas, answers?

    Suggest you post product specific questions in the relevant product forum.
    Try posting at http://forums.adobe.com/community/indesign/indesign_general

  • How can I pass Flex Field value to the Call Wrap Up screen?

    Hello helpers,
    I am trying to get a value from the 'Flex Field' passed over to the 'Call Wrap Up' screen by using Form Personalization.
    Oracle was configured by a subcontractor and therefore I do not know what the exact name of the textfield is in the Flex Field however the label is 'Method of Contact'. When i set 'Show Custom Events' to 'On', I get the response: 'CSXXXRC.INCIDENT_TRACKING.STATUS_CODE:WHEN-NEW-ITEM-INSTANCE' When i enter a value in the Method of Contact field in the Flex Field.
    Can anyone help?
    I am a complete Newbie to Oracle.... I only know a bit about Oracle Form Personalization.
    Any help would be much appreciated,
    S

    Seems like you're talking about a from from the eBusiness-suite. There are special rules for that, ask your question in the eBusiness-suite-forum OA Framework

Maybe you are looking for

  • Lion 10.7.2 Sleep Issues

    1. I use a Samsung 2525w (wireless) printer and I constantly have to turn the print off and then on to reset the network connection after my MAC sleeps. 2. My USB connected Epson Artistan 800 throws my two external hard drives (one is timecapsule) of

  • Writing data on to excel sheet from java

    Hi, I have to write a java program which writes data on to Excel sheet column by column. How to do this ?

  • Leopard and External Hard Drive Issues

    I have a 1.5TB Maxtor One Touch which was working with Leopard and Time Machine. It is set up as RAID 750 GB. I have backups from TM as well as some video on the Maxtor. Recently it decided to stop working on the iMac as well as a 12" G4 Powerbook. A

  • Patching to 16.0 SP01

    With the new release of ASE 16.0 SP01 last week, I think it would be interesting to experiment patching my ASE 15.7 PL132 to 16.0 SP01. Has anyone successfully perform the patching? I've tried to execute it, but terminated with error "Media/sybupd/up

  • INTERESTING:  ORA-00600: internal error code,

    Here is the scenario: DB1 = 11.2.0.1.0 Linux 5 DB2 = 11.2.0.1.0 Linux 5 Init.ora on DB1 and DB2 are exactly the same. On DB1, I run this and get ORA-600: select distinct i.short_desc,c.short_desc, c.long_desc from pace_masterdbo.codes c, pace_masterd