Itext生成PDF打印

java-pdf-itext7、itextpdf 生成pdf 文档 定制票据打印 1、如果是收据或者其他不是A4大小的票据,首先将票据用打印机扫描成图片格式,用ps等工具裁剪成实际票据的大小备用。 2、设计一张实际票据大小的空白pdf模板,备用。 3、用Adobe 等pdf编辑工具打开上面制作的空白模板,点击编辑,在更多->背景->添加->选文件->浏览,选中步骤1制作的票据点击确定。 4、在菜单栏中选择准备表单,点击开始,保存到相应的文件夹。 5、在需要填入值的地方添加文本域,设置域名称,需要注意的一点 设置外观->文字大小选项中,一定设置文字大小和 阅读详情

用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实现方式 首先需要把浏览器的插件配置成功,具体步骤请看:https://helpx.adobe.com/acrobat/using/display-pdf-browser-acrobat-xi.html 使用iText实现pdf的生成:导入itext-pdfa-5.5.5.jar 和itext-xtra-5.5.5.jar 和itextpdf-5.5.5.jar 一共5步生成pdf:1、创建文档:Doc 阅读详情

相关推荐

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...

zls365365的博客 4409

利用HipSTR从二代测序数据中精准解析短串联重复序列(STR)的遗传多态性

本文详细介绍了如何利用HipSTR工具从二代测序(NGS)数据中精准解析短串联重复序列(STR)的遗传多态性。通过三步走策略,HipSTR能够高效识别STR区域、估算重复次数并判定基因型,适用于法医鉴定、疾病研究和细胞系鉴定等多个领域。文章还提供了实战操作指南和常见问题解决方案,帮助研究者充分利用NGS数据开展STR分析。

weixin_28702105的博客 485

C# itextsharp打印pdf

提到打印,恐怕对于很多人都不会陌生,无论是开发者,还是非计算机专业的人员都会接触到打印。对于项目开发中使用到打印的地方会非常多,在.NET项目中,选择打印的方式比较多,例如原始的IE网页打印、水晶报表、JS插件实现打印、导出文档打印,以及今天提到的使用itextSharp组件实现PDF打印等等。在.NET中实现PDF打印的组件比较多,例如PDFsharp、Report.NET、sharpPDF、...

weixin_68436326的博客 4467

MobilenetV1、V2、V3系列详解

Mobilenet系列模型作为当前主流的端侧轻量级模型被广泛应用,很多算法都会使用其作为backbone提取特征,这一章对Mobilenet系列模型V1,V2,V3做一个总结。

turned的博客 1万+

SurfaceControlViewHost使用介绍

可以看到,主要用途:是把一个进程的View显示到另外一个进程里面。

chadm.xiang 1293

iText PDF 打印pdf

iText是一个流行的Java库,可用于处理PDF文件。使用iText,您可以将PDF文档打印到打印机上。 以下是在Java中使用iText打印PDF文档的基本步骤: 创建PdfReader对象,用于读取PDF文档。 创建PrintService对象,表示要使用的打印机。 使用PdfReader对象获取PDF文档的页面数量。 创建一个PrinterJob对象,用于将PDF页面打印到打印机上。 循...

weixin_42601134的博客 791

用LTspice仿真Buck电路输出电容:从参数计算到波形优化的全流程演示

本文详细介绍了使用LTspice仿真Buck电路输出电容的全流程,从理论计算到波形优化。通过解析关键参数如纹波电压、瞬态响应和ESR,结合工程计算方法和LTspice仿真技巧,帮助工程师优化Buck电路设计,解决输出纹波过大和瞬态响应不佳的问题。

night的博客 855

springboot+itextpdf 使用html模板打印PDF 有水印效果

【代码】打印PDF记录。

weixin_43470118的博客 1562

第28节:cesium 加载高程数据(含源码+视频)

cesium 加载高程(地形)数据

qq_29384639的博客 1743

杰理接入第三方升级协议OTA教程

本教程介绍了使用dual_bank_updata_api.h接口接入第三方协议进行固件升级的方法。主要内容包括:INI配置要求(需启用双备份并强制4K对齐)、7个核心API接口功能说明及参数详解(初始化、空间检查、数据写入、校验等)、标准升级流程步骤(初始化→检查→写入→校验→引导→清理)。特别强调了4K对齐配置的重要性以避免数据丢失,并提供了被动升级流程图。该方案支持用户自定义协议接入,需严格按照流程调用接口完成升级。

qq_42014563的博客 1435

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...

weixin_30842027的博客 494

故障排查:OpenClaw 更新后 feishu 插件路径失效的解决方法

OpenClaw 更新后 feishu 插件路径失效的解决方法发现问题→ Gateway 启动失败,报插件路径错误定位原因→ OpenClaw 目录结构变化,→解决问题→ 更新为正确的路径验证修复→ 使用确认一切正常。

