Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在XML/VML中自定义文本框_Php_Xml_Ms Word_Vml_Phpdocx - Fatal编程技术网

Php 在XML/VML中自定义文本框

Php 在XML/VML中自定义文本框,php,xml,ms-word,vml,phpdocx,Php,Xml,Ms Word,Vml,Phpdocx,您好,我正在使用PHPDOCX创建word文档。下面的代码创建了一个文本框,但我在自定义其样式时遇到了问题。如果我能发布一张图片,我就能说明我的问题所在。下面的代码创建一个三个文本框我的问题是文本框中的最后一个文本底部有一个额外的填充,所以看起来文本框底部有一个额外的空白。第二个问题是每个文本框之间都有一个很大的空间,我希望我可以使用边距底部删除它。最后,如何设置文本框中文本的字体大小 更新了图片,希望我现在能得到帮助 $array = array('Drop Units OCAP'

您好,我正在使用PHPDOCX创建word文档。下面的代码创建了一个文本框,但我在自定义其样式时遇到了问题。如果我能发布一张图片,我就能说明我的问题所在。下面的代码创建一个三个文本框我的问题是文本框中的最后一个文本底部有一个额外的填充,所以看起来文本框底部有一个额外的空白。第二个问题是每个文本框之间都有一个很大的空间,我希望我可以使用边距底部删除它。最后,如何设置文本框中文本的字体大小

更新了图片,希望我现在能得到帮助

$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');
$array=array('Drop Units OCAP'
,“放置单元详细信息:将单元放置在载体内”
,“放置单元详细信息:托架内部放置单元放置单元详细信息:托架内部放置单元”);
foreach($array作为$value){
$wordML='1
“.$value。”
';
$docx->addWordML($wordML);
}
$docx->createDocx('example_addTextBox_1');