在Java打印输出中实现预格式化页面 [英] Implementing pre formated page in java printout

查看:90
本文介绍了在Java打印输出中实现预格式化页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我目前正在为我的公司开发一个小型会计程序.具体来说,每天结束时都会打印一个标准的两页表格,其中包含天数交易.问题在于此文档(无法以任何方式更改)包含许多始终相同的框线和文本.有没有一种在打印输出中实现它的方法,实际上是使用draw()编码整个东西?具体来说,变化的数据是价格,总和和产品名称.

谢谢!

Hello people
I am currently developing a small accounting programm for my company.I have a problem concerning the programms prontouts. Specifically, there a standard two page form that is printed at the end of every day which contains the days transactions. The problemm is that this document(which cannot be changed in any way) contains a lot of boxes lines and text that are always the same. Is there a way of implementing it in the printout witaout actually coding the whole thing with draw()? Specifically the data tha change are prices,sums and product names.

Thank you!

推荐答案

做到这一点的唯一方法是测量表格并找出要填充的每个盒子的实际位置和大小.然后,您需要编写代码以在页面上的特定位置打印相关值. 本教程 [
The only way to do this is to measure the form and find out the actual position and size of each box to be filled. You then need to write code to print the relevant values at the specific positions on the page. This tutorial[^] should help you work out what is needed.


这篇关于在Java打印输出中实现预格式化页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