Created
November 6, 2017 13:15
-
-
Save toshimasa-nanaki/95082210a3373cd2b02f74108e8890e9 to your computer and use it in GitHub Desktop.
JODConverter4.1.0 tmpファイルエラー
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import org.jodconverter.DocumentConverter; | |
import org.jodconverter.LocalConverter; | |
import org.jodconverter.office.LocalOfficeManager; | |
import org.jodconverter.office.OfficeException; | |
import org.jodconverter.office.OfficeManager; | |
public class LibrePdfOutputTest { | |
public static final String SRC_FILE_PATH = "D:\\temp\\test.tmp"; | |
public static final String DEST_FILE_PATH = "D:\\temp\\test.pdf"; | |
public static void main(String[] args) throws OfficeException { | |
File srcFile = new File(SRC_FILE_PATH); | |
File destFile = new File(DEST_FILE_PATH); | |
OfficeManager officeManager = LocalOfficeManager.make(); | |
DocumentConverter converter = LocalConverter.make(officeManager); | |
officeManager.start(); | |
try { | |
converter.convert(srcFile).to(destFile).execute(); | |
} finally { | |
officeManager.stop(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment