Skip to main content
Interwork Corporation
IDR Solutions Product Support Portal
モードの切替 ダーク/ライト/自動 モードの切替 ダーク/ライト/自動 モードの切替 ダーク/ライト/自動

BuildVuは一度に複数のファイルを変換できますか?

はい。BuildVuは同時に複数の変換を実行することができます。変換メソッドは一度に1つのファイルを処理するため、メソッドを並行して呼び出す必要があります。これを実現するにはいくつかのアプローチがあります。

  1. コマンドラインからの変換 を同時に複数起動する。
  2. それぞれの変換をスレッドで起動することで、複数の変換を同時に実行できます。
    これはスレッドプールと変換を送信するメソッドを使用して実現できます。
final ExecutorService pool = Executors.newFixedThreadPool(10);  
public void convertFile(final File pdfFile, final File outputDirectory, final HTMLConversionOptions htmlConversionOptions, final OutputModeOptions outputModeOptions, final String password) {  
    pool.submit(() -> {  
        final PDFtoHTML5Converter converter = new PDFtoHTML5Converter(pdfFile, outputDirectory, htmlConversionOptions, outputModeOptions);  
        if (password != null) { //optional password  
            converter.setPassword(password);  
        }  
        try {  
            converter.convert();  
        } catch (final PdfException e) {  
            System.out.println(e.getMessage());  
        }  
    });  
}  
  1. BuildVu Microserviceを使用して、BuildVuをアプリケーションサーバー またはクラウドプラットフォーム にデプロイし、クライアント 経由で並行変換を送信する。