Grails导出插件设置列高度

Grails导出插件设置列高度,grails,export,Grails,Export,我正在使用grails的导出插件。我的控制器中有以下代码: if(params?.format && params.format != "html"){ response.contentType = grailsApplication.config.grails.mime.types[params.format] response.setHeader("Content-disposition", "attachment; filename

我正在使用grails的导出插件。我的控制器中有以下代码:

    if(params?.format && params.format != "html"){ 
        response.contentType = grailsApplication.config.grails.mime.types[params.format]
        response.setHeader("Content-disposition", "attachment; filename=Pour-Schedule.${params.extension}")
        List fields = ["id", "customer"] 
        Map labels = ["id": "Id", "customer": "Customer"]

        Map parameters = [title: "Customer List", "column.widths": [0.2, 0.3]] 

        exportService.export(params.format, response.outputStream, Customer.list(params), fields, labels, [:], parameters) }
code column.widths将在excel、pdf等中设置列的宽度。现在如何设置此列的高度?我尝试了column.height,但它不起作用,因此row.height也不起作用


有人能帮我吗?谢谢。

据我所知,很遗憾,行的宽度不受支持。 看

PDF导出支持一些附加参数,这些参数可以像上面代码示例中的title属性一样使用。支持以下参数:

  • pdf.encoding(指定字体编码,默认为“Cp1252”(=拉丁语1),允许的值为:“Cp1250”、“Cp1252”(=拉丁语2)、“Cp1257”、“Identity-H”、“Identity-V”、“MacRoman”),有关编码的详细信息,请参阅
  • title.encoding(与pdf.encoding相同,但用于标题字体)
  • header.encoding(与pdf.encoding相同,但用于页眉字体)
  • text.encoding(与pdf.encoding相同,但用于文本字体)
  • title.font.size(确定标题字体大小,默认为“10”,允许值:一个数字作为字符串)
  • header.font.size(确定页眉字体大小,默认为“10”,允许值:一个数字作为字符串)
  • text.font.size(确定文本字体大小,默认为“10”,允许值:一个数字作为字符串)
  • font.family(确定全局字体系列,允许的值:中定义的常量)
  • title.font.family(确定title字体系列,默认为com.lowagie.text.FontFactory.HELVETICA,允许的值:中定义的常量)
  • header.font.family(确定页眉字体系列,默认为com.lowagie.text.FontFactory.HELVETICA,允许的值:中定义的常量)
  • text.font.family(确定文本字体系列,默认为com.lowagie.text.FontFactory.HELVETICA,允许的值:中定义的常量)
  • title.font.style(确定标题字体样式,默认为“粗体”,允许值为:“粗体”、“斜体”、“普通”、“粗体斜体”)
  • header.font.style(确定页眉字体样式,默认为“粗体”,允许值为:“粗体”、“斜体”、“普通”、“粗体斜体”)
  • text.font.style(确定文本字体样式,默认为“正常”,允许值为:“粗体”、“斜体”、“正常”、“粗体斜体”)
  • border.color(确定表格边框颜色,默认为:新颜色(163163163),允许值:java.awt.color对象,例如color.RED)
  • separator.color(确定表行分隔符颜色,默认为:新颜色(238238238238),允许值:java.awt.color对象,例如新颜色(100100))
  • 列宽(以百分比为单位指定列宽,默认为所有列的大小相等,允许值:浮动列表,例如

虽然无法设置单元格高度,但至少可以使用换行符,以使单元格高度更大