彩票走势图

logo Aspose中文文档

在PHP中快速开始


Aspose.Words是一种高级Word文档处理API,用于执行各种文档管理和操作任务。API支持生成,修改,转换,呈现和打印文档,而无需在跨平台应用程序中直接使用Microsoft Word。

Aspose.Words for .NET 最新下载

附加文档

PHP代码示例:

$dataDir = '.';
$comHelper = new \COM("Aspose.Words.ComHelper");

// Load the destination and source documents from disk.
$dstDoc = $comHelper->Open($dataDir."/TestFile.Destination.doc");
$srcDoc = $comHelper->Open($dataDir."/TestFile.Source.doc");

// Append the source document to the destination document while keeping the original formatting of the source document.
$dstDoc->AppendDocument($srcDoc,1);
$dstDoc->Save($dataDir . "/TestFile Out.docx");
echo "Document appended successfully.\nFile saved at " . $dataDir . "TestFile Out.docx" . PHP_EOL;

下载运行代码

从以下任何一个社交编码网站下载附加文档示例 (Aspose.Words) :

Document到PDF的转换

PHP代码示例

$dataDir = '.';
$comHelper = new \COM("Aspose.Words.ComHelper");
$doc = $comHelper->Open($dataDir."/Template.doc");

// Save the document in PDF format.
$doc->Save($dataDir . "/Doc2PdfSave Out.pdf");
print "Document converted to PDF successfully.\nFile saved at " . $dataDir . "Doc2PdfSave Out.pdf" . PHP_EOL; 

下载运行代码

从以下任何一个社交编码网站下载附加文档示例 (Aspose.Words) :
查找和替换

PHP代码示例:

$dataDir = '.';
$comHelper = new \COM("Aspose.Words.ComHelper");
$doc = $comHelper->Open($dataDir."/ReplaceSimple.doc");

// Check the text of the document
print "Original document text: " . $doc->Range->Text . PHP_EOL;

// Replace the text in the document.
$doc->Range->Replace("_CustomerName_", "James Bond", false, false);

// Check the replacement was made.
print "Original document text: " . $doc->Range->Text . PHP_EOL;

// Save the modified document.
$doc->Save($dataDir . "/ReplaceSimple Out.doc");
print "Text found and replaced successfully.\nFile saved at " . $dataDir . "ReplaceSimple Out.doc" . PHP_EOL;

下载运行代码

从以下任何一个社交编码网站下载附加文档示例 (Aspose.Words) :
HelloWorld 示例

PHP代码

<p>
	<a href="//cahobeh.cn/product/4116" target="_blank"><strong>Aspose.Words</strong></a>是一种高级Word文档处理API,用于执行各种文档管理和操作任务。API支持生成,修改,转换,呈现和打印文档,而无需在跨平台应用程序中直接使用Microsoft Word。
</p>
<p align="center">
	<a href="//cahobeh.cn/product/564/download" target="_blank" class="linkbutton"><strong>Aspose.Words for .NET 最新下载</strong></a> 
</p>
<p>
  <strong>PHP代码</strong>:
</p>
<p>$dataDir = '.';<br>
  $doc = new \COM("Aspose.Words.Document");<br>
  $builder = new \COM("Aspose.Words.DocumentBuilder");<br>
  $builder->Document = $doc;<br>
  $builder->Write("Hello world!");<br>
$doc->Save($dataDir . "/HelloWorld Out.docx");
</p>
<p>
	<strong> 下载运行代码</strong><br />
从以下任何一个社交编码网站下载附加文档示例 (Aspose.Words) :<br />
<ul>
		<li>
			<a href="//github.com/aspose-words/Aspose.Words-for-.NET/tree/master/Plugins/Aspose_Words_NET_for_PHP" target="_blank">GitHub</a>
		</li>
</ul>
</p>

下载运行代码

从以下任何一个社交编码网站下载附加文档示例 (Aspose.Words) :

了解更多aspose旗下产品、及相关授权,欢迎联系或加入技术交流Q群:761297826

Spire.Doc for .NET,Spire.doc,Spire.doc入门教程,Spire.doc授权,Spire.doc下载,word文档转换,分页符

 

扫码咨询


添加微信 立即咨询

电话咨询

客服热线
023-68661681

TOP