douke1891 2015-09-15 05:05
浏览 124

文本框以XML / VML自定义

Hi i am creating a word document using PHPDOCX below code creates a textbox but i have problem customizing its style. If i just can post a picture i can show what my problem is. Below codes create a three textbox my problem is the last text inside a text box has an extra padding bottom so it looks like the textbox has an extra empty space at the bottom. Second problem is each textbox has a big space at between them i wish i can remove it using margin-bottom. And last how can i set the font-size of the text inside the textbox.

Updated with picture hope i can get help now

$array = array('Drop Units OCAP'
                ,'Drop Units Details: Drop units inside carriers'
                ,'Drop Units Details: Drop units inside carriers Drop Units Details: Drop units inside carriers');




foreach($array as $value){

    $wordML = '<w:p><w:r><w:pict>
                  <v:shape  type="#_x0000_t202" 
                  style="position:absolute; z-index:99999999; width: 590;    " 
                  fillcolor = "#94BDDA;" strokecolor="none; ">

                      <v:textbox  style="mso-fit-shape-to-text:t; " inset="5pt,0pt,0pt,0pt" >
                        <w:txbxContent>
                           <w:p>
                              <w:r>
                                <w:t> '.$value.'
                                </w:t>
                              </w:r>
                            </w:p>
                        </w:txbxContent>
                      </v:textbox>
                      <w10:wrap type="square"/>
                  </v:shape>
                </w:pict></w:r></w:p>';

    $docx->addWordML($wordML);
}

$docx->createDocx('example_addTextBox_1');

enter image description here

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 支付宝网页转账系统不识别账号
    • ¥15 基于单片机的靶位控制系统
    • ¥15 AT89C51控制8位八段数码管显示时钟。
    • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
    • ¥15 下图接收小电路,谁知道原理
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度
    • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
    • ¥15 ETLCloud 处理json多层级问题