jquick-pdf 圆环图怎么把总量写进中心:一份 PDF 信用评级报告的模板逐行拆解

简介: jquick-pdf 是一款 Java PDF 报表生成库,支持 HTML 模板 + SVG 图表(含环形图)。其环形图创新性地将占比扇区与中心汇总文本(如“总营收 25680 万元”)融合,节省版面空间,特别适配信用评级等需“构成+总量”双展示的正式报告。官网示例与源码开源可查。

官网示例:

这张环形图解决了页面上的什么问题

信用评级报告的图表区常年缺地盘。营收构成的占比要展示,年度总营收这个汇总数也要突出,传统做法是左饼图、右数字大卡,两个元素各占一块宽度,A4 版心本来就 600px 上下,摆完之后指标说明就没地方放了。

环形图把这两件事合并成一个元素:外圈扇区画占比构成,中心圆孔直接填"总营收 25680 万元"。一份 Java PDF 报表模板里,图表自身就承担了数字卡片的职责,右侧面板整块宽度让给文字说明。本篇的素材是官方 Demo JQuickCreditReport07CircleTest(输出 D:\test\creditreport\07_circle.pdf),我不按"先讲完 Java 再讲模板"的老路来,而是把模板文件从第一行拆到最后一行——每个区块说清楚写了什么、为什么这么写、改动之后 PDF 会变成什么样,Java 配置只作为注脚跟在对应区块后面。

最终 PDF 的图表区长这样:左侧浅绿底说明面板列四条评级指标,右侧一个绿色系环形图,扇区从深绿到浅绿按数值递减排列,圆孔中心两行字——"总营收"与"万元"单位说明。(效果预览图 alt:jquick-pdf 环形图信用评级报告 PDF,外圈绿色系扇区展示营收构成,圆环中心放置总营收汇总文本)

真实渲染效果预览

以下为上述代码 + 模板真实运行生成的 PDF 首屏预览(由 jquick-pdf 渲染输出,非示意图):

image.png

从模板第一行开始拆

模板文件 credit_report_07_circle.txt 全文 151 行,最外层是固定的 <pdf><body> 壳,真正干活的是七个 div 区块。逐个来。

报告抬头:居中标题加一条绿色分隔线

<div style="textAlignment:center; marginBottom:18px">
  <h1 style="fontSize:22; color:#1B5E20; textAlignment:center; bold:true; marginBottom:6px">'企业信用评级报告'</h1>
  <p style="fontSize:10; color:#546e7a; textAlignment:center; marginBottom:8px">'四川省企业信用评估中心  |  报告编号: CR-2023-08975  |  评估日期: 2023年11月15日'</p>
  <lineSeparator style="strokeColor:#2E7D32"></lineSeparator>
</div>

抬头三行:22 号深绿粗体主标题、10 号灰色机构信息行、一条 strokeColor:#2E7D32 的 <lineSeparator>。这个 lineSeparator 是模板引擎提供的专用画线标签,比用空 div 加 border 画线省事,线型由 strokeColor 一个属性控制。

外层 div 的 marginBottom:18px 管的是抬头与下一个区块的间距。把它删掉,标题区和企业信息卡会贴在一起,报告立刻显得挤。<lineSeparator> 整行删掉的话,抬头下方失去视觉锚点,灰色小字和下面的企业名直接连成一片——报告类版式里这条线不建议省。

顺带把全篇的字号账记在这里:h1 用 22,区块 h2 用 14 和 13,面板 h3 用 12,正文 10-11,注脚性质的机构信息、页脚落 8-9。层级感全靠这套字号差撑着,没有一处是靠颜色硬凹的。想让某个区块更突出,先动字号差、再考虑加粗,顺序反了的版式会出现"到处都在加粗、等于没有加粗"的效果。

企业信息卡:一行 flex 摆四个小卡片

