Line break in an SVG object

Hi friends,
I am using an SVG object to create a pdf from BLS.I am assigning a string value to a variable pre-defined in that SVG object.The problem here is i am unable to get carriage return in that string(string is of huge length) which is being displayed on the PDF.It is getting out of the PDF created.I had used 'crlf' but it is not working.Any suggestions on this would be really appreciated.
regards,
Ravi Kumar
Message was edited by:
        Ravi Kumar

Hi, Ravi.
One of the cool things about SVG is that it is nothing more than an XML document!  So, you have two options to achieve what you would like to do:
Solution 1 involves using the animation editor's expression capabilities to meet your needs:
1a) If you can assume a "maximum" number of lines (let's assume 8 line items maximum), you can place all 8 text objects in their correct position on the SVG object (and name the SVG element ID's something like TextLine1,TextLine2, etc.).  In the animation editor, provide 8 input properties (of type String) corresponding to these text values.  In fact, let's call them TextLine1,TextLine2...TextLine8.
1b) In the animation editor, link the these properties to the corresponding text property for each of your 8 SVG elements.
1c) Now, here's the magic part:  link the following expression (adjusted for each text line item) to the "visibility" attribute of each of your 8 SVG elements.
stringif(stringlength(TextLine1) > 0,"visible","hidden")
1d) Then, in your BLS transaction you'll need to split your list of barcode items and loop through them or assign them.  I'm not sure what your query is returning, but I'm sure there's a way, either with the functions or  the web scraper (a RegEx parser) to do what you need.  Let us know more specifics, and we can provide some guidance.
There's one other approach that takes advantage of the fact that an SVG document is nothing more than a special type of XML document.  In this case, instead of "pre-adding" a fixed number of items, you'll simply use the "append XML" link type and a local property of type XML, which will contain your SVG text element, to dynamically add any number of items.
The key with these approach is to dynamically calculate the x and y positions for each text item (usually based on some fixed height), assign these attributes as well as the text content to a Local property, then append this to the SVG.
You have a few choices for how to load the SVG.  One option is the XML Loader.  However, you can mix the capabilities of the AnimatedObject + direct SVG manipulation as well.
Option 2a is to use the XML loader, manipulate the XML with assignment actions, then use the SVG renderer to convert it to an image.
Option 2b is to use the AnimatedObject action, which outputs both XML and an (optional) image - you should turn off "Render Image" in this case.  You can then manipulate the SVG output to add your text items, and send this to an SVG renderer to convert it to an image.
The advantage of approach 2b is that you can use the standard functionality of the AnimationObject to make the easy stuff, and extend it with SVG manipulation for your "super dynamic" stuff.
Hope this helps,
Rick
R

