473,805 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2674
On Thu, 21 Aug 2003 06:21:59 -0700, Jordan <jo****@nospamp lease.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
1434
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 label). I have opened up the report at my development computer and choose a local printer (dot matrix) attatched locally. When I print the report to the printer that is connected to my development machine, it works fine when print locally and...
0
1829
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 from my development machine, however when i deploy the application to another machine, the report always show the default A4 paper size. I have already setup the exact printer driver and custom paper size at the other machine but result comes out...
7
5681
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 method for checking if the file exists, preventing it from overwriting files from other directories, and setting a user-configurable maximum limit on the file's size. The former two, I can handle by myself with no problem. However, the I'm having a...
0
2162
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 to the custom paper size. Is there a way to print the report to a spesific printer with a spesific papersize. So if I want to print my report, all I need is to click a button, then It will print with the correct papersize(not the default one),...
0
1233
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 figure out this? I am using following code: Dim customPaperSize As New PaperSize("11x9", 1100, 900) pdMain.DefaultPageSettings.PaperSize = customPaperSize
4
2816
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 figure out this? I am using following code: Dim customPaperSize As New PaperSize("11x9", 1100, 900) pdMain.DefaultPageSettings.PaperSize = customPaperSize
1
6513
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" setting to be "E_ALL", notices are still not getting reported. The perms on my file are 664, with owner root and group root. The php.ini file is located at /usr/local/lib/php/php.ini. Any ideas why the setting does not seem to be having an effect? ...
6
12436
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 card is 79mm high and 210 mm large, and each card is on a paper with the same size, but I'm unable (don't know really how) to create a report to print out my cards as defined.
2
10035
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 invoices with many items on it and once past 297mm, the rest are lost (not printed)
0
9718
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10614
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10363
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10369
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5544
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4327
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3847
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.