<div style="display:flex; justifyContent:space-between">
  <div style="width:140px; padding:10px; backgroundColor:#e8f5e9; borderRadius:6px; textAlignment:center">
    <div style="fontSize:8; color:#2E7D32; textAlignment:center; marginBottom:4px">'统一信用代码'</div>
    <div style="fontSize:10; bold:true; textAlignment:center">'91110108MA01XX1234'</div>
  </div>
  <!-- 成立日期 / 注册资本 / 法定代表人,三个结构相同的卡片 -->
</div>

display:flex 配 justifyContent:space-between,四个 140px 宽的小卡片均匀铺满一行。每个卡片两层结构:上层 8 号绿字当标签,下层 10 号粗体当值,底色统一 #e8f5e9 浅绿。

这里有一个 Java 侧的全局开关必须提,不然 flex 根本不生效:

JPdfConfig config = new JPdfConfig();
// 开启 flex 行布局:图表与其右侧的指标说明面板在宽度允许时并排,而不是换行堆叠。
config.getLayoutConfig().setFlexLayout(true);

setFlexLayout(true) 不开,模板里所有 display:flex 都按块级元素堆叠处理——四个信息卡竖着排四行,报告第一页直接多出一截。我第一次跑没开这个开关,以为模板写错了,排查半天发现是配置问题。做 jquick-pdf 环形图这类并排版式,先检查这个开关。

小卡片宽度 140px 也值得留意。统一信用代码 91110108MA01XX1234 是 18 位字符串,10 号粗体在这个宽度里已经顶满;如果把 width:140px 改成 120px,这类长代码值会换行,卡片高度不一致,整行 flex 的下边缘就参差了。信用代码、银行账号这类定长字段,卡片宽度要按最长值预留。

财务表格:斑马纹与增长率列的配色分工

<table style="width:600px; fontSize:10">
  <tr>
    <th style="backgroundColor:#2E7D32; color:white; bold:true; padding:6px; textAlignment:left">'财务指标'</th>
    <th style="backgroundColor:#2E7D32; color:white; bold:true; padding:6px; textAlignment:center">'2020年'</th>
    <!-- 其余年份列,结构相同 -->
  </tr>
  <tr>
    <td style="padding:6px; textAlignment:left; borderBottom:1px solid #c8e6c9; bold:true">'营业收入'</td>
    <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9">'8,560'</td>
    <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9; color:#2E7D32; bold:true">'+44.2%'</td>
  </tr>
  <!-- 净利润行整行加 backgroundColor:#f1f8f1 形成斑马纹 -->
</table>

表头实底深绿白字,行间用 borderBottom:1px solid #c8e6c9 浅绿线分隔,净利润、净资产两行整行垫 #f1f8f1 形成斑马纹。增长率列单独上了 color:#2E7D32; bold:true——整张表只有这一列带色加粗,视线扫过去先落在增长率上,这是报表里"让重要列自己跳出来"的常规手段。

数字列全部 textAlignment:right,指标名列 left。删掉右对齐,"8,560" 和 "25,680" 位数不同就左对齐排开,多位数和小位数的个位对不齐,横向比较年份增长时眼睛要来回找数。财务表格的对齐规矩别省。

width:600px 是表宽。模板正文区按 A4 版心设计,这个值和页面宽度匹配;如果你给报告加了页边距配置,记得同步核这个数,超宽的表格在 PDF 里会被压缩或截断。

指标卡片:flexWrap 决定一行放几张

<div style="display:flex; flexWrap:wrap">
  <div style="width:290px; margin:4px; padding:10px; backgroundColor:#f1f8f1; borderRadius:6px; borderLeft:4px solid #43A047; fontSize:11">
    '营收增长率:连续三年保持40%以上增长,2023年达到25,680万元'
  </div>
  <!-- 共六张同结构卡片 -->
</div>

六张 290px 宽的指标卡,靠 flexWrap:wrap 自动换行成两行三张。borderLeft:4px solid #43A047 的左侧竖线是这类卡片的视觉签名,底色只垫一层极浅的绿。

