用Itext包生成PDF打印文件,支持插入图片,多种格式混乱编排,还缺斜线没加入
iText-2.1.7.jar
将图片放D盘,将字体从网上下载下来指定位置,下载包,就可以直接运行生成PDF文件
public class dynamicTable {
public static void main(String[] args) {
test2();
}
private static void test2() {
Document document = null;
document = new Document(PageSize.A4, 20, 20, 40, 40);
PdfPCell iCell = null;
PdfPCell cell = null;
PdfPTable tableq = null;
PdfPTable subTable = null;
String shuxing = "属性";
String shuxingzhi = "属性值";
try {
PdfWriter.getInstance(document, new FileOutputStream("d:\\coslpan1.pdf"));
document.open();
BaseFont bfChinese = BaseFont.createFont("D:\\draft/fonts/MSYH.TTF" , BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
Font fontChinese = new Font(bfChinese , 12 , Font.NORMAL, Color.BLACK);
//new一个table
tableq = new PdfPTable(1);
float[] widq = { 500f };//table的大小
tableq.setTotalWidth(widq);
tableq.setLockedWidth(true);//锁定边框大小,可以使边框大小固定,缺点是,如果框里的值过长,则没法显示,所以如果值过长,则可以去掉这一行
tableq.setHorizontalAlignment(Element.ALIGN_LEFT);// 设置左对齐
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
iCell.setFixedHeight(20);
iCell.setBorder(0);// 设置无边框
tableq.addCell(iCell);//将生成的cell方入改table,
document.add(tableq);
tableq = new PdfPTable(1);
float[] widq1 = { 500f };
tableq.setTotalWidth(widq1);
tableq.setLockedWidth(true);
tableq.setHorizontalAlignment(Element.ALIGN_LEFT);
String tupian ="/ECDS_LOGO300.gif";
Image imageLogo = Image.getInstance(tupian);
imageLogo.scaleAbsolute(imageLogo.getPlainWidth() / 2, imageLogo.getPlainHeight() / 2);
iCell = new PdfPCell(imageLogo);
iCell.setFixedHeight(30);
iCell.setBorder(0);// 设置无边框
tableq.addCell(iCell);
document.add(tableq);
//
tableq = new PdfPTable(1);
float[] widq3 = { 500f };
tableq.setTotalWidth(widq3);
tableq.setLockedWidth(true);
tableq.setHorizontalAlignment(Element.ALIGN_LEFT);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
// iCell = FontUtils.createPdfPCell(filePath1, fontStyletitle);
// iCell.setHorizontalAlignment(Element.ALIGN_CENTER);// 设置内容水平居中显示
iCell.setFixedHeight(30);
iCell.setBorder(0);// 设置无边框
tableq.addCell(iCell);
document.add(tableq);
//
tableq = new PdfPTable(2);//2table
float[] widq4 = { 250f, 300f };
tableq.setTotalWidth(widq4);
tableq.setLockedWidth(true);
tableq.setHorizontalAlignment(Element.ALIGN_LEFT);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
// iCell = FontUtils.createPdfPCell("出票日期: " + filePath1 + "",
// fontStyle);
iCell.setBorder(0);
tableq.addCell(new PdfPCell(iCell));
iCell = new PdfPCell(new Paragraph(shuxingzhi,fontChinese));
iCell.setBorder(0);
tableq.addCell(new PdfPCell(iCell));
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
iCell.setBorder(0);
tableq.addCell(new PdfPCell(iCell));
iCell = new PdfPCell(new Paragraph(shuxingzhi,fontChinese));
iCell.setBorder(0);
tableq.addCell(new PdfPCell(iCell));
document.add(tableq);
tableq = new PdfPTable(6);
float[] widq6 = { 30f, 50f, 195f, 30f, 50f, 195f };//生成6个table
tableq.setTotalWidth(widq6);
tableq.setLockedWidth(true);
tableq.setHorizontalAlignment(Element.ALIGN_LEFT);
subTable = new PdfPTable(1); //子table
float[] iWid2 = { 30f };
subTable.setTotalWidth(iWid2);
subTable.setLockedWidth(true);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
// iCell = FontUtils.createPdfPCell("出\n\n票\n\n人", fontStyle);
iCell.setHorizontalAlignment(Element.ALIGN_CENTER);
subTable.addCell(iCell);
cell = new PdfPCell(subTable);
tableq.addCell(cell);
document.add(tableq);
subTable = new PdfPTable(2);
float[] iWid6 = { 50f, 195f };
subTable.setTotalWidth(iWid6);
subTable.setLockedWidth(true);
// iCell = FontUtils.createPdfPCell("全 称", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
subTable.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell(filePath1, fontStyle);
iCell = new PdfPCell(new Paragraph(shuxingzhi,fontChinese));
subTable.addCell(new PdfPCell(iCell));
iCell.setFixedHeight(20);
// iCell = FontUtils.createPdfPCell("帐 号", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
subTable.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell(filePath1, fontStyle);
iCell = new PdfPCell(new Paragraph(shuxingzhi,fontChinese));
iCell.setFixedHeight(20);
subTable.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell("开户银行", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
subTable.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell(filePath1, fontStyle);
iCell = new PdfPCell(new Paragraph(shuxingzhi,fontChinese));
subTable.addCell(new PdfPCell(iCell));
cell = new PdfPCell(subTable); // 用这个table初始外层table的cell
cell.setColspan(2); // 设置它跨2列
tableq.addCell(cell);
document.add(tableq);
subTable = new PdfPTable(1);
float[] iWid12 = { 30f };
subTable.setTotalWidth(iWid12);
subTable.setLockedWidth(true);
// iCell = FontUtils.createPdfPCell("收\n\n票\n\n人", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
iCell.setHorizontalAlignment(Element.ALIGN_CENTER);
subTable.addCell(iCell);
cell = new PdfPCell(subTable);
tableq.addCell(cell);
document.add(tableq);
subTable = new PdfPTable(2);
float[] iWid16 = { 50f, 195f };
subTable.setTotalWidth(iWid16);
subTable.setLockedWidth(true);
// iCell = FontUtils.createPdfPCell("全 称", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
iCell.setHorizontalAlignment(Element.ALIGN_CENTER);
subTable.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell(filePath1, fontStyle);
iCell = new PdfPCell(new Paragraph(shuxingzhi,fontChinese));
subTable.addCell(new PdfPCell(iCell));
iCell.setFixedHeight(20);
// iCell = FontUtils.createPdfPCell("帐 号", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
iCell.setHorizontalAlignment(Element.ALIGN_CENTER);
subTable.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell(filePath1, fontStyle);
iCell = new PdfPCell(new Paragraph(shuxingzhi,fontChinese));
iCell.setFixedHeight(20);
subTable.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell("开户银行", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
iCell.setHorizontalAlignment(Element.ALIGN_CENTER);
subTable.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell(filePath1, fontStyle);
iCell = new PdfPCell(new Paragraph(shuxingzhi,fontChinese));
subTable.addCell(new PdfPCell(iCell));
cell = new PdfPCell(subTable); // 用这个table初始外层table的cell
cell.setColspan(2);//设置跨3行
tableq.addCell(cell);
tableq.addCell(subTable);
document.add(tableq);
tableq = new PdfPTable(7);
float[] widqw = { 80f, 60f, 110f, 60f, 110f, 60f, 70f };
tableq.setTotalWidth(widqw);
tableq.setLockedWidth(true);
tableq.setHorizontalAlignment(Element.ALIGN_LEFT);
// iCell = FontUtils.createPdfPCell("出票保证信息", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
iCell.setFixedHeight(20);
tableq.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell("保证人名称:", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
iCell.setFixedHeight(20);
iCell.setBorder(0);
tableq.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell("", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxingzhi,fontChinese));
iCell.setFixedHeight(20);
iCell.setBorder(0);
tableq.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell("保证人地址:", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
iCell.setFixedHeight(20);
iCell.setBorder(0);
tableq.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell("", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxingzhi,fontChinese));
iCell.setFixedHeight(20);
iCell.setBorder(0);
tableq.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell("保证日期:", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
iCell.setFixedHeight(20);
iCell.setBorder(0);
tableq.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell("", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxingzhi,fontChinese));
iCell.setFixedHeight(20);
iCell.setBorderWidthLeft(0);
iCell.setBorderWidthTop(0);
iCell.setBorderWidthBottom(0);
tableq.addCell(new PdfPCell(iCell));
document.add(tableq);
tableq = new PdfPTable(3);
float[] widq6w2 = { 80f, 40f, 430f };
tableq.setTotalWidth(widq6w2);
tableq.setLockedWidth(true);
tableq.setHorizontalAlignment(Element.ALIGN_LEFT);
subTable = new PdfPTable(1);//40f
float[] iWid2e2 = { 80f };
subTable.setTotalWidth(iWid2e2);
subTable.setLockedWidth(true);
// iCell = FontUtils.createPdfPCell("评级信息由出票人、承兑人自己记载、仅供参考",fontStyle);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
subTable.addCell(iCell);
cell = new PdfPCell(subTable);
tableq.addCell(cell);
document.add(tableq);
subTable = new PdfPTable(7);//430
float[] iWid2w22 = { 40f, 50f,130f,50f,60f,70f,70f };
subTable.setTotalWidth(iWid2w22);
subTable.setLockedWidth(true);
// iCell = FontUtils.createPdfPCell("出票人:", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
iCell.setBorderWidthRight(0);
iCell.setBorderWidthLeft(0);
iCell.setBorderWidthTop(0);
subTable.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell("评级主体:", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
iCell.setBorderWidthRight(0);
iCell.setBorderWidthTop(0);
subTable.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell("", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxingzhi,fontChinese));
iCell.setBorderWidthRight(0);
iCell.setBorderWidthLeft(0);
iCell.setBorderWidthTop(0);
subTable.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell("信用等级:", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
iCell.setBorderWidthRight(0);
iCell.setBorderWidthLeft(0);
iCell.setBorderWidthTop(0);
subTable.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell("", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxingzhi,fontChinese));
iCell.setBorderWidthRight(0);
iCell.setBorderWidthLeft(0);
iCell.setBorderWidthTop(0);
subTable.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell("评级到期日:", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
iCell.setBorderWidthRight(0);
iCell.setBorderWidthLeft(0);
iCell.setBorderWidthTop(0);
subTable.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell("", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxingzhi,fontChinese));
iCell.setBorderWidthLeft(0);
iCell.setBorderWidthTop(0);
subTable.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell("承兑人:", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
iCell.setBorder(0);
subTable.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell("评级主体:", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
iCell.setBorderWidthRight(0);
iCell.setBorderWidthTop(0);
iCell.setBorderWidthBottom(0);
subTable.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell("", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxingzhi,fontChinese));
iCell.setBorderWidthRight(0);
iCell.setBorderWidthLeft(0);
iCell.setBorderWidthTop(0);
iCell.setBorderWidthBottom(0);
subTable.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell("信用等级:", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
iCell.setBorderWidthRight(0);
iCell.setBorderWidthLeft(0);
iCell.setBorderWidthTop(0);
iCell.setBorderWidthBottom(0);
subTable.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell("", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxingzhi,fontChinese));
iCell.setBorderWidthRight(0);
iCell.setBorderWidthLeft(0);
iCell.setBorderWidthTop(0);
iCell.setBorderWidthBottom(0);
subTable.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell("评级到期日:", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
iCell.setBorderWidthRight(0);
iCell.setBorderWidthLeft(0);
iCell.setBorderWidthTop(0);
iCell.setBorderWidthBottom(0);
subTable.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell("11", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxingzhi,fontChinese));
iCell.setBorderWidthLeft(0);
iCell.setBorderWidthTop(0);
iCell.setBorderWidthBottom(0);
subTable.addCell(new PdfPCell(iCell));
cell = new PdfPCell(subTable);
cell.setColspan(2);
tableq.addCell(cell);
document.add(tableq);
tableq = new PdfPTable(2);
float[] iWidd6 = { 80f, 420f };
tableq.setTotalWidth(iWidd6);
tableq.setLockedWidth(true);
tableq.setHorizontalAlignment(Element.ALIGN_LEFT);
// iCell = FontUtils.createPdfPCell("出票人备注", fontStyle);
iCell = new PdfPCell(new Paragraph(shuxing,fontChinese));
iCell.setBorder(0);// 设置无边框
tableq.addCell(new PdfPCell(iCell));
// iCell = FontUtils.createPdfPCell(filePath1, fontStyle);
iCell = new PdfPCell(new Paragraph(shuxingzhi,fontChinese));
iCell.setBorder(0);// 设置无边框
tableq.addCell(new PdfPCell(iCell));
document.add(tableq);
} catch (Exception de) {
de.printStackTrace();
}
document.close();
System.out.println("OK");
}
}
相关推荐
itext实现pdf打印之二
NULL 博文链接:https://xuningxiaoni.iteye.com/blog/751148
盘点C#中10种高效打印PDF文档的方法
操作PDF文档时,打印是常见的需求之一。针对不同的打印需求,可分多种情况来进行,如设置静默打印、指定打印页码范围和打印纸张大小、双面打印、黑白打印等等。以下是在C#中10种高效打印PDF文档的方法:1、使用iTextSharp库:iTextSharp是一个开源的.NET PDF库,可以用于创建、修改和读取PDF文件。使用它,你可以轻松地读取PDF文件并将其打印出来。代码示例:using iText...
从入门到精通:MediaGo跨平台部署全攻略,Docker+NAS实战案例深度拆解!
本篇将深入解析开源媒体处理工具MediaGo的运作机制,该软件具备跨平台兼容性,支持Windows、MacOS及Linux三大主流操作系统。其核心创新在于采用模块化架构设计,用户无需额外依赖任何插件即可完成快速部署。作为GitHub平台上的开源项目,该工具特别注重用户体验设计,通过Docker容器化方案可无缝接入各类网络存储设备,显著优化系统资源占用并提升数据处理效率。以飞牛云NAS系统为实施案例,本文将详细展示本地化部署全流程。
C# itextsharp打印pdf
提到打印,恐怕对于很多人都不会陌生,无论是开发者,还是非计算机专业的人员都会接触到打印。对于项目开发中使用到打印的地方会非常多,在.NET项目中,选择打印的方式比较多,例如原始的IE网页打印、水晶报表、JS插件实现打印、导出文档打印,以及今天提到的使用itextSharp组件实现PDF打印等等。在.NET中实现PDF打印的组件比较多,例如PDFsharp、Report.NET、sharpPDF、...
用友u8服务器优化,用友U8erp软件运行的性能优化方案图文教程
今天一定要给大家分享一下用友U8erp软件运行的性能优化方案图文教程,以下方案来自用友软件官方维护工程师反馈在在处理客户问题的时候,有一类问题较为挠头,就是诸如用友U8服务器效率低下的问题。比如用友U8运行慢,卡住等,我们暂先不提用友U8软件代码、脚本层面本身的性能提升问题,我们只是基于现有用友U8软件版本,在客户现有环境下排查用友U8软件运行的性能瓶颈,并采取一定的技术手段进行性能调校。本文将推...
iText PDF 打印pdf
iText是一个流行的Java库,可用于处理PDF文件。使用iText,您可以将PDF文档打印到打印机上。 以下是在Java中使用iText打印PDF文档的基本步骤: 创建PdfReader对象,用于读取PDF文档。 创建PrintService对象,表示要使用的打印机。 使用PdfReader对象获取PDF文档的页面数量。 创建一个PrinterJob对象,用于将PDF页面打印到打印机上。 循...
海康机器人visionmaster5.0全局通信西门子S7操作
德国西门子(SIEMENS)公司生产的可编程序控制器在我国的应用也相当广泛,在冶金、化工、印刷生产线等领域都有应用。西门子(SIEMENS)公司的PLC产品包括S7-200、S7-1200、S7-300、S7-400、S7-1500等。西门子S7系列PLC体积小、速度快、标准化,具有网络通信能力,功能更强,可靠性高。S7系列PLC产品可分为微型PLC(如S7-200),小规模性能要求的PLC(如S7-300)和中、高性能要求的PLC(如S7-400)等。
springboot+itextpdf 使用html模板打印PDF 有水印效果
【代码】打印PDF记录。
《QGIS快速入门与应用基础》010:下载过程中常见问题(如网速慢、文件损坏)
针对QGIS下载过程中的常见问题提供了系统解决方案。主要解决下载速度慢(≤100KB/s)和文件损坏两大核心问题:通过切换国内镜像源(如清华大学、阿里云)、使用专业下载工具提升速度;采用MD5/SHA256校验确保文件完整性,并排查存储介质和杀毒软件干扰。文章还包含macOS权限问题、Linux依赖缺失等高频问题的速解方案,并附详细的排查流程图和预防技巧,帮助用户顺利完成QGIS下载。后续将详细介绍安装流程,适合零基础用户参考。
多模态大模型:技术原理与实战 全球多模态大模型介绍
关键词:多模态大模型、深度学习、计算机视觉、自然语言处理、跨模态学习、迁移学习、人工智能随着人工智能技术的飞速发展,多模态大模型已经成为了当前AI领域最热门的研究方向之一。多模态大模型能够同时处理和理解多种类型的数据,如文本、图像、音频和视频等,这为AI系统在复杂场景下的应用提供了更加强大和灵活的能力。本文将深入探讨多模态大模型的技术原理,介绍其实战应用,并对全球主要的多模态大模型进行全面的介绍和比较。
html 转换 pdf 打印,[C#]使用iText7.pdfHtml,以HTML为模板,转换成PDF打印
var pdfDest = "myfiles/" + "hello.pdf";var pdfWriter = newPdfWriter (pdfDest);var pdf = newPdfDocument (pdfWriter);var pageSize = PageSize.A4; //设置默认页面大小,css @page规则可覆盖这个pdf.SetDefaultPageSize (pageSi...
软件设计师考试下午题代码部分详解:23种设计模式全面解析
软件设计师考试的下午题通常会考察设计模式的应用,这部分内容既是重点也是难点。本文将系统地介绍考试中常见的23种设计模式,通过详细代码示例和通俗易懂的讲解,帮助考生掌握这些核心知识点,提高应试能力。概念:提供一个创建一系列相关或相互依赖对象的接口,而无需指定它们具体的类。适用场景:系统要独立于产品的创建、组合和表示时;系统要由多个产品系列中的一个来配置时。@Override@Override@Override@Override// 产品族A@Override。
Demo系列二之IText+Pdfbox实现生成pdf、pdf转图片、java调用打印机打印图片
前言 因公司业务扩展快递业务,有一个功能就是讲发货人相关信息、收货人相关信息使用打印机打印出来,也在网上查询了相关资料,最终经自己测试行程最终方案,希望对有类似需求的大家有所帮助。 准备工作 导入itext-asian.jar ,用于生成pdf文件时字体类型的支持包。 导入itextpdf-5.5.13.jar,用于生成pdf文件时主要支持包。 导入pdfbox-2.0.12.jar,用于...
如何通过 Python 爬虫抓取并分析政府开放数据
通过本文的介绍,我们展示了如何使用Python 爬虫抓取并分析政府开放数据。通过requests获取政府开放数据的 API 接口数据。使用和pandas进行数据清洗与存储。使用matplotlib对数据进行可视化。你可以根据不同的政府开放平台和数据集进行调整,应用于不同领域的数据分析,如公共健康、交通、环保等。
Outlook Express 6 (OE6) for Win7/Win8/Win10
英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。
itext生成打印(操作PDF)
1.用Adobe Acrobat操作pdf 首先用Adobe Acrobat 在文件上添加文本域,表单>添加或编辑域>文本域,如图添加了两个文本域,名称分别是city,name import javax.annotation.Resource; import javax.servlet.ServletOutputStream; import javax.servlet.http.Ht...
jre9下载 jdk9
(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】
poi获取excel打印标题行与表头,itext生成pdf设置打印标题行与表头
visio安装包
Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。
计算机控制技术及应用
《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。
java生成pdf文件并打印
一、前言 前几天,需要实现打印下载报表,经一番查找,选定iText--用于生成PDF文档的一个Java类库。废话不多说,进入正题。 二、iText简介 iText是著名的开放源码的站点sourceforge一个项目,是用于生成PDF文档的一个java类库。通过iText不仅可以生成PDF或rtf的文档,而且可以将XML、Html文件转化为PDF文件。 iText的安装非常方...
iText + freemarker转成pdf字节流打印 无需生成本地pdf文件
iText + freemarker转成pdf字节流打印 无需生成本地pdf文件 本项目为springboot项目 引入依赖 <!-- 模板引擎 代码生成 --> <dependency> <groupId>org.apache.velocity</groupId> <artifactId>velocity-engine-...
itext与javaBean生成pdf实现打印基础
Document document=newDocument ();//文档对象 Rectangle rect = new Rectangle(PageSize.A4.rotate());//打印的纸张类型 BaseFont font=BaseFont.createFont(this.ge...
SpringBoot+Layui 打印PDF
1、下载C_Lodop打印插件 下载插件官网:http://www.lodop.net/ 2、pom.xml添加依赖 <dependency> <groupId>com.itextpdf</groupId> <artifactId>itextpdf</artifactId> <version>5.5.9&...
java itex 打印pdf_iText生成动态pdf打印空白页
我有一个动态pdf表单,它使用iText API以编程方式从xml输入数据填充 . 但是当我们打印填充的动态pdf表单时,会打印空白页 . 如果我们打开并保存输出pdf然后打印,它的工作正常 .任何人都可以帮助为什么是空白页面的原因以及如何解决这个问题?我的表格填写代码:PdfReader reader=new PdfReader(src);PdfStamper stamper = new Pdf...
android网络打印 生成pdf
android通过局域网连接打印机不是很好实现,最近做了个通过android生成pdf上传到后台,后台调用pc驱动完成打印功能。 完整代码请看 http://download.youkuaiyun.com/detail/qq_19827707/9530899
打印系列 —— Java iText 动态 生成 PDF 文档 表格 中文问题
Java iText 动态 生成 PDF文档表格中文问题iText是一个开发源代码的项目,你可以使用iText方便的实现PDF的输出。 一、iText的下载: 你可以在 http://www.lowagie.com/iText/ 查看关于iText的相关信息,包括源代码,文档.. 1.itext-src-1.4.zip(源
iText Silent printing
iText这个免费的东东还真是好用, 之前用它生成、合并PDF文档,完全没有问题。最近客户又有了新需求, 要求说在打开PDF的同时,弹出printer setup dialog . 以下是ITEXT网站里的sample. 在生成pdf的同时,可以加一句javascript到PDF里面去, 来打印这个PDF。Document document = new Document();
Freemarker+Flying sauser +Itext 利用ftl模板生成PDF打印预览
js function printPDF(){ window.open(adminPath+"/officer/cxsxwh/printPDF?&personnelUuid="+personnelUuid+param); ////window.location.href=adminPath+"/officer/cxsxwh/printPDF?&personnelUuid
4405



被折叠的 条评论
为什么被折叠?



