public class FileConverterSettings extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
CONVERT_LOCK_TIMOUT
判定转换锁的失效时间。
|
static int |
CONVERT_TASK_TIMEOUT
转换任务的超时时间,单位:毫秒。
|
static String |
PAGED_FILE_DIR_SUFFIX
储存分页文件的子目录后缀。
|
static String |
SUFFIX_LOCK
标志一个任务正在进行的锁文件扩展名
|
static String |
TASK_FILE_EXT
记录转换任务信息的临时文件的扩展名。
|
| 构造器和说明 |
|---|
FileConverterSettings() |
| 限定符和类型 | 方法和说明 |
|---|---|
com.kdgcsoft.power.excel2html.HtmlTemplate |
getExcel2HtmlTemplate()
当前Excel2Html输出的Html模板对象。
|
String |
getExcel2HtmlTemplateStr()
当前Excel2Html输出的Html模板字符串。
|
com.kdgcsoft.power.doc2html.IHtmlWriter |
getHtmlWriter()
返回针对multiple_pic_html输出类型的HTML生成器。
|
File |
getIncomingDir()
获取工作目录下用于存储临时文件的目录。
|
int |
getMaxConvertThread()
获取最大并发转换数
|
Office2PdfEngineType |
getOffice2PdfEngine()
获取当前的基础转换引擎。
|
String |
getOpenOfficePath()
获得当前设置的LibreOffice/OpenOffice的安装目录。
|
int[] |
getOpenOfficePorts()
获取所设置的OpenOffice/LibreOffice监听端口。
|
String |
getPdf2HtmlExePath()
获取PDF2HtmlEx可执行程序的全路径,包含文件名。
|
File |
getStorageDir()
获取工作目录下用于存储转换后文件的根目录
|
StorageType |
getStorageType()
获取存储目录结构组织方式
|
static String |
getTypeExtension(OutputType outType)
获取输出类型所对应的转换后文件的扩展名
|
File |
getWorkdir()
获取文档转换工作目录
|
boolean |
isAlsoStorageOriginalFile()
返回当前是否在转换后的文档存储库中保存源文件的开关状态。
|
boolean |
isExcel2HtmlHideTabIfOnlyOne()
Excel2Html转换时,如果只有一个Sheet,则是否隐藏该Sheet的Tab标签。
|
boolean |
isExcel2HtmlShowHeaders()
Excel2Html转换时是否显示行列坐标。
|
boolean |
isExcel2htmlShowHiddenContent()
Excel2Html转换时是否在HTML中隐藏Excel中隐藏的行列。
|
boolean |
isOffice2PdfFirst()
在可能的情况下是否先把Office文档(除Excel)转换为PDF,再转换为其他格式,以获得更好的效果。
|
boolean |
isTestMode()
设置为测试模式。
|
void |
setAlsoStorageOriginalFile(boolean alsoStorageOriginalFile)
设置是否在转换后的文档存储库中保存源文件。
|
void |
setExcel2HtmlHideTabIfOnlyOne(boolean excel2html_hideTabIfOnlyOne)
Excel2Html转换时,如果只有一个Sheet,则是否隐藏该Sheet的Tab标签。
|
void |
setExcel2HtmlShowHeaders(boolean excel2html_showHeaders)
Excel2Html转换时是否显示行列坐标。
|
void |
setExcel2HtmlShowHiddenContent(boolean excel2html_showHiddenContent)
Excel2Html转换时是否在HTML中隐藏Excel中的隐藏内容。
|
void |
setExcel2HtmlTemplateStr(String excel2html_htmlTemplate)
定制Excel2Html输出的Html模板字符串。
|
void |
setHtmlWriter(com.kdgcsoft.power.doc2html.IHtmlWriter htmlWriter)
设置针对multiple_pic_html输出类型的HTML生成器
|
void |
setMaxConvertThread(int threadNumber)
设置最大并发转换数。
|
void |
setOffice2PdfEngine(Office2PdfEngineType convertEngine)
设置Office文档外部转换引擎。
|
void |
setOffice2PdfFirst(boolean isOffice2PdfFirst)
在进行某些转换时,是否把Office文档(Excel除外)先转换为PDF,以获得更好效果。
|
void |
setOpenOfficePath(String path)
当使用OpenOffice/LibreOffice作为缺省转换引擎时,如果没有安装在默认路径下,则需要指定安装路径。
|
void |
setOpenOfficePorts(int[] listenPorts)
已过时。
可以自动探测空闲端口,不再需要指定
|
void |
setPdf2HtmlExePath(String path)
当希望使用PDF2HtmlEx作为PDF转HTML引擎时,需要指定PDF2HtmlEx可执行文件的位置,例如:"C:\\pdf2htmlEx\\pdf2htmlEX.exe"。
|
void |
setStorageType(StorageType storType)
设置存储目录结构组织方式。
|
void |
setTestMode(boolean isTestMode)
设置为测试模式。
|
void |
setWorkdir(File dir)
设置文档转换的工作目录
|
public static final String TASK_FILE_EXT
public static final String PAGED_FILE_DIR_SUFFIX
public static final int CONVERT_TASK_TIMEOUT
public static final int CONVERT_LOCK_TIMOUT
public static String getTypeExtension(OutputType outType)
outType - 输出格式public File getWorkdir()
public void setWorkdir(File dir) throws IOException
dir - 工作目录IOException - IO异常public File getIncomingDir()
public File getStorageDir()
public int getMaxConvertThread()
public void setMaxConvertThread(int threadNumber)
threadNumber - 最大并发数public boolean isOffice2PdfFirst()
public void setOffice2PdfFirst(boolean isOffice2PdfFirst)
setOffice2PdfEngine(Office2PdfEngineType)设置一个外部转换引擎。isOffice2PdfFirst - 在可能的情况下是否先转换成PDFpublic Office2PdfEngineType getOffice2PdfEngine()
public void setOffice2PdfEngine(Office2PdfEngineType convertEngine)
convertEngine - 转换引擎枚举。参见Office2PdfEngineTypepublic StorageType getStorageType()
public void setStorageType(StorageType storType)
storType - 存储结构方式枚举,参见StorageTypepublic String getOpenOfficePath()
public void setOpenOfficePath(String path)
path - OpenOffice/LibreOffice的安装目录public int[] getOpenOfficePorts()
@Deprecated public void setOpenOfficePorts(int[] listenPorts)
listenPorts - 监听的端口号数组public String getPdf2HtmlExePath()
public void setPdf2HtmlExePath(String path)
setOffice2PdfEngine(Office2PdfEngineType)设置的基础转换引擎尝试转换PDF为HTML(有可能不支持)。
默认路径为:D:\\pdf2htmlEX\\pdf2htmlEX.exepath - PDF2HtmlEx可执行文件的路径public boolean isExcel2HtmlShowHeaders()
public void setExcel2HtmlShowHeaders(boolean excel2html_showHeaders)
excel2html_showHeaders - 是否显示行列坐标public boolean isExcel2htmlShowHiddenContent()
public void setExcel2HtmlShowHiddenContent(boolean excel2html_showHiddenContent)
excel2html_showHiddenContent - 是否显示Excel中的隐藏内容Excel2Html.setShowHiddenContent(boolean)public boolean isExcel2HtmlHideTabIfOnlyOne()
public void setExcel2HtmlHideTabIfOnlyOne(boolean excel2html_hideTabIfOnlyOne)
excel2html_hideTabIfOnlyOne - 是否隐藏唯一Sheet的Tab标签Excel2Html.setHideSheetTabIfOnlyOne(boolean)public String getExcel2HtmlTemplateStr()
public void setExcel2HtmlTemplateStr(String excel2html_htmlTemplate)
excel2html_htmlTemplate - 自定义Html模板。Excel2Html.setHtmlTemplateString(String)public com.kdgcsoft.power.excel2html.HtmlTemplate getExcel2HtmlTemplate()
public boolean isAlsoStorageOriginalFile()
public void setAlsoStorageOriginalFile(boolean alsoStorageOriginalFile)
alsoStorageOriginalFile - 是否保存源文件,true:保存,false:不保存public boolean isTestMode()
DummyConverter 进行转换。public void setTestMode(boolean isTestMode)
DummyConverter 进行转换。isTestMode - 是否是测试模式public com.kdgcsoft.power.doc2html.IHtmlWriter getHtmlWriter()
public void setHtmlWriter(com.kdgcsoft.power.doc2html.IHtmlWriter htmlWriter)
htmlWriter - HTML生成器实例Copyright © 2019. All rights reserved.