MergeFiles

文件操作

描述

合併磁碟上的兩個檔案,並將合併後的文件存成新檔。檔案直接在磁碟上存取,整份檔案不必載入記憶體,因此可用於超大文件。檔案不能是加密的;函式執行期間可觀察輸出檔案大小來估算進度

兩份文件的大綱(書籤)、表單欄位與註解都會出現在合併後的文件中

語法

Delphi

Function TPDFlib.MergeFiles(Const FirstFileName, SecondFileName, OutputFileName: WideString): Integer;

ActiveX

Function PDFlib::MergeFiles(FirstFileName As String, SecondFileName As String, OutputFileName As String) As Long

DLL

int DLMergeFiles(int InstanceID, const wchar_t * FirstFileName, const wchar_t * SecondFileName, const wchar_t * OutputFileName);

參數

FirstFileName要合併的第一個檔名。
SecondFileName要合併的第二個檔名。
OutputFileName要建立的檔名,將存放合併後的文件。

傳回值

0無法合併檔案。請用 LastErrorCode 函式判斷失敗原因。
1檔案合併成功,已建立新的合併文件