290px 这个数不是随手写的:两张卡加 margin 正好填满 600px 版心。动手把 width:290px 改成 350px 重跑,一行只放得下一张,六张卡竖排占满大半页——flexWrap 的换行行为完全由子项宽度和容器宽度共同决定,调版式时先算宽度账再动手。

卡片文本里"2023年达到25,680万元"这个数,和财务表格最后一列营收、以及下文环形图中心的总营收是同一个值。一套报告里同一指标在表格、卡片、图表三处出现,值必须同源,这属于数据加工层的事,模板只负责如实渲染。

图表区:左说明面板,右 ${svg},本篇的主角

<div style="display:flex; justifyContent:space-between">
  <div style="width:300px; padding:12px; backgroundColor:#f1f8f1; borderRadius:6px">
    <h3 style="fontSize:12; color:#1B5E20; bold:true; marginBottom:8px">'评级指标说明'</h3>
    <div style="fontSize:10; marginBottom:6px">
      <span style="color:#2E7D32; bold:true">'● 财务状况(90分): '</span>
      '营收稳定增长'
    </div>
    <!-- 经营能力95分 / 偿债能力85分 / 发展潜力92分,三条同结构 -->
  </div>
  <svg style="width:400px;height:400px">${svg}</svg>
</div>

左边 300px 说明面板,右边 <svg> 标签承接图表。${svg} 是模板变量占位,Java 侧渲染好的 SVG 字符串通过 bind 灌进来:

JCircleChartData chartData = new JCircleChartData();
chartData.setWidth(500);
chartData.setHeight(400);
chartData.setTitleText("营收结构环形图");
chartData.setSubtitleText("2023年度按业务线统计");
chartData.setCenterTitle("总营收");
chartData.setCenterUnit("万元");
chartData.setFooterText("数据来源:企业信用评估中心");
List<JCircleChartData.SectorData> sectors = new ArrayList<>();
sectors.add(new JCircleChartData.SectorData("软件产品", 10270, new Color(46, 125, 50)));
sectors.add(new JCircleChartData.SectorData("技术服务", 6420, new Color(67, 160, 71)));
sectors.add(new JCircleChartData.SectorData("云服务", 5136, new Color(129, 199, 132)));
sectors.add(new JCircleChartData.SectorData("其他", 3854, new Color(165, 214, 167)));
chartData.setSectorDataList(sectors);
JOption option = new JOption();
option.setData(chartData);

String svg = JChartRendererFactory.renderChart(JChartType.Circle, option);

环形图相对饼图的增量配置就两行:setCenterTitle("总营收") 和 setCenterUnit("万元")。这两个值最终落在圆孔中心,一图同时交付占比构成和汇总口径,页面布局上省掉的正是那块独立数字卡。SectorData 构造参数是名称、数值、java.awt.Color 三元组,四个扇区用了同色系绿色从深到浅递减(46,125,50 → 165,214,167),数值越大颜色越深,扫一眼就能读出"软件产品是主力"。

有几个解剖时记下的细节:

  • <svg style="width:400px;height:400px"> 写死宽高,而 Java 里 setWidth(500)——两边数值不一致。渲染器把 500 宽的 SVG 塞进 400px 的框时会有缩放或留白,具体表现随版本有差异,稳妥做法是两处改成同一个数,我实测对齐后中心文字与扇区的比例最正。
  • bind("svg", svg) 的键名和 ${svg} 必须严格一致。键名写成 svgData 而模板没改,PDF 里会原样打印 ${svg} 字面量——看到这行字出现在成品里,先查 bind 的键。
  • 左面板四个圆点的颜色是 #2E7D32、#2ecc71、#e74c3c、#f39c12,红橙都有,和环形图的绿色系完全两套。如果圆点想暗示"与扇区对应",这套颜色是误导;它们实际只是给每条说明做视觉分隔,改版时要么统一成绿色系,要么干脆换成同一种颜色,别让读者以为是图例。
  • 中心文字的显示空间由圆孔直径决定,孔径又由环形图内外半径比决定。centerTitle 文字太长(比如"年度营业总收入合计")会被圆孔卡住,中心只放短词加单位是这套 API 的舒适区。

