类 PdfExport
java.lang.Object
com.sh.common.util.ExportBase
com.sh.common.util.PdfExport
Description: 导出PDF
Title:首亨软件 - TSS/CRM等
- 从以下版本开始:
- Dec 18, 2012
-
嵌套类概要
嵌套类 -
字段概要
从类继承的字段 com.sh.common.util.ExportBase
CHARSET_GBK, CHARSET_ISSO_8859_1, CHARSET_UTF_8, DEFAULT_CHARSET, ENABLE_DOWNLOAD_MAX_NUM, freshDsObj, FTNEXS_DIR, log4j, SHEET_MAX_ROW, TO_FTNEXS_FILES, TO_FTNEXS_TASK -
构造器概要
构造器构造器说明PdfExport(DataCenter dc, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String sql, String[][] pdfTitle, String[] pdfCols) 构造函数PdfExport(DataCenter dc, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String sql, String[] colsType, Object[] obj, String[][] pdfTitle, String[] pdfCols) 构造函数PdfExport(DataCenter dc, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String sql, String[] colsType, Object[] obj, String[] pdfTitle, String[] pdfCols) 构造函数PdfExport(DataCenter dc, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String sql, String[] pdfTitle, String[] pdfCols) 构造函数PdfExport(DataCenter dc, File file, String sql, String[] colsType, Object[] obj, String[][] pdfTitle, String[] pdfCols) PdfExport(DataCenter dc, File file, String sql, String[] colsType, Object[] obj, String[] pdfTitle, String[] pdfCols) PdfExport(DataCenter dc, OutputStream outputStream, String sql, String[][] pdfTitle, String[] pdfCols) PdfExport(DataCenter dc, OutputStream outputStream, String sql, String[] colsType, Object[] obj, String[][] pdfTitle, String[] pdfCols) PdfExport(DataCenter dc, OutputStream outputStream, String sql, String[] colsType, Object[] obj, String[] pdfTitle, String[] pdfCols) PdfExport(DataCenter dc, OutputStream outputStream, String sql, String[] pdfTitle, String[] pdfCols) PdfExport(Datastore ds, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String[][] pdfTitle, String[] pdfCols) PdfExport(Datastore ds, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String[] colsType, Object[] obj, String[][] pdfTitle, String[] pdfCols) PdfExport(Datastore ds, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String[] colsType, Object[] obj, String[] pdfTitle, String[] pdfCols) PdfExport(Datastore ds, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String[] pdfTitle, String[] pdfCols) PdfExport(Datastore ds, File file, String[] colsType, Object[] obj, String[][] pdfTitle, String[] pdfCols) PdfExport(Datastore ds, File file, String[] colsType, Object[] obj, String[] pdfTitle, String[] pdfCols) PdfExport(Datastore ds, OutputStream outputStream, String[][] pdfTitle, String[] pdfCols) PdfExport(Datastore ds, OutputStream outputStream, String[] colsType, Object[] obj, String[][] pdfTitle, String[] pdfCols) PdfExport(Datastore ds, OutputStream outputStream, String[] colsType, Object[] obj, String[] pdfTitle, String[] pdfCols) PdfExport(Datastore ds, OutputStream outputStream, String[] pdfTitle, String[] pdfCols) PdfExport(jakarta.servlet.http.HttpServletResponse response) PdfExport(OutputStream outputStream) -
方法概要
修饰符和类型方法说明voidaddCell(PdfExport.PdfCell cell) com.itextpdf.text.pdf.PdfPCellcreateCell(String value, com.itextpdf.text.Font font) com.itextpdf.text.pdf.PdfPCellcreateCell(String value, com.itextpdf.text.Font font, int align) com.itextpdf.text.pdf.PdfPCellcreateCell(String value, com.itextpdf.text.Font font, int align, int colspan) com.itextpdf.text.pdf.PdfPCellcreateCell(String value, com.itextpdf.text.Font font, int align, int colspan, boolean boderFlag) void导出PDFgetDc()voidmergeCells(int col1, int row1, int col2, int row2) 设置合并单元格voidmergeHeaderCells(int col1, int row1, int col2, int row2) 设置合并单元格voidmergeHeaderCells(PdfMerge mergeCell) 合并表头单元格voidsetCharset(String charset) 设置编码voidsetColumnWidth(int col, float width) 设置宽度voidsetTableWidth(float tableWidth) 从类继承的方法 com.sh.common.util.ExportBase
getRefreshDsObj, refreshDs, refreshDs, setRefreshDs
-
构造器详细资料
-
PdfExport
public PdfExport(DataCenter dc, File file, String sql, String[] pdfTitle, String[] pdfCols) throws Exception - 抛出:
Exception
-
PdfExport
public PdfExport(DataCenter dc, OutputStream outputStream, String sql, String[] pdfTitle, String[] pdfCols) -
PdfExport
public PdfExport(DataCenter dc, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String sql, String[] pdfTitle, String[] pdfCols) 构造函数- 参数:
dc- 数据中心request- HttpServletRequestresponse- HttpServletResponsesql- 导出SQLpdfTitle- pdf中标题行pdfCols- 每列对应DS中的列名
-
PdfExport
public PdfExport(DataCenter dc, File file, String sql, String[][] pdfTitle, String[] pdfCols) throws Exception - 抛出:
Exception
-
PdfExport
public PdfExport(DataCenter dc, OutputStream outputStream, String sql, String[][] pdfTitle, String[] pdfCols) -
PdfExport
public PdfExport(DataCenter dc, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String sql, String[][] pdfTitle, String[] pdfCols) 构造函数- 参数:
dc- 数据中心request- HttpServletRequestresponse- HttpServletResponsesql- 导出SQLpdfTitle- pdf中标题行pdfCols- 每列对应DS中的列名
-
PdfExport
public PdfExport(DataCenter dc, File file, String sql, String[] colsType, Object[] obj, String[] pdfTitle, String[] pdfCols) throws Exception - 抛出:
Exception
-
PdfExport
public PdfExport(DataCenter dc, OutputStream outputStream, String sql, String[] colsType, Object[] obj, String[] pdfTitle, String[] pdfCols) -
PdfExport
public PdfExport(DataCenter dc, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String sql, String[] colsType, Object[] obj, String[] pdfTitle, String[] pdfCols) 构造函数- 参数:
dc- 数据中心request- HttpServletRequestresponse- HttpServletResponsesql- 导出SQLcolsType- 查询参数类型obj- 查询参数pdfTitle- pdf中标题行pdfCols- 每列对应DS中的列名
-
PdfExport
public PdfExport(DataCenter dc, File file, String sql, String[] colsType, Object[] obj, String[][] pdfTitle, String[] pdfCols) throws Exception - 抛出:
Exception
-
PdfExport
public PdfExport(DataCenter dc, OutputStream outputStream, String sql, String[] colsType, Object[] obj, String[][] pdfTitle, String[] pdfCols) -
PdfExport
public PdfExport(DataCenter dc, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String sql, String[] colsType, Object[] obj, String[][] pdfTitle, String[] pdfCols) 构造函数- 参数:
dc- 数据中心request- HttpServletRequestresponse- HttpServletResponsesql- 导出SQLcolsType- 查询参数类型obj- 查询参数pdfTitle- pdf中标题行pdfCols- 每列对应DS中的列名
-
PdfExport
- 抛出:
Exception
-
PdfExport
-
PdfExport
-
PdfExport
- 抛出:
Exception
-
PdfExport
-
PdfExport
-
PdfExport
public PdfExport(Datastore ds, File file, String[] colsType, Object[] obj, String[] pdfTitle, String[] pdfCols) throws Exception - 抛出:
Exception
-
PdfExport
-
PdfExport
-
PdfExport
public PdfExport(Datastore ds, File file, String[] colsType, Object[] obj, String[][] pdfTitle, String[] pdfCols) throws Exception - 抛出:
Exception
-
PdfExport
-
PdfExport
-
PdfExport
public PdfExport(jakarta.servlet.http.HttpServletResponse response) -
PdfExport
-
-
方法详细资料
-
setCharset
设置编码- 参数:
charset- String
-
setColumnWidth
public void setColumnWidth(int col, float width) 设置宽度- 参数:
col- 列号 从0开始width- 宽度
-
setTableWidth
public void setTableWidth(float tableWidth) -
doExport
导出PDF- 参数:
fileName- 文件名- 抛出:
Exception- Exception
-
createCell
public com.itextpdf.text.pdf.PdfPCell createCell(String value, com.itextpdf.text.Font font, int align) -
createCell
-
createCell
public com.itextpdf.text.pdf.PdfPCell createCell(String value, com.itextpdf.text.Font font, int align, int colspan) -
createCell
public com.itextpdf.text.pdf.PdfPCell createCell(String value, com.itextpdf.text.Font font, int align, int colspan, boolean boderFlag) -
mergeHeaderCells
合并表头单元格- 参数:
mergeCell- PdfMerge
-
mergeHeaderCells
public void mergeHeaderCells(int col1, int row1, int col2, int row2) 设置合并单元格- 参数:
col1- 起始单元格列号 从0开始row1- 起始单元格行号 从0开始col2- 结束单元格列号 从0开始row2- 结束单元格行号 从0开始
-
mergeCells
public void mergeCells(int col1, int row1, int col2, int row2) 设置合并单元格- 参数:
col1- 起始单元格列号 从0开始row1- 起始单元格行号 从0开始col2- 结束单元格列号 从0开始row2- 结束单元格行号 从0开始
-
getDc
-
addCell
-