473,394 Members | 1,709 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Setting a Custom Print Size: BUG?

I have written a small C# application that will print out
labels from a little label printer we have. However the
size (how long the label is) is determined by a database
call.

I need to specify a custom paper size every time the
print button is clicked. Is there a way to set a custom
print size on the fly?

I read somewhere else on the newsgroup that you can't do
that, and its a bug in the framework and I would have to
use API calls. I am trying to avoid that as much as I
possibly can.

Thanks in advance.

Nov 15 '05 #1
1 2643
On Thu, 21 Aug 2003 06:21:59 -0700, Jordan <jo****@nospamplease.com> wrote:
I have written a small C# application that will print out labels from a
little label printer we have. However the size (how long the label is) is
determined by a database call.

I need to specify a custom paper size every time the print button is
clicked. Is there a way to set a custom print size on the fly?

I read somewhere else on the newsgroup that you can't do that, and its a
bug in the framework and I would have to use API calls. I am trying to
avoid that as much as I possibly can.

Thanks in advance.


I haven't done much printing, but look at handling the PrintPage event.
You get handled a graphics object that you draw on as if it were the
screen. Different sized labels would be drawn differently.

Take care to specify HasMorePages = false when you are done or you will
print infinite blank pages (trust me).

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Vanessa | last post by:
Hi I'm using crystal report v9.2 advanced and my development tool is VB.net under Win XP Professional. I'm trying to use the report to print to a printer with a defined custom size (continuous...
0
by: Desmond | last post by:
hi, I am trying to print a report (custom paper size- 8.5inchx5.5inch) to a panasonic KX1121 dot matrix printer using crystal report that comes with vs.net 2003. The report print & preview ok...
7
by: Joey C. | last post by:
Hello, I'm designing a small "briefcase" program that will allow me to quickly upload, download, and delete files in a briefcase. The only real things that I have left to do are to design a...
0
by: Alphonse | last post by:
Hi, I have an application that need to print a report (Crystal Report) using a custom paper size. The problem is, everytime I want to print it, I need to go to printer properties & set the paper...
0
by: Sukh | last post by:
Hi, I am tring to change the paper size from default to custom paper size. In print preview its showing my custom size but when I print it print on default paper size. Can any one help me to...
4
by: Sukh | last post by:
Hi, I am tring to change the paper size from default to custom paper size. In print preview its showing my custom size but when I print it print on default paper size. Can any one help me to...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
6
by: Brewtzaff | last post by:
Hello, I have a little problem to print my reports on custom sized paper. I got a db containing clubmembers, a query which selects only the needed infos to print out my membershipcards. My...
2
by: Steve | last post by:
Hi All Using VB.net 2008, windows forms application on Windows XP SP2 I need to set the paper size when printing to an 80mm Epson docket printer using windows drivers Some customers have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.