Similar Messages

  • Splitting up text at line breaks into separate text objects

    creating a map with many text objects each containing one village name etc. or sth similar it would be nice if we could
    - type all names with enter/linebreaks
    - and then choose something like 'create separate text objects for each text line'
    I know I could convert the start text into outlines and then individually placing/moving them, but I still want to be able to edit all texts in one go (e.g. changing font size, colour, etc.)

    Beate,
    Since you mentioned a map, you can also do it this way:
    1. Count the paragraphs in your text.
    2. Select the text object containing the lines of text. Copy or Cut it to the Clipboard.
    3. LineTool: Draw a horizontal line.
    4. AltShiftDrag a copy of the line downward. Transform Again (Ctrl D) until you have as many lines as you had paragraphs.
    5. Text tool: Hover over the topmost line. Click when you see the Type On A Path cursor. Paste.
    6. Drag a selection marquee across all the lines. Type>ThreadedText>Create.
    7. Type>ThreadedText>RemoveThreading.
    Now you have a bunch of indiviudal text objects, but they are already Type On A Path objects; so you can drag them into position on your map, and then directselect their paths to edit their shapes (assuming you want pathType objects to bend along roads, etc.)
    JET

  • Loosing break lines when writing string to object

    Hi,
    I am tring to write a string (docText) to file:
    FileOutputStream myfile = new FileOutputStream(filename);
    BufferedWriter myOutput = new BufferedWriter (new OutputStreamWriter(myfile));
    myOutput.write(docText);
    the problem is that I get the string in the file as one line and I loose all the line breaks I had in the string.
    can anyone help?
    Thanks,
    Itzik

    It's quite possible for that to happen, if for example
    your String's line breaks are only '\n' and the tool
    you try to display your file with is a piece of
    Windows software that is ignorant of this possibility
    and demands '\r\n' as the only possible line break.
    PC�Exactly. And thats why its a good idea to use [url http://java.sun.com/docs/books/tutorial/essential/system/properties.html] System properties  in such cases

  • LE7:Score Layout:Global Format:Maximum Bars per Line - Line Break Bug!

    Hello
    This problem occurs in Logic Express version 7.
    (I am using MacOS version 10.4.2 on an eMac)
    I am currently compiling and editing a large score for a big band composition consisting of 22 parts:
    Flute 1
    Flute 2
    Clarinet 1
    Clarinet 2
    Alto Sax 1
    Alto Sax 2
    Tenor Sax 1
    Tenor Sax 2
    Baritone Sax
    Trombone 1
    Trombone 2
    Trombone 3
    Trombone 4
    Trumpet 1
    Trumpet 2
    Trumpet 3
    Trumpet 4
    Guitar
    Keyboard
    Electric Bass
    Percussion 1 (Kit)
    Percussion 2 (Aux)
    I am creating the score in a separate file, and I am combining parts into 1 stave each by instrument like this:
    Flute 1 & 2
    Clarinet 1 & 2
    Alto Sax 1 & 2
    Tenor Sax 1 & 2
    Baritone Sax
    Trombone 1 - 4
    Trumpet 1 - 4
    Guitar
    Keyboard (2 staves)
    Bass
    Percussion
    Each instrument, with the exception of keyboard which has 2 staves, consists of one stave, making up systems of twelve staves each. By sizing down each score style to 2,
    I have managed to fit 2 systems onto each page, therefore significantly reducing the amount of paper needed.
    The problem comes when organising the layout of my score,
    in particular, the line breaks. Using layout:global format, I have limited the maximum number of bars per line to 8, both in the page edit and normal score mode.
    I am trying to divide up my score so that there are 8 bars per system. Using the white arrow tool, I am dragging bars up and down in order to achieve this.
    However, when I get 30 odd bars in, I discover a system with 12 bars crammed into it - and even printing it off, it is clear that the system could benefit with less bars; the notation is squashed up together and not very easy to read.
    THIS IS THE ACTUAL PROBLEM:
    So I tried using the white arrow to move the last 4 bars down onto the next system, and a bug occurs where I end up with about 20 bars on the system, oddly distorted, the first few bars of which are squashed up together at the beginning of the line, and the last bar of which is stretched far off the right hand side of the page out of view. Then the next 20 or so bars are no where to be seen (probably far off the right hand side of the page) before the system below.
    If you dont know what I am talking about, I could provide a screenshot if you request.
    I have tried everything to get 8 bars on that particular system; dragging the stretched bar downwards, dragging squashed bars downward, moving bars down 1 by 1, moving bars onto the system above, moving bars away from the system below (to make room for the 4 bars that I want to move from above), adding more bars and dragging them down, but none of these methods have worked. I am either stuck with 12 bars crammed onto one system and 4 bars on the next or an oddly distorted version of the system which cannot possibly be read. Even when I settle with the unsatistactory former, I encounter further problems on subsequent systems below, some systems of which are already distorted.
    All I want is to have 8 bars per system, it should not be too much to ask! The layout:global format:maximum-bars-per-line calculation seems to be redundant, even when I reset the default line breaks - it just does not automatically set 8 bars per line, which it should do. Is there not an option to determine bars individually by number onto their respective lines, without having to use the white arrow graphic layout tool?
    The problem is extremely frustrating, and it is preventing me from completing, presenting and handing in a score for my university music composition.
    I have no other score producing software, and starting it
    from scratch on paper is going to take me weeks, because it consists of 830 12/8 bars in 22 parts, and I need to get it ready by next term!
    Any help would be extremely helpful and much appreciated, especially a patch or a useful way round. It could be related to memory, or hard drive space, as I have experienced similar problems in the past, where my score has been stretched off the page during a time when I have had little disk space...and this is a very large piece of music which might stretch the score capabilities of Logic.
    If so, has anyone got any suggestions?
    Thanks!
    Rory
    eMac   Mac OS X (10.4.2)  
    eMac   Mac OS X (10.4.2)  

    nope just cutting should work.
    here are some things to try:
    1. try assigning a different score style. for the regions. duplicate and then adjust the default ones if necessary.
    2. try creating a new instrument set. in fact delete them and make a new one (use the key command: create instrument set from selected)
    3. it may be a formatting problem so check:
    in global layout constant spacing (try 8 or 9) and proportional spacing (try 45 or so). then try factory defaults.
    4. try copying and pasting the midi into a brand new region and looking at the score for that.
    5. try fiddling with the layout tool drqagging bars up or down.
    normally simply cutting the region of just one object is enough to force a redraw. maybe try it on all of the regions. what happens when you double click on a region?

  • Inserting line break within label

    Hey guys,
    i've run into a small problem with the coding. right now im
    creating image viewer within a horizontal list. at first, i had
    each object coded inside the horizontal list but then i decided to
    place everything in an xml file to make changes easier. since i've
    switched, i have not been able to figure out how to insert a line
    break for each label. this is what the code looked like when i was
    naming each object.
    <mx:HorizontalList id="PosterSelect" height="352"
    columnCount="3" columnWidth="200" width="580"
    rollOverColor="#ff3344" themeColor="#DC240B"
    itemClick="itemClicked(event)">
    <mx:dataProvider>
    <mx:Array>
    <mx:Object id="object1" label="March 12, 2008&
    #13;Chicago, IL" data="events"/>
    <mx:Object id="object2" label="March 12, 2008&
    #13;Chicago, IL" data="events"/>
    <mx:Object label="March 12, 2008& #13;Chicago, IL"
    icon="{event3}" data="events"/>
    <mx:Object label="March 12, 2008& #13;Chicago, IL"
    icon="{event4}" data="events"/>
    <mx:Object label="March 12, 2008& #13;Chicago, IL"
    icon="{event5}" data="events"/>
    </mx:Array>
    </mx:dataProvider>
    </mx:HorizontalList>
    within the label property, i used the & #13; character to
    insert a line break. now im using an item renderer to call the
    information from my xml file. the problem is... i cannot figure out
    how to insert a line break like i did previously. from what i
    understand... the text in the label field of the xml file is
    already parsed when it comes into flex. so using the & #13; or
    \n characters will not work. i also tried hitting enter to insert a
    new line in the xml file but that did not work either. does anyone
    know how i could work around this?? below is my current code and
    xml
    <eventinfo>
    <events>
    <label>March 12, 2008#13;Chicago, IL</label>
    <group>group name</group>
    <location>Detroit, MI</location>
    <icon>posters/event1.png</icon>
    <fullsize>posters/event1.png</fullsize>
    </events>
    <events>
    <label>March 12, 2008#13;Chicago, IL</label>
    <group>group name</group>
    <location>Detroit, MI</location>
    <icon>posters/event4.png</icon>
    <fullsize>posters/event1.png</fullsize>
    </events>
    </eventinfo>
    <mx:HorizontalList id="HorizontalCanvas" height="337"
    columnWidth="180" width="672"
    rollOverColor="#ff3344" themeColor="#DC240B"
    itemClick="callJavaScript()" x="10" y="33" borderStyle="solid"
    dataProvider="{eventinfo.events}" borderColor="#000000">
    <mx:itemRenderer>
    <mx:Component>
    <mx:VBox width="100%" height="350"
    horizontalAlign="center">
    <mx:Image source="{data.icon}"/>
    <mx:Label text="{data.label}"/>
    </mx:VBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:HorizontalList>

    hey atta,
    sry, i was using the &#13; character but for some reason
    when i posted the character it turned into a space so i added the
    space inbetween the & and the #13;
    but yea i think it was the height... changed it to 40 and it
    worked.. i cant believe i didnt notice that lol... oh well... thx
    for the help!!!

  • Why Rich Text (HTML Only) format email introduces line breaks (paragraph marks) in the email body in html?

    A sentence in rich text (change in Options, Delivery format) appears as a single sentence in browser. But when I check the page source I see that sentence has been broken in to multiple lines. Why is this done? Isn't this a bug?
    When viewed in a browser or application that supports rich text this does not create any problem since the line breaks are not taken into account . But I am trying to extract the text from this html and display in a nonHTML application like notepad.
    Is this done on purpose?
    For eg.
    In browser - Honesty is the best policy
    In View HTML Source -
    Honesty
    Is the
    best
    policy.

    lets start at the beginning.
    There is no such thing as rich text email, unless it in internal corporate stuff like MS Exchange, Lotus notes etc. EMail on the internet is HTML or Plain Text.
    I have no options > delivery format in my settings. Is this something to do with Outlook perhaps?
    Then there is your image. All those MSO objects. They stand for Microsoft Office Objects and indicate the source of the HTML as being Outlook or at least Microsoft Office. All in all I think your asking about Microsoft actions on a Mozilla forum.

  • Remove line breaks within a xml element

    Hi,
    I have a xml element that contains a long text string with multiple line breaks. something like this:
    text
    text
    text text
    text
    text text text
    text
    How can I remove all line breks except one, i e I still want a line brek after each text line:
    text
    text
    text text
    text
    text text text
    text
    Thanks for you help!
    Magnus

    This is a media object (BLOB) in a JDE report. But we have now modified the report to get the xml file correct from start instead.
    /Magnus

  • Tool Tip line breaks

    I know the "tool tips" should be brief, but I got a long one, and a line break would make it more readable.
    Is there a way to add a line break in NIB object's Help "Tool tip" property? Some sort of keystroke like Shift-Return?
    Presently I edit the Tool Tip text in a word processor, add Returns where I want, and then copy and paste into the Tool Tip field. Works fine, but I wonder if there is an "inline" alternative?
    John

    Is there a way to add a line break in NIB object's
    Help "Tool tip" property? Some sort of keystroke like
    Shift-Return?
    Try Option + Return

  • ICS file - Line breaks

    Hi,
    I am sending an email with an ICS file as an attachment. Everything work fine, except that when the user opens the ICS file from their outlook, the text is displayed without a line break.
      CALL FUNCTION 'SO_OBJECT_SEND'
        EXPORTING
          object_hd_change = w_object_hd_change
          object_type      = 'RAW'
          owner            = sy-uname
        TABLES
          objcont          = message_content
          receivers        = receiver_list
          packing_list     = packing_list
          att_cont         = icsfile.
    The message contents came with the proper line breaks. But when I appended the same data into the ICS file, it came out without line breaks.
    Any comments?
    Regards
    Murali.

    Thanks for the response Venkat.
    I tried the way you have mentioned. But it doesnt reflect.
    My packaging file is as below:
    CLEAR packing_list.
      describe table icsfile lines packing_list-body_num.
      packing_list-transf_bin = 'X'.
      packing_list-head_start = 0.
      packing_list-body_start = 1.
      packing_list-head_num = 0.
      packing_list-objtp = 'ICS'.
      packing_list-objnam = 'Object name'.
      packing_list-objdes = Sale Order'.
      packing_list-objlen = packing_list-body_num * 255.
      APPEND packing_list.
    CALL FUNCTION 'SO_OBJECT_SEND'
        EXPORTING
          object_hd_change = w_object_hd_change
          object_type      = 'RAW'
          owner            = sy-uname
        TABLES
          objcont          = message_content
          receivers        = receiver_list
          packing_list     = packing_list
          att_cont         = icsfile.
    When I debugged the code, the icsfile had the below content.
    BEGIN:VCALENDAR
    PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
    VERSION:2.0
    METHOD:PUBLISH
    BEGIN:VEVENT
    ORGANIZER:MAILTO:noreply@rta
    DTSTART:20090727T110000
    DTEND:20090728T133000
    LOCATION:My location is Sydney
    TRANSP:OPAQUE
    SEQUENCE:0
    UID:2009072711000020090728133000
    DTSTAMP:20090806T130823
    DESCRIPTION:\
    This e-mail is an calendar attachment for the order confirmed yesterday via e-mail from ABC.\
    Do not reply to this e-mail, as it is automatically generated and your reply will not be received or actioned.\
    Vendor:\
    ABC Australia\
    Double click on the attachment and save for your calendar to be updated.\
    SUMMARY:Sales order has been confirmed
    PRIORITY:5
    X-MICROSOFT-CDO-IMPORTANCE:1
    CLASS:PUBLIC
    BEGIN:VALARM
    TRIGGER:-PT15M
    ACTION:DISPLAY
    DESCRIPTION:Reminder
    END:VALARM
    END:VEVENT
    END:VCALENDAR
    I can see that my empty lines are represented in the icsfile with a '/' character.
    Regards
    Murali.

  • Data upload fails because of line breaks in data

    Hi experts,
    I´m facing an upload problem from R/3 to BW because of line breaks and tabulator spaces in R/3 data. The data can be loaded to the PSA but it is not possible to load the data to the ODS.
    Do you have any ideas how to permit the line breaks or remove them while uploading.
    Any hints are welcomed,
    Regards
    René

    For the info-object in question you can create a global transfer routine. When you open you info-object, tab general you'll find a section transfer rule. You can create a generic transfer rule here where you filter unwanted characters.
    You may want to use the ABAP command 'CONDENSE'.

  • Line breaks (%0a) not working in pre-populated mailto links?

    Anyone else having this problem?
    I'm using mailto links in my folio that include "subject" and "body" information, so that when the user clicks on the link, it opens a prepopulated email that is ready to send.
    Unfortunately, the line breaks (%0a) are not working, so a nicely formatted email with a couple paragraphs and a signoff at the bottom is turning into one long string of text.
    The weird thing is, every other special character (e.g. %20 for spaces) is working just fine.
    For example, here's a mailto link I might use:
    mailto:test%40test.com?subject=subject%20test&body=Here's%20my%20first%20paragraph.%0A%0AH ere's%20my%20second%20paragraph.%20There%20should%20be%20a%20full%20break%20before%20and%2 0after.%0A%0ASincerly%2C%0AiPad%20email%20test
    Every character will work just fine except for the %0A%0A portion of the code.
    That is going on?

    You have to edit the XML Source code to do this. First, put a value in the object tab > value tab > Default box so that you can find it easily in the XML code. Click on the field to select it, then click on the XML Source tab. This will take you to the first line in the XML code that defines the field. Then all you need to do is insert:
    &#xD;
    wherever you want a carriage return. This will also overwrite the value when data is typed into the form and saved. FYI, the reason your values aren't kept when you script in the default value is that the script is still in the form when you save it, so re-opening the form simply resets the default value to the script.

  • Hyphens, phone numbers and discretionary line breaks

    We have hit a problem with InDesign/InCopy. When we enter a phone number with dashes, InDesign will not create a line break on any of the hyphens. We want it to break on hyphens in phone numbers (that is our style). Is there any way to change ID/IC behavior?

    Apparently, InDesign CS3 treats the phone number as one object, regardless of the hyphens.
    I assume you are on CS3, since the problem does not arise in CS2. In my quick tests, if I put a discretionary hyphen following the regular hyphen, ID allowed the phone number to break but did not double-up on the hyphens.
    Option 1]
    You can use GREP to search for the phone number and put a discretionary hyphen after each phone number hyphen. (I would tag the phone numbers with a character style while I was at it.)
    Option 2]
    If you don't like GREP, create a character style called "Phone Number"; search for the phone numbers (^9^9^9-^9^9^9-^9^9^9^9) and apply the style. Then search for a hyphen set to the style and change it to a hyphen and a discretionary hyphen.

  • Formula Line Breaks

    I'm trying to format text so that there are line breaks in a generated string, but in such a way that it can work with Xcelsius.
    I'm aware that you can use CHAR(10) in Excel to make a line break, but Xcelsius doesn't like the Char function.
    Here is my formula: ="Item A:" & C39 & "Item B:" & C40
    I want it to look like:
    Item A:
    Information from C39
    Item B:
    Information from C40
    Does anyone know a way to have line breaks in a formula that Xcelsius can accept? The object is to get the text into a text box.
    Thanks in advance!

    Use the following Formula ..
    ="Item A:"&"
    "&B3&"
    "&"Item B:"&"
    "&B4
    if you want the Line break in formula "Item A:"&" then Hit ALt+ Enter .it will come in new line..
    Xcelsius can accept the line breaks in a formula.
    Hope this helps.
    Thanks,
    Srinivas Dandamudi

  • SE63 translate query element with having a line break

    Hi specialists,
    we've got some queries with columns having a description splitted to more than one line. Now we're trying to translate this using SE63. The line breaks in the source fields are shown as ##. We don't find any way to have line breaks in the target field. Does anyone know how to set the break?
    Kindest,
    Ralf
    Ralf Bund
    ElectronicPartner Handel
    Germany

    Hi,
    sorry, I thought it would be clear from the description. We've created a piece list and an object list and are now working in the short text editor of SE63. I'm seeing something like this:
                                                        (60)     
    Auftrag##Roherlös                                          
    Where 'Auftrag' and 'Roherlös' are the two parts of the collumn heading. In the Query you'd see:
         Auftrag
         Roherlös
    Now I want to enter a corresponding text for the translation into the target field, but can't find now way to enter the line breaks.
    Kindest,
    Ralf

  • Exporting EPUB from InDesign CC not including line breaks

    I am done with a book and have it formatted the way I want. I am exporting it to EPUB through InDesign CC and previewing it in iBooks and also through Kindle previewer. Everything is fine except for one thing... where I have created page breaks, the exported file is not including them.
    I tried exporting to HTML just to see what it did and there is no line breaks there. I know its proprietary markup ( in kindle ) but I still would like to include them in a few specific places ( to mark seperations of chapters ).
    In kindle this is the tag they say to use: <mbp:pagebreak />
    In iBooks, I have not yet figured out how to create them, I am going to work on that today once I sort out the kindle version.
    Is there any way to force it to include line breaks on export. Or alternatively, I could export to HTML but I am having trouble figuring out how to go back to the EPUB format from there and also it didn't include the fonts, so there was other issues to consider as I have a custom font I was using for the headers that looks really good and matches the font on the book cover as well... so I really want to keep that consistent if possible.
    Are there any tricks or things I can try here to improve on my workflow and do a better job of seperating the chapters ?

    Ok, I hadn't tested the advanced options out in the export menu. It works and does so on both the iBooks and Kindle previewer.. which is good news since that is really important to me to try and find a workflow I can update both of these formats from when I continue to work on my book.
    The only strange part is that on some chapters its adding an extra blank page between the chapter and the next. What is odd is that it only happens on some of them (in the iBook reader only, the kindle previewer isn't doing this)
    I am going to look into this more closely but its not a major deal as I would prefer a little seperation in the chapters anyways, its not really a bad thing. It is just hard to figure out why its doing this.

Maybe you are looking for