문제

I'm using openTBS to convert data from a mysql db (via PHP) to some word and excel docs.

One of my problems is, openTBS is deleting lots of spaces near the tags..

blablabla [base_sub1.value] blablabla

and the output is

blablablavalue blablabla

or

blablablavalueblablabla

Is there any way to solve this?

도움이 되었습니까?

해결책

Ms Word often cut the inner XML content because of formating, spelling and version history. This may cause OpenTBS to loose some space at those place because dealing with attribute xml:space="preserve" becomes too complicated.

Since OpenTBS version 1.7.6, such space problem are fixed in the main body. There may still have problems in other special parts such as headers and footers.

Otherwise, most of the time if you cut the TBS tag and paste it on the same place that fixes the problem. Or cut and do a special paste as "Unformatted text".

Otherwise, in order to avoid the space errors, you must do as following during the template edition:

  1. Avoid internal Review markers:
    • If you have Word 2003, go to the menu Tools, choose Options, then tab Security and uncheck the box “Store random number to improve merge accuracy”.
    • If you have Word 2007 or higher, go to the Trust Center in the Word options, and turn off the setting: "Store random number to improve combine accuracy".
    • If you have Office for Mac 2011, then unfortunately this option does not exist yet. Try to copy all the document and past in a new document.
  2. Avoid Spelling markers: Each time you enter a new TBS tag or each time you apply a format over a TBS tag, select it and click on the Review ribbon, in the Proofing group, click the Set Language button. In the dialog, make sure the "Do not check spelling or grammar" box is checked.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top