質問
FTPサーバにOCR結果(CSV,TXT等)をエクスポートすることは可能ですか。FTPサーバをマウントすることはセキュリティ上できないため、フォルダ参照でエクスポートする事ができません。
回答
FTPサーバへのエクスポートはカスタムエクスポートのみで行うことができます。
エクスポートのスクリプトでは、文書のフィールドから値を取得し、FTPにMemoryStreamとしてアップロードすることができます。
例:
using System;
using System.IO;
using System.Text;
using Renci.SshNet;
var authMethod = new PasswordAuthenticationMethod("User", "Password");
var connectionInfo = new ConnectionInfo("xxx.xxx.xxx.xx", 22, "User", authMethod);
using (var client = new SftpClient(connectionInfo))
{
client.Connect();
byte[] byteArray = Encoding.UTF8.GetBytes("abc");
MemoryStream fs = new MemoryStream(byteArray);
client.UploadFile(fs, "export.csv", true);
client.Disconnect();
}
追加情報
エクスポートの様々なタイプについて:
https://help.abbyy.com/ja-jp/flexicapture/12/distributed_administrator/export_main
カスタムエクスポートについて:
https://help.abbyy.com/ja-jp/flexicapture/12/distributed_administrator/script_export
カスタムエクスポートの設定について:
https://help.abbyy.com/ja-jp/flexicapture/12/distributed_administrator/export_script
スクリプトのサンプル:
https://help.abbyy.com/ja-jp/flexicapture/12/developer/scripting_export_ex
コメント
0件のコメント
サインインしてコメントを残してください。