落地前对着三个点过一遍:setFlexLayout(true) 是否已开、bind 的键与 ${svg} 拼写是否一致、<svg> 的宽高与 setWidth/setHeight 是否对齐。三处翻车的现象各自不同——开关不开时图表区整块竖排堆叠、说明面板跑到图下面;键名错位时成品 PDF 里原样出现 ${svg} 字面量;尺寸不齐时圆环被缩放或一侧留白。环形图区块的排查,从这三个点入手最快。

深色结论块与页脚

<div style="marginBottom:18px; backgroundColor:#1B5E20; color:white; borderRadius:8px; padding:16px">
  <h2 style="fontSize:13; color:white; bold:true; marginBottom:8px">'综合评价'</h2>
  <p style="fontSize:11; color:white; textAlignment:left; marginBottom:8px">'……信用评级为AAA级,展望稳定。'</p>
  <p style="fontSize:8; color:#c8e6c9; textAlignment:right">'认证通过'</p>
</div>

全篇唯一的重色块,深绿底白字圆角容器。删掉任何一个子元素的 color:white,黑字落在 #1B5E20 上几乎不可读——深底容器里的每个子元素都要显式声明浅色,这是深色块模板的通用纪律。右下角 8 号浅绿"认证通过"是印章位的替代写法,灰度打印后它和背景的对比度会掉一个档次,需要打印场景的报告建议给这行加边框或换更深的字色。

页脚区复用了 <lineSeparator>,加两行 9 号灰字落版权与生成时间。marginTop:20px 把页脚和结论块撑开,删掉它页脚会贴着结论块,收尾显得仓促。

动手改三行验证理解

读模板最好的方式是改一行重跑一次,每个实验五分钟内能出结果:

1. 把 <svg style="width:400px;height:400px"> 改成 width:500px,与 Java 的 setWidth(500) 对齐,
   观察环形图放大后中心文字占比的变化;
2. 把任一 SectorData 的 Color 改成 new Color(231, 76, 60)(红色),
   重跑看扇区跳色后"同色系递减"的阅读直觉如何被打破;
3. 把指标卡 width:290px 改成 350px,验证 flexWrap 从一行三张退化为一张的换行行为。

这个模板适合与不适合的场景

环形图方案的价值锚点在"中心圆孔放文本"。评级报告、经营月报、基金季报这类"构成 + 总量"双诉求的页面,一张图顶两个元素;深色结论块加绿色系全篇配色也正合正式报告的调子。反过来也得认:灰度打印是天然短板,四个绿色扇区转灰后深浅差距收窄,离开颜色就难分彼此,需要黑白打印存档的报告,要么减少扇区数、要么在扇区上直接标注百分比文字;维度数量超过六七个后扇区过窄,中心文字的阅读优先级反而被挤压,那类数据回退到表格更好。

完整源码附录

依赖版本 4.7.0+。本项目基于 Apache-2.0 协议开源,使用时请保留源码文件头部原有的 License 与版权声明。

Maven 依赖

<dependency>
    <groupId>io.github.paohaijiao</groupId>
    <artifactId>jquick-pdfx</artifactId>
    <version>4.7.0</version>
    <scope>test</scope>
</dependency>

Gradle 依赖

testImplementation 'io.github.paohaijiao:jquick-pdfx:4.7.0'

Java 测试类(JQuickCreditReport07CircleTest.java)

/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Copyright (c) [2025-2099] Martin (goudingcheng@gmail.com)
 */
package com.github.paohaijiao.biz.report;

