Categories > OpenTBS with DOCX >

Losing Spaces in .docx

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: David
Date: 2012-06-15
Time: 19:45

Losing Spaces in .docx

When using OpenTBS to fill in a .docx template I am losing the space between words when the second word is underlined or italicized.  Examples include:
tempalte:
own money, an opportunity cost
italicized starting with opportunity
completed docx:
money, anopportunity cost
*1

tempalte:
this value the underlying interest rate
italicized starting with underlying
result:
this value theunderlying interest rate
*2


As an experiment I tried adding a double space in the template but still have the same problem.
template:
return will be 40% or more  if the investment
the word if is underlined
finished docx:
return will be 40% or moreif the investment

But it does not happen everywhere:
money on a level playing field, we
works even though "level playing field" is italicized.*3

*Using $TBS->Plugin(OPENTBS_DEBUG_XML_SHOW); I show this:

*1
   <w:r>
    <w:t>
     , we use a value that disregards whether it is obtained on a borrowed or opportunity cost basis.  Instead we use the current prime rate and add 2 points to it.  We call this value the
    </w:t>
   </w:r>
   <w:r>
    <w:rPr>
     <w:i/>
    </w:rPr>
    <w:t>
     underlying interest rate
    </w:t>
   </w:r>
   <w:r>
    <w:t>
     .
    </w:t>
   </w:r>
  </w:p>

*2
   <w:r>
    <w:t>
     The excess earnings method of valuation takes into account the fact that a buyer will have to tie up some money in the business being bought.  A buyer may purchase the firm with his or her own cash, with borrowed money, or with some combination of the two.   To borrow money, a buyer would have to pay interest at a rate of 1 to 4 points over the current prime interest rate.  If a buyer uses his or her own money, an
    </w:t>
   </w:r>
   <w:r>
    <w:rPr>
     <w:i/>
    </w:rPr>
    <w:t>
     opportunity cost
    </w:t>
   </w:r>
   <w:r>
    <w:t xml:space="preserve">
     for the money must be considered.  That is, the same money can be put into any number of alternative investments and earn a return in the form of interest, dividends, or both.
    </w:t>
   </w:r>
  </w:p>

*3
cost of money on a
    </w:t>
   </w:r>
   <w:r>
    <w:rPr>
     <w:i/>
    </w:rPr>
    <w:t>
     level playing field
    </w:t>
   </w:r>
   <w:r>
    <w:t>
By: Skrol29
Date: 2012-06-15
Time: 22:40

Re: Losing Spaces in .docx

Hi David,

This problem should be fixed with the last release: version 1.7.6, available since one week.
By: David
Date: 2012-06-15
Time: 22:51

Re: Losing Spaces in .docx

Thank you.