Printer question

  • Thread starter Thread starter Alejandra Parra
  • Start date Start date
A

Alejandra Parra

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
 
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
 
Back
Top