import com.github.paohaijiao.JOption;
import com.github.paohaijiao.combol.JCircleChartData;
import com.github.paohaijiao.config.JPdfConfig;
import com.github.paohaijiao.demo.constant.JQuickConstant;
import com.github.paohaijiao.enums.JChartType;
import com.github.paohaijiao.executor.JQuickPdfFactory;
import com.github.paohaijiao.factory.JChartRendererFactory;
import org.junit.Test;

import java.awt.Color;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * 统一信用报告 —— 风格 07:环形图(深绿)
 *
 * <p>以 {@code report/credit_report_07_circle.txt} 为模板,把环形图渲染成 SVG 后
 * 绑定到模板中的 {@code ${svg}} 占位符,输出到 {@code D:\test\creditreport\07_circle.pdf}。</p>
 *
 * @author Martin
 * @version 1.0.0
 */
public class JQuickCreditReport07CircleTest {
   

    public static final String path = JQuickConstant.path;

    @Test
    public void report07Circle() throws IOException {
   
        JCircleChartData chartData = new JCircleChartData();
        chartData.setWidth(500);
        chartData.setHeight(400);
        chartData.setTitleText("营收结构环形图");
        chartData.setSubtitleText("2023年度按业务线统计");
        chartData.setCenterTitle("总营收");
        chartData.setCenterUnit("万元");
        chartData.setFooterText("数据来源:企业信用评估中心");
        List<JCircleChartData.SectorData> sectors = new ArrayList<>();
        sectors.add(new JCircleChartData.SectorData("软件产品", 10270, new Color(46, 125, 50)));
        sectors.add(new JCircleChartData.SectorData("技术服务", 6420, new Color(67, 160, 71)));
        sectors.add(new JCircleChartData.SectorData("云服务", 5136, new Color(129, 199, 132)));
        sectors.add(new JCircleChartData.SectorData("其他", 3854, new Color(165, 214, 167)));
        chartData.setSectorDataList(sectors);
        JOption option = new JOption();
        option.setData(chartData);

        String svg = JChartRendererFactory.renderChart(JChartType.Circle, option);

        File dir = new File(path + "creditreport");
        if (!dir.exists()) {
   
            dir.mkdirs();
        }
        FileOutputStream fileOutputStream = new FileOutputStream(path + "creditreport/07_circle.pdf");
        JPdfConfig config = new JPdfConfig();
        // 开启 flex 行布局:图表与其右侧的指标说明面板在宽度允许时并排,而不是换行堆叠。
        config.getLayoutConfig().setFlexLayout(true);
        JQuickPdfFactory factory = new JQuickPdfFactory(config);
        factory.bind("svg", svg);
        byte[] bytes = factory.executeResource("report/credit_report_07_circle.txt");
        fileOutputStream.write(bytes);
        fileOutputStream.close();
    }
}

模板文件(report/credit_report_07_circle.txt)

