打印文件尺寸 [英] Print Document Size

查看:103
本文介绍了打印文件尺寸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.


正在使用C#构建收据生成器应用程序.现在正面临一个问题.


我使用
创建了一些收据模板
Graphics.Drawline并完美地完成了..但随后出现了真正的麻烦.现在我想更改页面大小.我面前的任务是

如果我选择页面大小A4,则收据应在A4中.如果页面尺寸较小,则收据也应为小格式.

我有一些问题:

1.我应该根据纸张尺寸增加或减少行长吗?

2.如果要用特定的坐标定义每条线有什么问题吗?即:在绘制收据时,我从未将坐标分配给任何变量.

3.如何实现此任务:-D?

Hi .


Am buliding a receipt generator application using C#. Now am facing a problem.


I created some receipt templates using

Graphics.Drawline and it is done perfectly .. but then came the real trouble. Now i want to change my page size . The task ahead of mine is

if i select a page size A4 then the receipt should come in A4 . if the page size is lesser then the receipt should also come in small format .

I have some questions:

1. Should i increase or decrease the lines length according to the papersize?

2.Is there any problem if am defining each line with specific co-ordinates? ie: while drawing a receipt i never allovated any co-ordinates to any variables.

3. How can i achieve this tasks :-D ?

推荐答案

提供了您正在使用Width和Height参数绘制线条的方法,而不是固定长度的方法,例如"1000"或"675"应该没问题.如果使用绝对值,则会遇到问题.

试试吧!使用打印预览"(如果您没有要发布的版本,可以启用它进行测试),然后看看会发生什么-就纸张而言,它可以更快,更高效...
Provided that you are using the Width and Height parameters to draw your lines, rather than fixed lengths such as "1000" or "675" you should be fine. If you are using absolute values, then you will have problems.

Try it! Use Print Preview (enable it for testing if you don''t have it for release) and see what happens - it is a lot quicker and more efficient in terms of paper...


这篇关于打印文件尺寸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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