WRAPPING TEXT

Hi:
Does anyone know if I can find somewhere code to cause long lines to properly wrap at x number of chars. For instance if I had a character field that captures comments and those comments can be 2000 characters long, I would like to separate the text into lines of 80 characters each, wrapped at word boundaries.
Thanks,
Thomas

Not sure how this is a Forms situation, but it just so happens that yesterday I was fooling around with a pl/sql procedure to wordwrap lines. Hope it helps:
Declare
  txt varchar2(2000)
   := 'This is some text to test the "wordwrap" line break procedure.  '
   || 'The procedure will format the input text, breaking at the last '
   || 'space found nearest to the end of the text line.  The resulting '
   || 'output text will be multiple lines of nearly equal length.  '
   || 'The procedure accepts two input variables:  the text string, and '
   || 'the line length.  It outputs a pl/sql table with the formatted '
   || 'lines.  Note that all the input text should have a space at the '
   || 'end of each word, and two spaces after the end-of-sentence '
   || 'period (except for the last sentence.)';
  TYPE      txt_tbl_typ IS TABLE OF VARCHAR2(100) INDEX BY BINARY_INTEGER;
  txt_tbl   txt_tbl_typ;
PROCEDURE wordwrap
  (msg       IN  VARCHAR2,
   max_i     IN  NUMBER,
   txt_tbl_o OUT txt_tbl_typ)
IS
  P      PLS_INTEGER := 1;
  L      PLS_INTEGER := NVL(LENGTH(msg),0);
  Sp     PLS_INTEGER;
  maxlen PLS_INTEGER := GREATEST(LEAST(max_i,100),10);
BEGIN
  Txt_tbl_o.DELETE;
  LOOP
    -- skip forward to first non-blank character
    LOOP
      EXIT WHEN P > L OR SUBSTR(msg,P,1) <> ' ';
      P := P + 1;
    END LOOP;
    EXIT WHEN P > L;
    IF P + maxlen > L then
      -- Last line --
      txt_tbl_o( NVL(txt_tbl_o.LAST,0) + 1 ) := RTRIM(SUBSTR(msg,P));
      P := L + 1;
    ELSE
      -- break on space
      Sp := INSTR(SUBSTR(msg,P,maxlen+1),' ',-1) + P - 1;
      If Sp - P <= 0 then --no space found so output full length
        txt_tbl_o( NVL(txt_tbl_o.LAST,0) + 1 ) := SUBSTR(msg,p,maxlen);
        P := P + maxlen;
      ELSE
        -- no space, just print full line --
        txt_tbl_o( NVL(txt_tbl_o.LAST,0) + 1 ) := RTRIM(SUBSTR(msg,P,Sp-P));
        P := Sp;
      END IF;
    END IF;
  END LOOP;
END wordwrap;
-- This process below tests wordwrap.  You can change the second
-- parameter to any length between 10 and 100.
BEGIN
  wordwrap(txt,50,txt_tbl);
  FOR i in 1..txt_tbl.LAST LOOP
    DBMS_OUTPUT.PUT_LINE(txt_tbl(i));
  END LOOP;
END;