<pdf>
<body>
  <div style="textAlignment:center; marginBottom:18px">
    <h1 style="fontSize:22; color:#1B5E20; textAlignment:center; bold:true; marginBottom:6px">'企业信用评级报告'</h1>
    <p style="fontSize:10; color:#546e7a; textAlignment:center; marginBottom:8px">'四川省企业信用评估中心  |  报告编号: CR-2023-08975  |  评估日期: 2023年11月15日'</p>
    <lineSeparator style="strokeColor:#2E7D32"></lineSeparator>
  </div>

  <div style="marginBottom:18px">
    <h2 style="fontSize:14; color:#1B5E20; bold:true; textAlignment:center; marginBottom:12px">'四川省泡海椒科技有限公司'</h2>
    <div style="display:flex; justifyContent:space-between">
      <div style="width:140px; padding:10px; backgroundColor:#e8f5e9; borderRadius:6px; textAlignment:center">
        <div style="fontSize:8; color:#2E7D32; textAlignment:center; marginBottom:4px">'统一信用代码'</div>
        <div style="fontSize:10; bold:true; textAlignment:center">'91110108MA01XX1234'</div>
      </div>
      <div style="width:140px; padding:10px; backgroundColor:#e8f5e9; borderRadius:6px; textAlignment:center">
        <div style="fontSize:8; color:#2E7D32; textAlignment:center; marginBottom:4px">'成立日期'</div>
        <div style="fontSize:10; bold:true; textAlignment:center">'2018年5月20日'</div>
      </div>
      <div style="width:140px; padding:10px; backgroundColor:#e8f5e9; borderRadius:6px; textAlignment:center">
        <div style="fontSize:8; color:#2E7D32; textAlignment:center; marginBottom:4px">'注册资本'</div>
        <div style="fontSize:10; bold:true; textAlignment:center">'1000万元人民币'</div>
      </div>
      <div style="width:140px; padding:10px; backgroundColor:#e8f5e9; borderRadius:6px; textAlignment:center">
        <div style="fontSize:8; color:#2E7D32; textAlignment:center; marginBottom:4px">'法定代表人'</div>
        <div style="fontSize:10; bold:true; textAlignment:center">'泡海椒'</div>
      </div>
    </div>
    <p style="fontSize:9; color:#546e7a; textAlignment:center; marginTop:8px">'所属行业: 软件和信息技术服务业  |  企业规模: 中型(150-200人)'</p>
  </div>

  <div style="marginBottom:18px">
    <h2 style="fontSize:13; color:#2E7D32; bold:true; marginBottom:10px">'历年财务数据(单位:万元)'</h2>
    <table style="width:600px; fontSize:10">
      <tr>
        <th style="backgroundColor:#2E7D32; color:white; bold:true; padding:6px; textAlignment:left">'财务指标'</th>
        <th style="backgroundColor:#2E7D32; color:white; bold:true; padding:6px; textAlignment:center">'2020年'</th>
        <th style="backgroundColor:#2E7D32; color:white; bold:true; padding:6px; textAlignment:center">'2021年'</th>
        <th style="backgroundColor:#2E7D32; color:white; bold:true; padding:6px; textAlignment:center">'2022年'</th>
        <th style="backgroundColor:#2E7D32; color:white; bold:true; padding:6px; textAlignment:center">'2023年'</th>
        <th style="backgroundColor:#2E7D32; color:white; bold:true; padding:6px; textAlignment:center">'增长率'</th>
      </tr>
      <tr>
        <td style="padding:6px; textAlignment:left; borderBottom:1px solid #c8e6c9; bold:true">'营业收入'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9">'8,560'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9">'12,340'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9">'18,920'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9">'25,680'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9; color:#2E7D32; bold:true">'+44.2%'</td>
      </tr>
      <tr>
        <td style="padding:6px; textAlignment:left; borderBottom:1px solid #c8e6c9; bold:true; backgroundColor:#f1f8f1">'净利润'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9; backgroundColor:#f1f8f1">'1,240'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9; backgroundColor:#f1f8f1">'2,150'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9; backgroundColor:#f1f8f1">'3,890'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9; backgroundColor:#f1f8f1">'5,420'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9; backgroundColor:#f1f8f1; color:#2E7D32; bold:true">'+63.8%'</td>
      </tr>
      <tr>
        <td style="padding:6px; textAlignment:left; borderBottom:1px solid #c8e6c9; bold:true">'总资产'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9">'15,800'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9">'22,450'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9">'31,200'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9">'42,800'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9; color:#2E7D32; bold:true">'+39.5%'</td>
      </tr>
      <tr>
        <td style="padding:6px; textAlignment:left; borderBottom:1px solid #c8e6c9; bold:true; backgroundColor:#f1f8f1">'净资产'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9; backgroundColor:#f1f8f1">'9,200'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9; backgroundColor:#f1f8f1">'13,800'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9; backgroundColor:#f1f8f1">'19,500'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9; backgroundColor:#f1f8f1">'26,400'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9; backgroundColor:#f1f8f1; color:#2E7D32; bold:true">'+42.1%'</td>
      </tr>
      <tr>
        <td style="padding:6px; textAlignment:left; borderBottom:1px solid #c8e6c9; bold:true">'毛利率'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9">'42.5%'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9">'45.8%'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9">'48.2%'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9">'51.6%'</td>
        <td style="padding:6px; textAlignment:right; borderBottom:1px solid #c8e6c9; color:#2E7D32; bold:true">'+9.1%'</td>
      </tr>
    </table>
  </div>

  <div style="marginBottom:18px">
    <h2 style="fontSize:13; color:#2E7D32; bold:true; marginBottom:10px">'关键经营指标'</h2>
    <div style="display:flex; flexWrap:wrap">
      <div style="width:290px; margin:4px; padding:10px; backgroundColor:#f1f8f1; borderRadius:6px; borderLeft:4px solid #43A047; fontSize:11">
        '营收增长率:连续三年保持40%以上增长,2023年达到25,680万元'
      </div>
      <div style="width:290px; margin:4px; padding:10px; backgroundColor:#f1f8f1; borderRadius:6px; borderLeft:4px solid #43A047; fontSize:11">
        '利润率提升:净利率从14.5%提升至21.1%,盈利能力显著增强'
      </div>
      <div style="width:290px; margin:4px; padding:10px; backgroundColor:#f1f8f1; borderRadius:6px; borderLeft:4px solid #43A047; fontSize:11">
        '研发投入:研发费用年均增长38.9%,占营收比例达13.3%'
      </div>
      <div style="width:290px; margin:4px; padding:10px; backgroundColor:#f1f8f1; borderRadius:6px; borderLeft:4px solid #43A047; fontSize:11">
        '人才结构:技术研发人员占比42%,硕士以上学历占35%'
      </div>
      <div style="width:290px; margin:4px; padding:10px; backgroundColor:#f1f8f1; borderRadius:6px; borderLeft:4px solid #43A047; fontSize:11">
        '客户质量:服务15家上市公司,客户续约率92%,大客户满意度4.8/5.0'
      </div>
      <div style="width:290px; margin:4px; padding:10px; backgroundColor:#f1f8f1; borderRadius:6px; borderLeft:4px solid #43A047; fontSize:11">
        '资产质量:资产负债率维持在38%左右,流动比率2.8,偿债能力良好'
      </div>
    </div>
  </div>

  <div style="marginBottom:18px">
    <h2 style="fontSize:13; color:#2E7D32; bold:true; marginBottom:10px">'营收结构环形图'</h2>
    <div style="display:flex; justifyContent:space-between">
      <div style="width:300px; padding:12px; backgroundColor:#f1f8f1; borderRadius:6px">
        <h3 style="fontSize:12; color:#1B5E20; bold:true; marginBottom:8px">'评级指标说明'</h3>
        <div style="fontSize:10; marginBottom:6px">
          <span style="color:#2E7D32; bold:true">'● 财务状况(90分): '</span>
          '营收稳定增长'
        </div>
        <div style="fontSize:10; marginBottom:6px">
          <span style="color:#2ecc71; bold:true">'● 经营能力(95分): '</span>
          '客户留存率高'
        </div>
        <div style="fontSize:10; marginBottom:6px">
          <span style="color:#e74c3c; bold:true">'● 偿债能力(85分): '</span>
          '负债率合理'
        </div>
        <div style="fontSize:10; marginBottom:6px">
          <span style="color:#f39c12; bold:true">'● 发展潜力(92分): '</span>
          '研发投入增加'
        </div>
      </div>
      <svg style="width:400px;height:400px">${svg}</svg>
    </div>
  </div>

  <div style="marginBottom:18px; backgroundColor:#1B5E20; color:white; borderRadius:8px; padding:16px">
    <h2 style="fontSize:13; color:white; bold:true; marginBottom:8px">'综合评价'</h2>
    <p style="fontSize:11; color:white; textAlignment:left; marginBottom:8px">
      '四川省泡海椒科技有限公司作为国家级高新技术企业和专精特新"小巨人"企业,在云计算和大数据领域表现出色。'
      '公司财务状况健康,经营能力突出,技术创新能力强,具备良好的发展潜力。信用评级为AAA级,展望稳定。'
    </p>
    <p style="fontSize:8; color:#c8e6c9; textAlignment:right">'认证通过'</p>
  </div>

  <div style="textAlignment:center; marginTop:20px">
    <lineSeparator style="strokeColor:#2E7D32"></lineSeparator>
    <p style="fontSize:9; color:#78909c; textAlignment:center; marginTop:8px">'本报告依据公开信息和专业评估模型生成,仅供参考 | 报告生成时间: 2025年09月06日'</p>
    <p style="fontSize:9; color:#78909c; textAlignment:center">'© 2023 企业信用评估中心 版权所有 | 认证编号: CE-2023-001'</p>
  </div>
