How to determine column inches in a text frame with intersecting frames?

I am trying to write a script to determine how much text would fit in a text frame before actually having the text. If the frame has no run-around areas intruding on the frame it is the simple depth of the frame. Is there an easy way to determine the area of the frame with the obstructed areas subtracted?

Maybe you could fill text frame with placeholder text:
myTextFrame.contents = TextFrameContents.placeholderText;
Hope that helps.
tomaxxi
http://indisnip.wordpress.com/

Similar Messages

  • How can I use javascript in a Text Area with HTML editor??

    My question is... how can I use javascript in Text Area with HTML editor??
    I can use javascript functions that change the content of Text Areas but i can´t if i try in text area with html editor....
    I need to limit number of characters in a text area with html editor and i can´t.
    could anybody help me please?

    I have been experiencing similar problems with the HTML Editor and have managed to find an answer that should start to answer some of my questions. The Apex HTML Editor Standard is actually an HTML editor called FCKeditor. The FCKeditor has a Javascript API that can be found at http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/JavaScript_API. Unfortuately this doesn't seem to give the whole answer and I found more at http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:49607.
    I needed to get the text entered within my html editor standard (e.g. P1_MYTEXT) and use it within my javascript function. I did this by using the following script
    <script language="JavaScript" type="text/javascript">
    function showtext(){
    var oEditor = FCKeditorAPI.GetInstance('P1_MYTEXT');
    var editortext = escape(oEditor.GetXHTML(oEditor.FormatOutput));
    alert(editortext);
    </script>
    Hope this helps.
    Matthew

  • How to add an animation to a text field with two lines?

    I have a text field with two or more lines. Why isn't it possible now to apply a text animation?

    For certain tasks, Titler and its Presets can be very good, and can simplify things greatly.
    However, when one gets beyond the limitations of the Titler, I really like to create my Titles in Photoshop, and Import those as Still Images into my Project. I then use the power of Keyframing various Effects over time. This allows me much more control, BUT does require more hand-work. Still, that added control is too important to me, and I sort of like doing the handwork.
    For the "alignment" of multiple Titles, to get multiple lines of Text, you can create the first Title, and then chose Duplicate Title. Initially, that will be identical, but you just change it, as is necessary. After you have changed that "second line of Text," place that Duplicate on the next Video Track, above the first Title, and use the Fixed Effect>Motion>Position, to move it down, to where it would be (by the height of the font, plus any desired Leading), if one had created a second line of Text on one Title.
    I also like to use Alignment Grids, when things get critical, and create those in Photoshop, with a trasparent background, and just place them, on say Video Track 2, with all of my Titles above that. Just do not forget to remove any Alignment Grids, before you Export/Share the Timeline, or they will be part of the output video.
    For more background on Keyframing (so very useful with more than just Titles), Steve Grisetti has done a multi-part tutorial, available as Basic Keyframing on Muvipix.com. I highly recommend it. Keyframing is simple to do, but can be a bit of a tough concept to grasp initially, and it's a subject that is tough to write about - takes longer to type instructions, than to do the work.
    Good luck,
    Hunt
    PS - Do not know if you saw them, but Titler has two Alignment Tools - Align Horizontally, and Align Vertically, that can be helpful to center Text.

  • How to determine column length semantics through ANSI Dynamic SQL ?

    I am looking for a way to determine the length semantics used for a column through ANSI Dynamic SQL.
    I have a database with NLS_CHARACTERSET=AL32UTF8.
    In this database I have the following table:
    T1(C1 varchar2(10 char), C2 varchar2(40 byte))
    When I describe this table in SQL*Plus, I get:
    C1 VARCHAR2(10 CHAR)
    C2 VARCHAR2(40)
    In my Pro*C program (mode=ansi), I get the select statement on input, use PREPARE method to prepare it and then use the GET DESCRIPTOR method to obtain colum information for output:
    GET DESCRIPTOR 'output_descriptor' VALUE :col_num
    :name = NAME, :type = TYPE,
    :length = LENGTH, :octet_length = OCTET_LENGTH
    For both C1 and C2 I get the following:
    :type=12
    :length=40
    :octet_length=40
    So, even if I know that my database is AL32UTF8, there doesn't seem to be a way for me to determine whether char or byte length semantics were used in C1 and C2 column definitions.
    Does anybody know how I can obtain this information through ANSI Dynamic SQL?
    Note: the use of system views such as ALL_TAB_COLUMNS is not an option, since we wish to obtain this information even for columns in a complex select statements which may involve multiple tables.
    Note: I believe OCI provides the information that we need through OCI_ATTR_DATA_SIZE (which is in bytes) and OCI_ATTR_CHAR_SIZE (which is in chars). However, switching to OCI is something we would like to avoid at this point.

    Yes, I was wondering which forum would be the best for my question. I see similar questions in various forums, Call Interface, SQL and PL/SQL and Database - General. Unfortunately there is no Pro*C or Dynamic SQL forum which would be my first choice for posting this question.
    Anyway I now posted the same question (same subject) in the Call Interface forum, so hopefully I'll get some answers there.
    Thank you for the suggestion.

  • How to determine the size of selected text

    Hi
    I'd like to draw a box around some selected text (a textRange), however I can't figure out how to detemine the size or position of the text.  The overall size of a textFrame is possible to find (not sure about position), but when you've got just a few characters selected I don't see any way to get the size or position.  Any ideas?

    You may have to do some testing of your own with this… I tested here and 'think' its OK but could have overlooked something… For me the best way to get this data is to outline the type store the info in a variable then undo the outlining process… You can then continue your script with info in hand… An example that draws a box over each selected character… I cheated with only the one text frame but you can resolve that? You could easy use math.min & math.max to draw around an array of bounds… I didn't bother with a load of tests it expects selected text range as is… have fun…
    #target Illustrator
    textBoxer();
    function textBoxer() {
              var i, doc, sel, start, end, spaceB4, spaceInc, mat, grp, count, boxes;
              doc = app.activeDocument;
              sel = doc.selection;
              start = sel.characterOffset-1; // Not zero based…
              end = start + sel.length;
              doc.selection = null;
              spaceB4 = doc.textFrames[0].contents.substr( 0, start );  // Cheated here you will need to find parent frame…
              mat = spaceB4.match( /\s/g ); // Resolve the lost of white space characters before selection
              mat != null ? spaceB4 = mat.length : spaceB4 = 0;
              spaceInc = doc.textFrames[0].contents.substr( 0, end );  // Here too…
              mat = spaceInc.match( /\s/g ); // Resolve the lost of white space characters in selection
              mat != null ? spaceInc = mat.length : spaceInc = 0;
              grp = doc.textFrames[0].createOutline(); // Items in new group are last to first order
              app.redraw();
              count = grp.compoundPathItems.length;
              boxes = Array();
              for ( i = 0; i < count; i++ ) {
                        boxes.push( grp.compoundPathItems[i].visibleBounds );
              boxes.reverse(); // Fix the order
              app.undo(); // Bounce back…
              app.redraw();
              start = start - spaceB4;
              end = end - spaceInc;
              for ( i = start; i < end; i++ ) {
                                  doc.pathItems.rectangle( boxes[i][1], boxes[i][0], boxes[i][2]-boxes[i][0], -boxes[i][3]- -boxes[i][1], false );
              app.redraw();

  • How to store/manipulate Date and long text fields with Dictionary project

    I am able to save string values into my backend (SQL Server) database in my web dynpro project but I am getting errors dealing with my date string and my long text (comments) field. 
    I want to figure out both how I need to define the fields in the dictionary project, how to define the context variables in web dynpro, and how to code the statements to pull the values out of the context and into fields I can use in my SQL insert. 
    Currently I have the date defined in the dictionary project as "date" and the comments as a 256-character string. 
    In the web dynpro context I have the date field defined as "date" and the comments field defined as "string".  Should I define a 256-character string type and use that as field type??
    In the code I am using the following to get the values:
         String s9 = (String) wdContext.nodeReceipt().getElementAt(wdContext.nodeReceipt().getLeadSelection()).getAttributeValue("Comments");
    String s5 = (String) wdContext.nodeReceipt().getElementAt(wdContext.nodeReceipt().getLeadSelection()).getAttributeValue("DateReceived");
    SimpleDateFormat sdf = new SimpleDateFormat("dd/mm/yyyy");
         try {
         Date dt = sdf.parse(s5);
         } catch (Exception e) {
              e.printStackTrace();
    I then try to insert all of my values with the following code:
    InitialContext ctx = new InitialContext();
      javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup("jdbc/SAP/BC_JMS");
      java.sql.Connection con = ds.getConnection();
      java.sql.Statement stmt = con.createStatement();
      stmt.executeUpdate("insert into AVD_GEN_REC(VENDOR,DATE_RECEIVED,TOTAL_PIECES,LOGGED_BY," +
           "ADDRESSED_TO,BLDG_NO,CARRIER,TRACKING_NO, COMMENTS) values('s1','s5','s2','s6','s3','s7','s4','s8','s9')");
       } catch (Exception e) {
             wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("Exception "+e.getMessage());
    Any help/ideas would be appreciated...

    The comment error seems to have resolved itself but I still get an error with the date field:
    Exception The SQL statement "INSERT INTO "AVD_GEN_REC" ("VENDOR","DATE_RECEIVED","TOTAL_PIECES","LOGGED_BY","ADDRESSED_TO","BLDG_NO","CARRIER","TRACKING_NO","COMMENTS") VALUES ('s1','d5','s2','s6','s3','s7','s4','s8','s9')" contains the semantics error[s]: type check error: new value (element number 2) is not assignable to column "DATE_RECEIVED" 
    The DATE_RECEIVED is defined in the data dictionary as "date", the context variable "DateReceived" is also a "date", and the statement to pull d5 is being stored to a "Date".  Is there a difference between the "Date" and "date"?
    Date d5   = wdContext.currentReceiptElement().getDateReceived();

  • Forms: How to set a maximum size in Text Fields with automatic size

    ¡Hi!
    When I set a text field on my forms and I use automatic size for te text that the user can write, if the user don't need more space than the field size, when the text appears, Adobe Acrobat Pro always set the text-size to 14 or higher. How can I set a maximum size for that text? For example... 12 or 10...
    Thank you very much,
    Best regards from Spain,
    David.

    Ok. If I use a single line text field, changing the height of the field seems to be a simple way to solve the problem, but... what should I do when the fields are multi-lineal?
    Thanx for your quick answer.

  • How to send a "Message" that has text along with a photo

    I take a photo with my iPhone5.
    I want to send both the photo and a brief message along with it.
    I touch the little arrow in the lower left hand side.
    If I select "Message" there does not appear to be any way to enter even a minimal amount of text.
    I know that I can "Email" it but this seems overkill.
    How can I send a "Message" that contains both a photo and text?
    Thank you.

    After selecting Message, you should see the pic in a white message box.  Just tap the screen in the box under the message.

  • How to Write Waveform graph data to Text File with user option to do so

    So, I'm new to labview and am having trouble writing one program in particular.  I have a waveform graph that runs for 120 seconds generating a sine curve.  I am, however, having a difficult time getting the program to write the x and y coordinates into a text file.  I have attached what I have so far.  
    The first task I was assigned was to write a program that creates a snusoidal curve on the front pannel adding one data point each half second for 120 seconds.  The plot should only start when the user presses a start button.
    The next part involves giving the user an option to write the generated data to a spreadsheet file called "sine.txt".  The file name and location should be hardcoded.  The file should contain the x and y coordinates of each data point in columns separated by tabs, also known as delimited.
    I have spent several hours tweaking the attached program and I just can't seem to get it to work right.  Any suggestions would help at this point.
    Sincerely,
    A frustrated chemistry student whose research mentor is out of town
    Solved!
    Go to Solution.
    Attachments:
    Sinusoidal Curve (saving to excel).vi ‏45 KB

    First, you are not creating Excel files.  You are creating text files.  And it seems that your Write to file is already creating X (time) vs. Y (data curve) that is tab delimited.
    Everything else you are doing is just too complicated or a Rube Goldberg.
    All you need is the attached.
    Attachments:
    Sinusoidal_Curve_(saving_to_Text_file).vi ‏69 KB

  • How to determine # of recs in the data grid - with filter being used

    Say I'm looking at table or view that has 10,000 rows. I put a filter on the filter line such as state = 'WA'. Let's say the data grid (where I see the data clicking the 'data' button) now has 2,500 rows with the filter in effect.
    So, how do I tell how many rows are in the data grid now? I can see how to retrieve the total number of rows for the table or view, but how when a filter is in effect.
    Thanks.

    Okay thanks.
    Sure would have preferred to see (dare I say ... like TOAD) where you can just right click in the data grid and choose record count.
    But thanks - I'll use the COUNT method (till of course it's added 8-)
    Russ

  • Can Pages count column inches

    I work for a small newspaper. My former edtitor, now retired, writes a syndicated column that he sells to a few weekly papers. When he retired I set up our company's old, old newswriting software on his OS9 iMac.
    Now he's getting a different Mac that doesn't support the old software and he's asking me how he can type his column and know how long it is in column inches.
    In his old software he could type in and document without an established width and it would tell him, based on preference settings, how many inches deep it would be. I'm not familar with Pages but I doubt if it has that functionality.
    Thanks.

    Hi jt,
    Pages won't calculate a specific number of column inches, but it does have several tools that will enable a close estimate, given the necessity to set some preferences.
    Here's an example.
    Tool number 1 is the pair of page rulers. The horizontal one at the top is used to set margin stops to fix a maximum line length. For the example, I've left the left margin at the default 1 inch and set the right margin at 7 in, giving a six inch line of text for two 3" columns.
    The Document Inspector gives a 'live' count of several document statistics, including number of lines in the document as currently formatted.
    In the left margin, I've inserted a series of text boxes, each with a pair of numbers inserted. The first gives the number of inches filled with text to that point (or column-inches for a single column document), the second gives the number of column inches for this text in a two column document, where the columns are each half the length of the line set for the document.
    The text boxes and horizontal lines were placed with each line at an inch mark on the ruler, then wereGrouped into a single object. The grouped object was moved to the Background layer (Arrange menu), then to the Section Master (Format menu > Advanced). Placed as a Master Object, the lines will be visible on every page of a multi-page document.
    That may be enough information to let you construct a template he can use in Pages. If there are still questions, please post them in a reply.
    Regards,
    Barry
    Were I to re-do the page, i would set the top and bottom margins of the page to 0.5 inches, to allow 10 inches of typing space, making the column inch calculations easier for pieces beyond a full page in length.

  • Text element with line item content and include text

    Hi All,
    How to write in smartform in single text element with line item content and include text.I am using this text element in table . Pls help me out. i am writing the include command in text element ,but this command is not enough for single line of text editor.
    thanks ,
    Rakesh singh

    I have been pulling my hair out for a few days trying to find
    this solution. This fixed my problems as well.
    I was getting ready to scrap the Report Builder altogether
    and move to SQL Server Reporting Services over this issue.
    I'm running 7.0.2 also, that version alone fixed many small
    issues like creating borders and such.
    Thanks

  • How to Determine Text File Encoding is UNICODE

    Hi Gurus,
    How to determine whether the file is a UNICODE format or not?
    I have the file stored as a BLOB column in a table
    Thanks,
    Sombit

    That's a rather hard problem. You would, realistically, either have to make a bunch of simplifying assumptions based on the data or you would want to buy a commercial tool that does character set detection.
    There are a number of different ways to encode Unicode (UTF-8, UTF-16, UTF-32, USC-2, etc.) and a number of different versions of the Unicode standard. UTF-8 is one of the more common ways to encode Unicode. But it is popular precisely because the first 127 characters (which is the majority of what you'd find in English text) are encoded identically to 7-bit ASCII. Depending on the size and contents of the document, it may not be possible to determine whether the data is encoded in 7-bit ASCII, UTF-8, or one of the various single-byte character sets that are built off of 7-bit ASCII (ISO 8859-15, Windows-1252, ISO 8859-1, etc).
    Depending on how many different character sets you are trying to distinguish between, you'd have to look for binary values that are valid in one character set and not in another.
    Justin

  • How to find the ID of the text item of the column in an tabular form

    Hello,
    I have created a tabular form report on emp table and made ONE OF THE COLUMN department_id as an text item using APEX_ITEM.TEXT APIs.
    My select query is
    select
    "EMPLOYEE_ID",
    "EMPLOYEE_ID" EMPLOYEE_ID_DISPLAY,
    "FIRST_NAME",
    "LAST_NAME",
    "HIRE_DATE",
    "JOB_ID",
    "SALARY",
    "MANAGER_ID",
    APEX_ITEM.TEXT(3,department_id,20,50,'readonly=true') department_id
    from "#OWNER#"."OEHR_EMPLOYEES"
    now how can i find the item ID?
    one more thing is that how would i reference this item in an javascript function.
    anyone plz help me out with this.
    thanks.

    Hi,
    Firstly, your link must include "this" to ensure that any javascript knows which link has been clicked. So, change:
    onclick="javascript:report();"to
    onclick="javascript:report(this);"Next, your javascript code must take this value and find the related DEPTNO item on the same row. The URL must pass to the popup page the name of the ID that needs to be updated - this is held in the f10 variable in the following script. This means that you popup page must be able to receive this value so that it can use it to update the DEPTNO item when a value is selected. Your popup page seems to be page number 4, so I will assume that you have a P4_ITEM_ID hidden item on that page for this purpose. So, the javascript on the main page would be something like:
    function report(x)
    var f10;
    var p = x.parentNode;
    while (p.tagName != "TR")
      p = p.parentNode;
    var inputs = p.getElementsByTagName("INPUT");
    var zz;
    for (zz = 0; zz < inputs.length; zz++)
      if (inputs[zz].name = 'f10')
       f01 = inputs[zz].id;
    var url;
    url = 'f?p=&APP_ID.:4:&APP_SESSION.::::P4_ITEM_ID:' + f10;
    var w = open(url,"winLov","Scrollbars=1,resizable=1,width=450,height=600");
    if (w.opener == null)
       w.opener = self;
    w.focus();
    }So, when the user clicks a link, the report() function is called and the object clicked is passed as a parameter. The script then starts from this object and goes up to the TR tag that the link is on. From here, it finds all INPUT items and then looks at those to find one that has a name attribute of "f10". When it finds it, it stores the ID of that in the "f10" variable. It then constructs a URL using this variable which is set into the P4_ITEM_ID hidden item on the popup page.
    I don't know what your javascript is on the popup, but it would need to get the value out of P4_ITEM_ID to see which main page item needs updating. This could be something like:
    function passBack(val)
      var id = $v('P4_ITEM_ID');
      opener.document.getElementById(id).value = val;
      window.close();
    }This script looks in the P4_ITEM_ID hidden item and gets its value - this will be the ID of the item to update on the main page. It then does the update and closes the popup.
    Andy

  • How to change the "name of column" property of an text item in runtime?

    How to change the "name of column" property of an text item in runtime?
    I look the properties of items in help and found nothing about this!
    It's possible?

    Hi,
    an other solution is change the block property QUERY_DATA_SOURCE_TYPE from "Table" to "Sub-query" , than change at run time the property QUERY_DATA_SOURCE_NAME.
    First create block and add items
    The QUERY_DATA_SOURCE_NAME will be for ex. "Select 'A' as col1, 'B' AS col2, 'C' as col3 from dual"
    Set into items the column name property to col1 , col2 ...
    At run time change the query to "Select 'Z' as col1, 'X' as col2 , 'Y' as col3 from dual"
    in this way you can change the source of column value.
    Caution because if you change value type from varchar2 to date you must cast date into varchar2.
    May be that this way is valid only for view data not for insert-update, i don't remember.
    bye
    Message was edited by:
    Killernero

Maybe you are looking for

  • I accidentally updated to Firefox 4, but my computer is too old. How can I undo the download and get back to pre-Firefox 4?

    I had already removed the previous firefox icon from my computer, and after having replaced it in my applications folder, I discovered that it would not run on my computer.

  • Manage it with File or with Socket Programming?

    I want to view a directory in a FTP Server and it's sub directory I think there are 3 method to achieve it : first, with Socket.For this one,I have to read the FTP protocol. second, transform that directory into a InputStream. Then read every line fr

  • How does Java file I/O move files?

    I'm working support for an integration platform, and there's a problem at a customer that seems to crop up once in a blue moon, yet still all to often. Its a bit difficult to track down, because they are using an old piece of software that is not off

  • G5 Startup Failure

    What action do I take to correct the following on my G5 (June 04) dual processor: On safe boot there is an error mapping AppleIntel CPUPower Management.  Can't allocate class.  This occured after taking many steps described in the technical resource

  • Encrypt function in 10g - RAW maximum size issue

    Hello, I m trying to encrypt some data using the ENCRYPT function provided by Oracle 10g. It appears that the function uses only RAW type and RAW apparently has a maximum size of 2000 bytes. And in my situation, the RAW data I would get after encrypt