Similar Messages

  • Wrap text options, are they really limited?

    I was curious if there was a way to dial in precise NONuniform wrapping options.
    I have a place holder box that I want the text to wrap around and give a 5pt space on all but the right side... I want that 20pts.
    In the wrap text options it's all uniform.

    You’ll have to edit the path to add 15 points to the right side. One simple way would be to copy it with a +15 point horizontal offset then merge the two paths with Pathfinder.

  • Xml publisher report using RTF in Excel is coming as wrap text?

    Hi,
    I am working on XML publisher report, I have converted standard report to xml publisher , to generate the report in excel.
    But the output is coming as Wrap text, is there a way to get the output directly without wrap ?
    Thanks
    Dev

    Hi Dev,
    You can try below ways
    1>change the setting in table properties to fit table cell as per contents.
    2>or create a table and inside that create one more inner table and add your fields.
    3>or Create .XLS layout it will come properly.
    Thanks

  • In ICal is there a way to see all of the text in all day events on the month view of the calendar.  Seems to wrap text only if there is a time on the event

    In ICal is there a way to see all of the text in all day events on the month view of the calendar?  Seems to wrap text only if there is a time on the event

    The paths won't agree on the two OSs so a simple XML import isn't likely to work.
    See Sync iPod/iPad/iPhone with two computers and, if needed, Make a split library portable. The techniques in the first link will work when moving the library between Windows and OS X as long as the library is "portable", but iTunes takes quite some time checking the database when the library is opened under a different OS.
    tt2

  • In the new Keynote how does one find the Wrap Inspector to wrap text around a photo??? Thanks

    In the new keynote, the help section refers to the Wrap Inspector.  How does one find that or how does one wrap text around a photo??   Thanks

    You can also use the shape tool to draw a shape roughly following the outline of the graphic you want to wrap text around, change the fill and stroke to "none", then paste your text within the shape. It's a few more steps, but it opens you up to many creative alternative layouts.

  • How Do I Wrap Text Like the iOS Camera App?

    Hello. I am in yearbook, and I have been challenged with designing the cover of the yearbook, and I have been having a few problems along the way. One of these problems is to wrap text. Specifically, I'm stuck on how I would wrap text like the iOS camera app on the bottom of the screen. The words seem like they are wrap around a 3D object to give it that effect, but I can't really tell. If anyone can help me, it would be greatly appreciated.

    JJMack wrote:
    There is a big difference between being a casual user than real work or development. I own a iPod its a great MP3 player and a device I can display my pictures on out of my pocket. I'll even Facetime my kids at time to see my grand kids or help fix something.  My wife has a mini iPad for quick internet access and quire music and uses her iPod to entertain our two year old grandson with games.   She uses a Canon 1D mark 4 and I a Cannon 1D mark II.  The only use the iPad and iPod cameras get is Facetime. No iOS apps are use to work on images  they have no value when you have Photoshop. The iPod is better for displaying image then the iPad mini it has a 3:2 aspect ratio display and travels better the the mini iPad which has a 4:3 aspect ratio display.  I also crop image for display on wall mounted HDTV. The iPad is better for casual internet access then the iPod. All our kids have iPhones and they all use computers either Mac or PC for work and internet access.  When you have a Unix or Windows why would you want to touch an iOS device for work or serious internet access.  Apple mobile devices are convenient for casual use and grand kids don't get that dirty finger painting on them as they do using real paint. Nothing of real value is maintained on an iOS device.
    Well...there's Photoshop Touch and Photoshop Mix as well as Lightroom Mobile. It could be argued that they're don't exactly mirror their desktop cousins, yes, but they weren't meant to be. They were meant as extensions to the desktop experience.  (e.g., Lightroom Mobile lets one work with the RAW images they have in their Lightroom desktop collections.)
    The more powerful Windows tablets can run Photoshop desktop (like Photoshop CC) too.
    @bluebocat: Are you looking for text with a perspective? Like it has a vanishing point? As if it was turned in a certain direction in 3D space?

  • JTextAreaCellRenderer to wrap text in multiple columns... any better way?

    I would like to use a basic JTextArea cell renderer to wrap the text in a JTable cell, like in this thread
    http://forum.java.sun.com/thread.jspa?threadID=664671&messageID=3893724
    Although the technique works, a disadvantage is that it cannot be used "as is" for multiple columns due to the setRowHeight/revalidate issue. One suggested workaround was to keep track of the maximum row height, as described here:
    http://www.javaspecialists.co.za/archive/newsletter.do?issue=106
    Both seem a bit rough. Are there any other options or more efficient techniques for automatically wrapping text in a JTable cell?

    Hello, did you search online? there are many tutorials like this one: http://www.photoshopessentials.com/photoshop-text/text-effects/text-wrap/
    You simply create a path, substract the parts you do not need, then click with the text tool inside.
    Note that it is not a dynamic text wrap, you need to change it if you move the objects around.

  • Outlook 2013 - wrap text group policy applied, not working with or without digital signature

    Hello,
    I'm adding group policies to apply on our new installations of Windows 8.1 with Office 2013. One of the settings being applied is enforcing plain text emails and wrapping text at a certain number of characters. Policies are being added using the Outlook
    2013 admx.
    When I check the options inside Outlook 2013 the group policy did apply successfully (File, Options, Mail, scroll down to Message Format) The option to "Automatically wrap text at character:" is set to 132 and not adjustable as it should be.
    In the group policy I have it set to wrap at 132 characters, but when I go to a client machine and send a digitally signed email, it wraps at the default 76 characters. This makes for very annoying short blocky emails and multi-line hyperlinks.
    If I do not digitally sign the email then the text doesn't wrap at all! (until it meets the end of the window). So under no circumstances is it wrapping at 132 where it's supposed to.
    Thanks,
    -Nick 

    Hi,
    What is your account type in Outlook? Exchange or others?
    Please also let me know the email format that you are sending, Plain Text, HTML or Rich Text Format.
    You can try sending the same emails in Outlook Safe Mode:
    Press Win + R and type “outlook.exe /safe” in the blank box, then press Enter.
    If there’s no problem in Safe Mode, disable the suspicious add-ins to verify which add-ins caused this issue.
    Thanks,
    Melon Chen
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click
    here

  • How to wrap text around a table

    I'm new to Pages. The first thing I tried to do was play with tables, because they are the biggest headache in Microsoft Word. However, I ran into a problem right away--I cannot figure out how to wrap text tightly around a table so that the table is surrounded by text on all four sides.
    Does anyone know how to do this? Seems very basic. There is even a button that shows what I want (Text Wrap drop-down --> Around), but when I click on it, nothing happens.

    Peter,
    I can recreate the appearance with five hard returns after the first paragraph, or instead, changing the After Paragraph spacing to 116 pt. Did this with Baskerville Regular 12 pt with line spacing set at 1. Same Arrange settings as shown by OP.

  • Webforms - Wrap Text/Word Wrap for Column Headings

    I have some member aliases that are set as my webform's column headings, but they are fairly long. Setting the column width to a custom value that fits most of the text in the heading makes the form very wide and ugly to work with. I don't see any option to Wrap Text or use Word Wrap in the column headings. Is there any way to do this?
    Thanks!

    Hi,
    I am not aware of any option which allows you to wrap the text, it may be possible customizing the [CSS |http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/html_hp_admin/ch12s03.html] though to be honest I am not even sure about that and even if it was possible it would apply to all apps.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Cell Wrap Text

    Hi,
    Does the MS Word's cell Options > Wrap text really work? I have XMLP 5.63, Word 2003, and I'm trying to restrict the invoice line description to only 1 line, but it does not seem to work.
    Does anybody have any ideas?
    Thx
    Jo

    Hi Jo,
    You could try this: <?xdofx:substr(DESCRIPTION,1,30)?> where DESCRIPTION is the name of the XML tag of the invoice line description.
    It will show the first 30 characters.
    Succes.
    Norman

  • Wrap text when Viewning PDF file ?

    Hi all,
    is there a way that we can wrap text the PDF file when viewing ?
    the font is quite small even with landscape viewing, and if zoom in, i still cant see the text as they are quite small,
    do you know a way/ a software that we can convert the PDF for better viewing on iphone ?
    thanks alot

    If you use Adobe Reader 9, you have to enable "Enable search highlights  from external highlight server" in "Preferences|Search" .
    For Adobe Reader X read this:
    http://forums.adobe.com/message/3286586

  • In SSRS , after exporting report in excel,wrap text property for cell and freeze column for SSRS table header not working in Excel

    I am working no one SSRS my table headers are freeze cangrow property is false and my report is working perfect while rendering data on RDL and i want same report after exporting in Excel also , i want my table header to be freeze and wrap text property
    to work after exporting in my report in excel but its not working ,is there any solution ? any patch ? any other XML code for different rendering ? 

    Hi Amol,
    According to your description, you find the wrap text property and fix column is not working after exporting into Excel. Right?
    In Reporting Services, when exporting to excel file, it has limitation for textbox.
    Text boxes are rendered within one Excel cell. Font size, font face, decoration, and font style are the only formatting that is supported on individual text within an Excel cell.
    Excel adds a default padding of approximately 3.75 points to the left and right sides of cells. If a text box’s padding settings are less than 3.75 points and is just barely wide enough to accommodate the text, the text may wrap in Excel.
    In this scenario, it supposed to be wrap text unless you merge cells. If cells are merged, word-wrap does not work correctly. If any merged cells exist on a row where a text box is rendered with the
    AutoSize property, autosize will not work. For the Fix Data Property, it can't be working in Excel. These are features when exporting to Excel. We can't change it because it's by design.
    Reference:
    Exporting to Microsoft Excel (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How can I wrap text in a pie in pages?

    How can I wrap text in a pie in pages?

    If you need to insert text into a shape like a pie wedge, the easiest way might be to simply use the shape - freeform tool (at the bottom of the shape menu) and create a shape and type your text in it then place the shape over your pie wedge. The text within the shape should wrap - additional controls for text can be used with the Text Inspector.
    You can edit the actual shape with Format Object > Make Shape Editable option but unfortunately, you have an option to make straight or smooth curves, but not both, so you'll need to shape the object using smooth curves and use the the bezier controls that appear as you select a control point.

  • How do I import an irregular shape into pages to wrap text around?

    I see in the lovely demo how pages can wrap text around an image that is an irregular shape, but they never tell us  how to actually get one onto the iPad. As far as I can tell jpg's and tff's are all that the iPad will work with and those are all square. How do I import an irregularly shaped graphic such as a butterfly or logo into my document? Thanks.

    You must need a PNG with transparent background. I just made one in iDraw and it flows great in Pages.

  • Wrapping text in standard Webdynpro View

    I needed to wrap text in a standard view of the webvdynpro component. I created a enhancement of the view and reduced the width of the root container in the enhancement . I saved it and activated it.  the next time I went to view the details I changed, the details changes were undone. How do I make a permanent change to the width attribute value?

    Using the enhancement framework within a View, you can only add new UI elements or delete existing ones. You can't change the properites of existing UI elements:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/3a/f6ba42a950da11e10000000a155106/frameset.htm

Maybe you are looking for

  • Win XP/Win 7 dual boot question and

    My replacement motherboard for my crapped out Dell one that was a replacement, crapped out the other week and it was tested with a new power supply to no avail. it was also tested in a shortcut, (connecting the two wires directly, the two that "short

  • Adobe Bridge CS4 and Canon Rebel T3

    I purchased a Canon Rebel T3 this week after my Canon Rebel XS died on me.  Unfortunately, the T3 doesn't seem to be compatible with my CS4 Bridge when downloading images from the camera.  It is unable to convert the files to DNG.  Is there an update

  • When I open a document in Firefox with Adobe Reader 9, I am unable to print it (no problem when using Internet Explorer)

    I'm running Windows 7 (64-bit), using Firefox 8.0. When I open a document with Adobe Reader 9, I am unable to do anything with it (print, save, etc.) other than view it. When I use Internet Explorer I don't have this problem.

  • Media converter

    We need a media converter which should convert 1000 Mbps (TP-RJ45) to 1000 Mbps SX (Multi-mode Fiber) The length of the Fiber cable is 1 (One) Kilometer. Fiber Cable Type: 6 Core, 62.5/125µm Connector Type: MM SC connectors is there any type of media

  • Event ID: 4103

    Today early in the morning i found an error in system logs which is shown below: Log Name:      Application Source:        Microsoft-Windows-Winlogon Date:          6/2/2014 3:29:22 PM Event ID:      4103 Task Category: None Level:         Error Keyw