</body>
</pdf>
相关文章
|
4天前
|
JavaScript API iOS开发
DeepSeek Harness下载、安装、配置一篇搞定(2026整理,送常用插件)
DeepSeek Harness(DSH)是DeepSeek于2026年开源的MIT协议AI Agent框架,支持插件化组装模型、工具、沙箱与UI,兼容主流大模型。本文提供免Node.js的桌面端安装包(Win/macOS),含详细图文教程及热门插件推荐。
|
云安全 安全 网络安全
|
4天前
|
iOS开发 Docker MacOS
【2026实测】Docker Desktop下载、安装、汉化、配置教程(附官网安装包)
Docker Desktop 是 Docker 官方推出的桌面容器管理工具,集成引擎、CLI、图形界面与 Kubernetes,支持 Win/macOS/Linux。2026 最新版 4.88.1 强化 ARM 原生运行、镜像加速及资源可视化,附中文汉化与国内镜像配置指南。
770 1
|
17天前
|
人工智能 API 开发工具
DeepSeek Harness 神插件:白嫖 13 家大厂模型
`dsh-our-free-model` 是 DeepSeek Harness 神级插件:零配置、零API Key、零账号,聚合13家大厂免费模型(含DeepSeek V4.1 Flash、Kimi K3等),支持本地网关、用量看板与自动降级,真正实现“白嫖即用”。
2874 49
|
11天前
|
JavaScript 安全 前端开发
Nodejs Brotli decoder 代码执行漏洞 (CVE-2026-111497)10629
Node.js发布安全更新修复Brotli解码器高危RCE漏洞(CVE-2026-111497),建议受影响版本用户立即升级。
2091 2
|
5天前
|
安全 算法 定位技术
《高性价比人生指南》完整原版:普通人用最少的资源,过好这一生的底层逻辑~How To Live Better
📖《高性价比人生指南》是一份基于实证、拒绝焦虑的生存手册,倡导以“人生时薪”为视角,重新计算时间、金钱与精力的成本与收益。它不承诺逆袭,只教人算清账:省下的钱若耗掉时间便亏;买体验比买物品更值;睡眠是最高杠杆的健康投资;关系贵在情绪价值而非表面热络;学习重在改变行为而非自我安慰。核心理念:用低成本、高回报的微小行动,换取长期的选择权——不是成为谁,而是掌控自己人生的主动权。
|
9天前
|
人工智能 JSON Linux
【保姆级】ComfyUI部署教程(下载+安装+配置+工作流,2026最新)
ComfyUI 是一款开源节点式AI生成工具,支持图像、视频、音频及3D内容创作。通过拖拽连线组合模型加载、提示词、采样等节点,构建可复用、易修改的工作流,兼容SD1.5、SDXL、Flux、Qwen Image等主流模型。
|
3天前
|
Linux 开发工具 iOS开发
Codex保姆级教程(下载+安装+登录+使用,含所有版本,2026最新)
Codex是OpenAI推出的开源AI编程智能体,本地运行,可理解整个代码库,支持自然语言指令改代码、执行命令、跑测试、修Bug,兼容Win/macOS/Linux。(239字)