public class EasyWord2Html extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
PIXELS_PER_INCH |
| 构造器和说明 |
|---|
EasyWord2Html() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
convertDoc(File srcFile,
File destHtmlFile,
boolean isInlineImage)
转换".doc"文件为HTML。
|
void |
convertDocx(File srcFile,
File destFile,
boolean isInlineImage)
转换".docx"文件为HTML
|
ConvertOptions |
getConvertOptions()
获取转换参数
|
IHtmlWriter |
getWriter()
返回HTML生成器。
|
void |
setConvertOptions(ConvertOptions options)
设置转换参数
|
void |
setWriter(IHtmlWriter writer)
设置HTML生成器。
|
void |
toHtml(String srcPath,
String destPath)
把源文件转换成HTML。
|
void |
toHtml(String srcPath,
String destPath,
boolean isInlineImage)
把源文件转换成HTML。
|
void |
toHtml(String srcPath,
String destPath,
ConvertOptions options) |
void |
toHtml(String srcPath,
String destPath,
ImageFormat format)
把源文件转换成HTML,对ppt/pdf使用参数中指定的图像格式。
|
void |
toHtml(String srcPath,
String destPath,
ImageFormat format,
boolean isInlineImage)
把源文件转换成HTML。
|
public static final int PIXELS_PER_INCH
public void toHtml(String srcPath, String destPath, ConvertOptions options) throws Exception
Exceptionpublic void convertDoc(File srcFile, File destHtmlFile, boolean isInlineImage) throws Exception
srcFile - doc文件路径,含文件名destHtmlFile - 输出文件路径,含文件名isInlineImage - 是否直接以Base64方式嵌入图像到HTML中Exception - 转换异常public void convertDocx(File srcFile, File destFile, boolean isInlineImage) throws Exception
srcFile - docx文件路径,含文件名destFile - 输出文件路径,含文件名isInlineImage - 是否直接以Base64方式嵌入图像到HTML中Exception - 转换异常public IHtmlWriter getWriter()
public void setWriter(IHtmlWriter writer)
writer - HTML生成器实例public ConvertOptions getConvertOptions()
public void setConvertOptions(ConvertOptions options)
options - 转换参数public void toHtml(String srcPath, String destPath) throws Exception
srcPath - 源文件路径destPath - 目标HTML文件路径Exception - 转换失败时抛出异常public void toHtml(String srcPath, String destPath, boolean isInlineImage) throws Exception
srcPath - 源文件路径destPath - 目标HTML文件路径isInlineImage - 是否直接以Base64方式嵌入图像到HTML中Exception - 转换失败时抛出异常public void toHtml(String srcPath, String destPath, ImageFormat format) throws Exception
srcPath - 源文件路径destPath - 目标HTML文件路径format - 转换PowerPoint和pdf时使用的图片格式Exception - 转换失败时抛出异常public void toHtml(String srcPath, String destPath, ImageFormat format, boolean isInlineImage) throws Exception
srcPath - 源文件路径destPath - 目标HTML文件路径format - 转换PowerPoint和pdf时使用的图片格式isInlineImage - 是否直接以Base64方式嵌入图像到HTML中Exception - 转换失败时抛出异常Copyright © 2019. All rights reserved.