Printing Trouble
-
9. února 2012 22:33
i m developing one Cheque Printing Module It is Working on my system LaserJet 1007 HP(all Print Name Date Amount and Currency on given Location. But when I transfer to another system with different HP2100all in one series Inkjet Printer. All location of Print with Some Bit Different Drawing Point Like if Date is Print on frist on 25 in II printer System its Print on 23 or some other ,cahange every time and another big trouble is Date is Printing with 10 digits on my printer but another Printer its Print 8 digits Only. I m using doc print. with custom paper Size.
paper size i took in in cem. drawing Point (x,Y) change Why ?
Please Help ?
- Upravený Anil Kumar Vyas 9. února 2012 23:16
Všechny reakce
-
13. února 2012 5:44Moderátor
Hi Anil,
Welcome to the MSDN Forum.
What do you mean "Print on frist on 25"? what is the meaning of the number 25?
Would you like to just print a simple things in word with the two printers to check whether the issue is not related to the printer and it is related to your program?
If you tried it, I appreciate you can post the result here.
Best regards,
Mike Feng
MSDN Community Support | Feedback to us
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
-
13. února 2012 19:39
Hello Mike Feng Thanks for support. I mean to say point location of drawing.
i m writing following code for cheque printing
Dim Num2 As Double = 0.254
Dim PageWidth As Integer = 390 cm
Dim PageHeight As Integer = 850 cmPrintDocument1.DefaultPageSettings.Landscape = True
'PrintDocument1.DefaultPageSettings.PaperSize = New System.Drawing.Printing.PaperSize("Custom", PageWidth * Num2, PageHeight * Num2)
PrintDocument1.DefaultPageSettings.PaperSize = New System.Drawing.Printing.PaperSize("Custom", PageWidth, PageHeight)
PrintDocument1.DefaultPageSettings.Margins.Bottom = (0.15)
PrintDocument1.DefaultPageSettings.Margins.Top = (0.15)
PrintDocument1.DefaultPageSettings.Margins.Left = (0.25)
PrintDocument1.DefaultPageSettings.Margins.Right = (0)
PrintDocument1.DefaultPageSettings.PrinterSettings.PrinterResolutions.Item(0).ToString()------Set Date ( Box Format on Cheque)-----------------------------------------------------------
e.Graphics.DrawString(Mid(DD.Text, 1, 1), M_ChequeDate, Brushes.Black, 635, 21)
e.Graphics.DrawString(Mid(DD.Text, 2, 1), M_ChequeDate, Brushes.Black, 655, 21)
e.Graphics.DrawString(Mid(MM.Text, 1, 1), M_ChequeDate, Brushes.Black, 675, 21)
e.Graphics.DrawString(Mid(MM.Text, 2, 1), M_ChequeDate, Brushes.Black, 695, 21)
e.Graphics.DrawString(Mid(YYYY.Text, 1, 1), M_ChequeDate, Brushes.Black, 715, 21)
e.Graphics.DrawString(Mid(YYYY.Text, 2, 1), M_ChequeDate, Brushes.Black, 735, 21)
e.Graphics.DrawString(Mid(YYYY.Text, 3, 1), M_ChequeDate, Brushes.Black, 755, 21)
e.Graphics.DrawString(Mid(YYYY.Text, 4, 1), M_ChequeDate, Brushes.Black, 775, 21)
-- Name of Cheque ussue
e.Graphics.DrawString(ChequePartyName.Text, M_PartyName, Brushes.Black, 95, 65)
'Cheque Amount
e.Graphics.DrawString(ChequeAmount.Text, M_Curint, Brushes.Black, 640, 130)
When I print All of this to my printer. All the Given Location Come correctly but when i try the exe on any other pc with some diff printer result come like as Date must be print 12-04-2012 but result is 12 04 20 ( last no of the year not printing) and the Chequegiven name print on some bit top of given drawing point and same effect witll all drawing point. i do not how to solve this issue. ihad tried so much. where i m doing worng ?.i m using not page bounds because page is custom size. Please Help Me
- Sloučený Mike FengMicrosoft Contingent Staff, Moderator 21. února 2012 10:34 duplicate
-
15. února 2012 5:34Moderátor
Hi Anil,
Nice to see you again.
Based on your description, it seems that it is similar with your another thread but much more detailed, so would you mind I merge this one with: http://social.msdn.microsoft.com/Forums/en-US/vbpowerpacks/thread/ab1ecd2e-5449-4f35-ab4a-e1f0b99947a8
As I suggested, please try to print something with word with the two printer to make sure there is nothing to do with your code, but the printers.
Best regards,
Mike Feng
MSDN Community Support | Feedback to us
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- Označen jako odpověď Mike FengMicrosoft Contingent Staff, Moderator 21. února 2012 10:33
- Zrušeno označení jako odpověď Mike FengMicrosoft Contingent Staff, Moderator 21. února 2012 10:34