Hi all
I have a problem with printing a report card to laser printer.
Everything works properly on ink-jet printer, but when I use laser
printer , it's not in predifined format. everything is mix-up.
Bitmap bmpi = new Bitmap(1169, 827);
Graphics bmp = Graphics.FromIm age(bmpi);
bmp.FillRectang le(Brushes.Gray , 20.0F, 140.0F, 1130.0F, 510.0F);
bmp.FillRectang le(Brushes.Whit e, 10.0F, 130.0F, 1130.0F, 510.0F); 1 2571
Hello
If the units of the numbers in your program is pixels, then the reason of
the problem might be that you are hardcoding the values in the code. These
values may work well with your ink-jet printer which has a most probably has
a different resolution than your laser printer. The solution is either use a
unit that's doesn't change from device to another such as millimeters, or
detect the printer resolution at runtime and scale the values according the
the resolution.
Best regards,
Sherif
"Mina Gohari" <mg*****@yahoo. com> wrote in message
news:#a******** ******@TK2MSFTN GP15.phx.gbl... Hi all
I have a problem with printing a report card to laser printer. Everything works properly on ink-jet printer, but when I use laser printer , it's not in predifined format. everything is mix-up.
Bitmap bmpi = new Bitmap(1169, 827); Graphics bmp = Graphics.FromIm age(bmpi);
bmp.FillRectang le(Brushes.Gray , 20.0F, 140.0F, 1130.0F, 510.0F); bmp.FillRectang le(Brushes.Whit e, 10.0F, 130.0F, 1130.0F, 510.0F);
bmp.DrawRectang le(Pens.Black, 980, 665, 120, 30); bmp.DrawString( "Ù.شاÙ^ر Ù? Ø¢Ù.Ù^زشÛO", subTitle, Brushes.Black, 1040, 665, titleFr); bmp.DrawString( "http://www.olgou.com", new Font("Arial", 13, FontStyle.Under line), Brushes.Blue, 900, 795); bmpi.RotateFlip (RotateFlipType .Rotate90FlipNo ne); e.Graphics.Draw Image(bmpi, 0.0f, 0.0f, 827.0f, 1169.0f);
any help is appreciated.
Thanks *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Gary |
last post by:
Hi all,
Can anyone point me to a sample on how to print a picture box image to a
printer or do you have sample code that could show me?
Thanks,
Gary
|
by: qumpus |
last post by:
My program right now generates USPS style shipping label using
System.Drawing.Graphics. It works fine except that the printer prints really
slowly. I want to make my program take advantage of true type fonts. So I
assume it's possible to send Font Type and the text to the printer, and the
printer should digest and print faster. Still, barcode info needs to be sent
as an image.
When I print fifty copies of the same label it prints really...
|
by: Tessa |
last post by:
Is there any security reason why you cannot print to a network printer from
ASP.NET under IIS6 on Windows 2003 server?
I'm using ASP.NET code to print to a server print queue using
PrintDocument.Print()
(.NET framework v 1.1)
I can print to a local printer plugged into LPT1 on the web server, but not
to a network printer.
The same printing code to a network printer works in a .NET web app when
|
by: HardWorker |
last post by:
My OnDraw() shows a bitmap via pDC->StretchBlt(), and when I send it to an
inkjet printer it looks fine. But when I send it to a laser printer, the
picture is gone -- but text and lines that I added are still there. I've
tried two different laser printers, and lots of settings, but no luck.
Is this a bug in the printer drivers, or what? Can anyone help?
|
by: c_shah |
last post by:
How to change and set default printer using Visual Basic 2005
The following works within my VB 2005 application but does any one have
better alternative.
/****
Dim wshnetwork As Object = CreateObject("WScript.Network")
Dim printerpath As Object = "TIFF Image Printer 7.0"
wshnetwork.SetDefaultPrinter(printerpath)
**/
| |
by: Raman |
last post by:
Hello friends,
I want to print an ID card. I have one Windows Form that contains front
and back side. The printer is printing both front and back side at a
time. I am trying to send both sides at a time. But it is printing
front side on one card and back side on second card. I want to print
both sides in a same card.
|
by: cjreynolds |
last post by:
Please excuse my cluelessness on the subject - this is the first time I've worked with printing in VB (and it may be the last) and the more I work with it, the more confused I become...
First, I'm setting the printer's scale and the X,Y position of the output:
Sub SetLargePrinterScale(obj As Object, VertPosition As Single)
Dim Owid As Single
Dim Ohgt As Single
Dim Pwid As Single
Dim Phgt As Single
Dim Xmid As Single
|
by: deric |
last post by:
Hi! I'm new to VB.net programming on printing a page to a thermal printer (Epson T88IV). I really had a hard time figuring out how to code the printing of a bitmap image and some text, while sending commands (through font control) to the printer.
I tried sending the escape characters with Control font, but the Graphics.DrawString of PrintPageEventArgs do not allow it.. so I used the RawPrinterHelper class I found on Microsoft KB. It worked out...
|
by: josephlapuz |
last post by:
Hi people,
can someone help me on this label zebra f*ck printer? I'm using the old zebra t300 printer for printing pharmacy labels. it prints well using printdocument of visual C#.net 2005. but it took 10seconds before the image can be printed. i was hoping i could print within 3-5seconds at most since clients are complaining of slow printing.
the average image bytes being sent to the printer is 12KB for image. If I print an image around...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
| |
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |