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

Printer question

In my code, I print a dataSet

' get grid's PrintDocument object
Dim pd As System.Drawing.Printing.PrintDocument
pd = flexgrid.PrintParameters.PrintDocument()
' set up the page (landscape, 1.5" left margin)
With pd.DefaultPageSettings
..Landscape = False
..Margins.Left = 50
Dim a As New Printing.PaperSize("Carta", 850, 1100)
..PaperSize = a
End With
' set up header and footer fonts
flexgrid.PrintParameters.HeaderFont = New Font("Tahoma", 10, FontStyle.Bold)
flexgrid.PrintParameters.FooterFont = New Font("Tahoma", 10,
FontStyle.Regular)
' preview the grid
flexgrid.PrintGrid("Calificaciones",
C1.Win.C1FlexGrid.PrintGridFlags.FitToPageWidth +
C1.Win.C1FlexGrid.PrintGridFlags.ShowPreviewDialog , _
Now.ToString("dd/MM/yyyy") + vbCrLf + Now.ToString("HH:mm:ss") _
+ Chr(9) + ObtieneInformacion("escuela") + vbCrLf + "Calificaciones Periodo
" & ObtieneInformacion("periodo") _
+ vbCrLf + "Grado: " & sGrado & " Grupo: " & sGrupo & " Materia: " &
sMateria.Replace(" ", "").Replace("|", " ") _
+ Chr(9) + ObtieneInformacion("seccion") + vbCrLf + "Página {0} de {1}", _
Chr(9) + Chr(9) + _
"Profesor: " & ObtieneInformacion("profesor") + vbCrLf + vbCrLf + vbCrLf +
"Firma: _________________________________")

It works fine, but when printing in a certain printer it prints just strange
characters
I can use this printer from any application in Windows and it works fine
I've already tried to install the printer drivers, but it is still printing
wrong
What can I do?

Alejandra Parra
Mexico
Jul 21 '05 #1
1 1736
Is the printer that prints garbage an HP Laserjet or other postscript
printer?

If it is, then this might help: Open up the machine's Printer Advanced
Options for that printer and look to the settings for TrueType fonts, if
it's set to "Substitute with Device Font" and gives you the option to
"Download as Softfont" then pick the download option and give it a try.

The link below shows a a graphic of the HP options ...

http://www.smithvoice.com/printip.htm

Robert Smith
Kirkland, WA

"Alejandra Parra" <al*******@hotmail.com> wrote in message
news:ev**************@tk2msftngp13.phx.gbl...
In my code, I print a dataSet

' get grid's PrintDocument object
Dim pd As System.Drawing.Printing.PrintDocument
pd = flexgrid.PrintParameters.PrintDocument()
' set up the page (landscape, 1.5" left margin)
With pd.DefaultPageSettings
.Landscape = False
.Margins.Left = 50
Dim a As New Printing.PaperSize("Carta", 850, 1100)
.PaperSize = a
End With
' set up header and footer fonts
flexgrid.PrintParameters.HeaderFont = New Font("Tahoma", 10,
FontStyle.Bold)
flexgrid.PrintParameters.FooterFont = New Font("Tahoma", 10,
FontStyle.Regular)
' preview the grid
flexgrid.PrintGrid("Calificaciones",
C1.Win.C1FlexGrid.PrintGridFlags.FitToPageWidth +
C1.Win.C1FlexGrid.PrintGridFlags.ShowPreviewDialog , _
Now.ToString("dd/MM/yyyy") + vbCrLf + Now.ToString("HH:mm:ss") _
+ Chr(9) + ObtieneInformacion("escuela") + vbCrLf + "Calificaciones
Periodo
" & ObtieneInformacion("periodo") _
+ vbCrLf + "Grado: " & sGrado & " Grupo: " & sGrupo & " Materia: " &
sMateria.Replace(" ", "").Replace("|", " ") _
+ Chr(9) + ObtieneInformacion("seccion") + vbCrLf + "Página {0} de {1}", _
Chr(9) + Chr(9) + _
"Profesor: " & ObtieneInformacion("profesor") + vbCrLf + vbCrLf + vbCrLf +
"Firma: _________________________________")

It works fine, but when printing in a certain printer it prints just
strange
characters
I can use this printer from any application in Windows and it works fine
I've already tried to install the printer drivers, but it is still
printing
wrong
What can I do?

Alejandra Parra
Mexico

Jul 21 '05 #2

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

Similar topics

2
by: Jody Burgess | last post by:
Hi; I am writing my first python program and would like to know how to change stdout to refer to my default printer or any other printer on my network. The other question is, Is there an API set...
2
by: alan | last post by:
I'm now using vb.net to write a POS system with a epson thermal printer. I use the ocx that provided by Epson to drive the printer. It's not the problem if I just using 1 computer vs 1 thermal...
3
by: Mika M | last post by:
Hi all! I have made an application for printing simple barcode labels using PrintDocument object, and it's working fine. Barcode printer that I use is attached to the computer, and this...
4
by: Support | last post by:
Hello: I would like to create my own printer driver so that it is available in all applications through the file ->Print menu of applications. The driver will essentially take the contents of what...
11
by: pamelafluente | last post by:
I am doing my own PrintDialog, and have placed there a combo with the printer names, as in the PrintDialog provided by VB.NET. Here is the question: how do I open the native windows printer...
1
by: pigge79 | last post by:
Hi there, We are thinking of developing a product that needs to be able to parse data printed via some printer driver. The data will then be used to fill a PDF form. We believe the printer...
8
by: nrandell via AccessMonster.com | last post by:
I'm running Access2000 Have a front end app with 20 users scattered around the state with a back end server db centrally located. Takes a long time for outlying users to load the app. Eventually...
0
by: Robert Dufour | last post by:
I have an application that is a IVR (intercative voice response) application that can use multiple telephone lines simultaneously using a dialogic card. One of the things I need to do is use a...
3
by: NewToNetworks | last post by:
Hi, hello, help! I am new to networking so please forgive me if this is a simple question. I have been at this for hours to no avail. I"m trying to network my Mac G5, running OSX 10.4.7 Tiger, a...
0
by: jigsmshah | last post by:
i am working on a project (windows service using VB.Net and C#) which gets the check details and check images from the database and prints the check to a printer. Printer name is configured in a...
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...
0
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...
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: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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.