Printer question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alejandra Parra

    Printer question

    In my code, I print a dataSet

    ' get grid's PrintDocument object
    Dim pd As System.Drawing. Printing.PrintD ocument
    pd = flexgrid.PrintP arameters.Print Document()
    ' set up the page (landscape, 1.5" left margin)
    With pd.DefaultPageS ettings
    ..Landscape = False
    ..Margins.Left = 50
    Dim a As New Printing.PaperS ize("Carta", 850, 1100)
    ..PaperSize = a
    End With
    ' set up header and footer fonts
    flexgrid.PrintP arameters.Heade rFont = New Font("Tahoma", 10, FontStyle.Bold)
    flexgrid.PrintP arameters.Foote rFont = New Font("Tahoma", 10,
    FontStyle.Regul ar)
    ' preview the grid
    flexgrid.PrintG rid("Calificaci ones",
    C1.Win.C1FlexGr id.PrintGridFla gs.FitToPageWid th +
    C1.Win.C1FlexGr id.PrintGridFla gs.ShowPreviewD ialog, _
    Now.ToString("d d/MM/yyyy") + vbCrLf + Now.ToString("H H:mm:ss") _
    + Chr(9) + ObtieneInformac ion("escuela") + vbCrLf + "Calificaci ones Periodo
    " & ObtieneInformac ion("periodo") _
    + vbCrLf + "Grado: " & sGrado & " Grupo: " & sGrupo & " Materia: " &
    sMateria.Replac e(" ", "").Replace("|" , " ") _
    + Chr(9) + ObtieneInformac ion("seccion") + vbCrLf + "Página {0} de {1}", _
    Chr(9) + Chr(9) + _
    "Profesor: " & ObtieneInformac ion("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


  • smith

    #2
    Re: Printer question

    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 ...



    Robert Smith
    Kirkland, WA



    "Alejandra Parra" <alparrita@hotm ail.com> wrote in message
    news:eve5yDAzEH A.1188@tk2msftn gp13.phx.gbl...[color=blue]
    > In my code, I print a dataSet
    >
    > ' get grid's PrintDocument object
    > Dim pd As System.Drawing. Printing.PrintD ocument
    > pd = flexgrid.PrintP arameters.Print Document()
    > ' set up the page (landscape, 1.5" left margin)
    > With pd.DefaultPageS ettings
    > .Landscape = False
    > .Margins.Left = 50
    > Dim a As New Printing.PaperS ize("Carta", 850, 1100)
    > .PaperSize = a
    > End With
    > ' set up header and footer fonts
    > flexgrid.PrintP arameters.Heade rFont = New Font("Tahoma", 10,
    > FontStyle.Bold)
    > flexgrid.PrintP arameters.Foote rFont = New Font("Tahoma", 10,
    > FontStyle.Regul ar)
    > ' preview the grid
    > flexgrid.PrintG rid("Calificaci ones",
    > C1.Win.C1FlexGr id.PrintGridFla gs.FitToPageWid th +
    > C1.Win.C1FlexGr id.PrintGridFla gs.ShowPreviewD ialog, _
    > Now.ToString("d d/MM/yyyy") + vbCrLf + Now.ToString("H H:mm:ss") _
    > + Chr(9) + ObtieneInformac ion("escuela") + vbCrLf + "Calificaci ones
    > Periodo
    > " & ObtieneInformac ion("periodo") _
    > + vbCrLf + "Grado: " & sGrado & " Grupo: " & sGrupo & " Materia: " &
    > sMateria.Replac e(" ", "").Replace("|" , " ") _
    > + Chr(9) + ObtieneInformac ion("seccion") + vbCrLf + "Página {0} de {1}", _
    > Chr(9) + Chr(9) + _
    > "Profesor: " & ObtieneInformac ion("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
    >
    >[/color]


    Comment

    Working...