SaveValidationReport
Compliance
Description
把檔案的結構化驗證報告以 UTF-8 寫到磁碟。
語法
Delphi
Function TPDFlib.SaveValidationReport(Const InputFileName, Password, ReportFileName: WideString; ComplianceTests, Options, ReportFormat: Integer): Integer;參數
| InputFileName | 要驗證的 PDF 檔案。 |
|---|---|
| Password | 開檔所需的密碼;空字串表示無。 |
| ReportFileName | 要寫出的報告檔案;缺少的目錄會自動建立。 |
| ComplianceTests | 選擇檢查項目的位元遮罩:1 = PDF/A,2 = PDF/UA-1,0 = 兩者。 |
| Options | 原樣傳給各項檢查;1 表示每項檢查在第一個發現就停止。 |
| ReportFormat | 0 = XML, 1 = JSON. |
傳回值
| 1 | The report was written. |
|---|---|
| 0 | 未提供報告檔名,或輸入檔案不存在。 |
Remarks
報告內容與 CreateValidationReport 相同,只差交付方式。把報告寫在它所描述產出物的旁邊,建置日誌保持可稽核,又不必把文件留在記憶體裡。
範例
if PDF.SaveValidationReport('invoice.pdf', '', 'reports\invoice.xml', 0, 0, 0)= 0 then
ShowMessage('the report could not be written');另見
CreateValidationReport, SavePreflightReport, SavePreflightReportEx