473,323 Members | 1,560 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,323 software developers and data experts.

The data area passed to a system call is too small



i am traing to print usisng printer (samsung srp-350) for invoice
printing
but nothing so far...
-----------------------
Private Sub Button1_Click_4(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
printFont = New Font("Arial", 10)
Dim pd As New PrintDocument
'pd.PrinterSettings.PrinterName = "HP Deskjet D1400
series"
pd.PrinterSettings.PrinterName = "SAMSUNG SRP350"

AddHandler pd.PrintPage, AddressOf pd_PrintPage

pd.Print()

End Sub
Private Sub pd_PrintPage(ByVal sender As Object, ByVal ev As
PrintPageEventArgs)
ev.Graphics.DrawString("a", printFont, Brushes.Black, 2, 4)

End Sub

--------------------------
it works witht othre pritners but this samsung srp-350 is not working

as a result from the code above i got this exception:
--------------------------
An unhandled exception of type 'System.ComponentModel.Win32Exception'
occurred in system.drawing.dll
Additional information: The data area passed to a system call is too
small
----------------------------------------------
any idea how to sovlve this ?
Jun 27 '08 #1
2 4196
Hi,

I don't see this one in your code.
(copied from MSDN)

\\\
If pd.PrinterSettings.IsValid then
pd.Print()
Else
MessageBox.Show("Printer is invalid.")
End If
///

Cor

"alhulimy" <al******@gmail.comschreef in bericht
news:43**********************************@m45g2000 hsb.googlegroups.com...
>

i am traing to print usisng printer (samsung srp-350) for invoice
printing
but nothing so far...
-----------------------
Private Sub Button1_Click_4(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
printFont = New Font("Arial", 10)
Dim pd As New PrintDocument
'pd.PrinterSettings.PrinterName = "HP Deskjet D1400
series"
pd.PrinterSettings.PrinterName = "SAMSUNG SRP350"

AddHandler pd.PrintPage, AddressOf pd_PrintPage

pd.Print()

End Sub
Private Sub pd_PrintPage(ByVal sender As Object, ByVal ev As
PrintPageEventArgs)
ev.Graphics.DrawString("a", printFont, Brushes.Black, 2, 4)

End Sub

--------------------------
it works witht othre pritners but this samsung srp-350 is not working

as a result from the code above i got this exception:
--------------------------
An unhandled exception of type 'System.ComponentModel.Win32Exception'
occurred in system.drawing.dll
Additional information: The data area passed to a system call is too
small
----------------------------------------------
any idea how to sovlve this ?
Jun 27 '08 #2
On 11 ãÇíæ, 08:58, "Cor Ligthert[MVP]" <notmyfirstn...@planet.nl>
wrote:
Hi,

I don't see this one in your code.
(copied from MSDN)

\\\
*If pd.PrinterSettings.IsValid then
* * * * * * * *pd.Print()
* * * * * * Else
* * * * * * * *MessageBox.Show("Printer is invalid.")
* * * * * * End If
///

Cor

"alhulimy" <alhul...@gmail.comschreef in berichtnews:43**********************************@m 45g2000hsb.googlegroups.com...


i am traing to print usisng printer (samsung srp-350) for invoice
printing
but nothing so far...
-----------------------
Private Sub Button1_Click_4(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
* * * * * *printFont = New Font("Arial", 10)
* * * * * *Dim pd As New PrintDocument
* * * * * *'pd.PrinterSettings.PrinterName = "HP Deskjet D1400
series"
* * * * * *pd.PrinterSettings.PrinterName = "SAMSUNG SRP350"
* * * * * *AddHandler pd.PrintPage, AddressOf pd_PrintPage
* * * * * *pd.Print()
* *End Sub
* *Private Sub pd_PrintPage(ByVal sender As Object, ByVal ev As
PrintPageEventArgs)
* * * *ev.Graphics.DrawString("a", printFont, Brushes.Black, 2, 4)
*End Sub
--------------------------
it works witht othre pritners but this samsung srp-350 is not working
as a result from the code above i got this exception:
--------------------------
An unhandled exception of type 'System.ComponentModel.Win32Exception'
occurred in system.drawing.dll
Additional information: The data area passed to a system call is too
small
----------------------------------------------
any idea how to sovlve this ?- ÅÎÝÇÁ ÇáäÕ ÇáãÞÊÈÓ -

- ÚÑÖ ÇáäÕ ÇáãÞÊÈÓ -
I add to my code but stilll I face the same problem
any idea ?
Jun 27 '08 #3

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

Similar topics

0
by: Ashish | last post by:
Hi all, I am building an HTML to PDF converter using dotnet. I am using a printer driver to convert HTML to PDF dynamically. I am printing my documents using that Printer driver so it converts it...
1
by: DCraig | last post by:
I'm having problems printing to a line printer from both Crystal Reports and SQL Server reporting services using dotnet. When I try and print a report from an application with Crystal I get the...
1
by: Anonieko | last post by:
Here are some of the approaches. 1. Transform DataGrid http://www.dotnetjohn.com/articles.aspx?articleid=36 3. Use the Export approach ...
6
by: jeet_sen | last post by:
Hi, I have a file containing variables defined in javascript syntax, like, var a = 15; var list = ; .. .. I want to load this external file dynamically and read in the data. I can successfuly...
5
nmm32
by: nmm32 | last post by:
I have a DataGrid which displays data with the aid of a procedure. I have tested the procedure inside the database and it is working fine. I have another procedure which adds another row to the...
7
by: Morias | last post by:
I have been trying to install a Zebra LP2844 on a computer running Windows XP. When using the add printer wizard I get an error that simply tells me "The printer could not be installed," but when...
30
by: David Mathog | last post by:
Every so often I find a need to move data in or out of functions which are not called directly. For instance, alarm handlers or the compare function used by qsort. In these cases there is no...
10
by: Markgoldin | last post by:
I am sending an XML data from not dontnet process to a .Net via socket listener. Here is a data sample: <VFPData> <serverdata> <coderun>updateFloor</coderun> <area>MD2</area>...
0
by: saijin | last post by:
I'm planning to call a list of data from an XML file but when I duplicate the content inside the <data></data> it is not showing anything Here's the ActionScript 3.0 import...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.