# study-vertxPebblePdfCos **Repository Path**: hexingjie/study-vertxPebblePdfCos ## Basic Information - **Project Name**: study-vertxPebblePdfCos - **Description**: 搭建vertx eventbus。转换html成pdf并进行上传 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-03-23 - **Last Updated**: 2021-03-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Demo-vertxPebblePdfCos 将Pebble模版文件渲染成html,然后转化为pdf,最后上传到Cos # # 搭建一个EventBus的服务: 主要流程:模版->HTML+CSS->PDF->签名PDF 1. 模版->HTML+CSS 使用 Pebble Template引擎:https://pebbletemplates.io/ VertX与Pebble的结合:https://vertx.io/docs/vertx-web/java/#_pebble_template_engine 得到渲染结果在内存里的Buffer中(VertX内存对象) 2. HTML+CSS->PDF 使用 pdfHTML 将VertX Buffer中的结果,转换成PDF(也存于内存中) 3. PDF->签名PDF 将上一步得到的在内存中的PDF利用WebClient和objectstore-qcloud中的签名服务将PDF写入到腾讯云的COS存储里。 以上整个作为一个EventBus上运行的微服务,输入为模版名称+参数对象(JsonObject),输出为转换得到的COS存储上的PDF路径。