• <menu id="w2i4a"></menu>
  • logo Aspose中文文檔

    文檔首頁>>Aspose中文文檔>>在PHP中快速開始

    在PHP中快速開始


    Aspose.Words是一種高級Word文檔處理API,用于執(zhí)行各種文檔管理和操作任務(wù)。API支持生成,修改,轉(zhuǎn)換,呈現(xiàn)和打印文檔,而無需在跨平臺應(yīng)用程序中直接使用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;

    下載運行代碼

    從以下任何一個社交編碼網(wǎng)站下載附加文檔示例 (Aspose.Words) :

    Document到PDF的轉(zhuǎn)換

    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; 

    下載運行代碼

    從以下任何一個社交編碼網(wǎng)站下載附加文檔示例 (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;

    下載運行代碼

    從以下任何一個社交編碼網(wǎng)站下載附加文檔示例 (Aspose.Words) :
    HelloWorld 示例

    PHP代碼

    <p>
    	<a href="http://www.xiangyinys.com/product/4116" target="_blank"><strong>Aspose.Words</strong></a>是一種高級Word文檔處理API,用于執(zhí)行各種文檔管理和操作任務(wù)。API支持生成,修改,轉(zhuǎn)換,呈現(xiàn)和打印文檔,而無需在跨平臺應(yīng)用程序中直接使用Microsoft Word。
    </p>
    <p align="center">
    	<a href="http://www.xiangyinys.com/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 />
    從以下任何一個社交編碼網(wǎng)站下載附加文檔示例 (Aspose.Words) :<br />
    <ul>
    		<li>
    			<a  target="_blank">GitHub</a>
    		</li>
    </ul>
    </p>

    下載運行代碼

    從以下任何一個社交編碼網(wǎng)站下載附加文檔示例 (Aspose.Words) :

    了解更多aspose旗下產(chǎn)品、及相關(guān)授權(quán),歡迎聯(lián)系在線客服,或加入技術(shù)交流Q群:761297826

    Spire.Doc for .NET,Spire.doc,Spire.doc入門教程,Spire.doc授權(quán),Spire.doc下載,word文檔轉(zhuǎn)換,分頁符

     

    掃碼咨詢


    添加微信 立即咨詢

    電話咨詢

    客服熱線
    023-68661681

    TOP
    三级成人熟女影院,欧美午夜成人精品视频,亚洲国产成人乱色在线观看,色中色成人论坛 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();