刘一说的IT专栏 1311

Demo系列二之IText+Pdfbox实现生成pdf、pdf转图片、java调用打印机打印图片

前言 因公司业务扩展快递业务,有一个功能就是讲发货人相关信息、收货人相关信息使用打印机打印出来,也在网上查询了相关资料,最终经自己测试行程最终方案,希望对有类似需求的大家有所帮助。 准备工作 导入itext-asian.jar ,用于生成pdf文件时字体类型的支持包。 导入itextpdf-5.5.13.jar,用于生成pdf文件时主要支持包。 导入pdfbox-2.0.12.jar,用于...

wjt的博客 6361

如何解除“无法完成操作 因为文件包含病毒或潜在垃圾软件”

当运行软件遇到“无法完成操作 因为文件包含病毒或潜在垃圾软件”时,如何解决?控制面板-系统和安全-Windows Defender防火墙-自定义设置,将专用网络及公用网络关闭。点击后,选择“病毒和威胁防护”-管理配置。进入安全中心后,选择“病毒和威胁防护”将需要排斥的选项输入后,保存配置即可。2:打开windows安全中心。

笔者从事电信媒体开发多年,愿意将多年的开发经验分享给同行 6万+

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

itext生成打印(操作PDF)

1.用Adobe Acrobat操作pdf 首先用Adobe Acrobat 在文件上添加文本域,表单>添加或编辑域>文本域,如图添加了两个文本域,名称分别是city,name import javax.annotation.Resource; import javax.servlet.ServletOutputStream; import javax.servlet.http.Ht...

Alone_IT的博客 1921

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

poi获取excel打印标题行与表头,itext生成pdf设置打印标题行与表头

wolovedaima123的博客 1107

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

java生成pdf文件并打印

一、前言   前几天,需要实现打印下载报表,经一番查找,选定iText--用于生成PDF文档的一个Java类库。废话不多说,进入正题。   二、iText简介   iText是著名的开放源码的站点sourceforge一个项目,是用于生成PDF文档的一个java类库。通过iText不仅可以生成PDF或rtf的文档,而且可以将XML、Html文件转化为PDF文件。   iText的安装非常方...

Stone.鱼儿的博客 1万+

iText + freemarker转成pdf字节流打印 无需生成本地pdf文件

iText + freemarker转成pdf字节流打印 无需生成本地pdf文件 本项目为springboot项目 引入依赖 <!-- 模板引擎 代码生成 --> <dependency> <groupId>org.apache.velocity</groupId> <artifactId>velocity-engine-...

Njy 1778

itext与javaBean生成pdf实现打印基础

Document document=newDocument ();//文档对象 Rectangle rect = new Rectangle(PageSize.A4.rotate());//打印的纸张类型 BaseFont font=BaseFont.createFont(this.ge...

202

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&...

bigsimpleton的博客 2969

java itex 打印pdf_iText生成动态pdf打印空白页

我有一个动态pdf表单,它使用iText API以编程方式从xml输入数据填充 . 但是当我们打印填充的动态pdf表单时,会打印空白页 . 如果我们打开并保存输出pdf然后打印,它的工作正常 .任何人都可以帮助为什么是空白页面的原因以及如何解决这个问题?我的表格填写代码:PdfReader reader=new PdfReader(src);PdfStamper stamper = new Pdf...

weixin_35636570的博客 674

android网络打印 生成pdf

android通过局域网连接打印机不是很好实现,最近做了个通过android生成pdf上传到后台,后台调用pc驱动完成打印功能。 完整代码请看 http://download.csdn.net/detail/qq_19827707/9530899

qq_19827707的专栏 2525

打印系列 —— Java iText 动态 生成 PDF 文档 表格 中文问题

 Java iText 动态 生成 PDF文档表格中文问题iText是一个开发源代码的项目,你可以使用iText方便的实现PDF的输出。  一、iText的下载:   你可以在 http://www.lowagie.com/iText/ 查看关于iText的相关信息,包括源代码,文档..   1.itext-src-1.4.zip(源

5848

iText Silent printing

iText这个免费的东东还真是好用, 之前用它生成、合并PDF文档,完全没有问题。最近客户又有了新需求, 要求说在打开PDF的同时,弹出printer setup dialog . 以下是ITEXT网站里的sample. 在生成pdf的同时,可以加一句javascript到PDF里面去, 来打印这个PDF。Document document = new Document();   

lisa429的专栏 2242

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

u014467070的博客 2738
下一篇: poi包 EXCEL模板读取填数据并导出以及在模板某行插入新的行
gojava
博客等级 码龄24年 352粉丝 33原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址