Courier New font is blurry/sponge when printing to dotmatrix printer

677 Views Asked by At

When printing to dotmatrix printer, I noticed the texts in "Courier New" font are blurry/sponge when using GrapeCity's Document PDF.

To make sure it's not a printer driver issues, I used MS Word & set that text to "Courier New" with same font size as the one used in GrapeCity PDF. I then print it from MS Word, the text are crystal clear so I know the printer driver & Windows 10 printer setup is ok.

Does anyone know why it doesn't work too good in GrapeCity.Documents.PDF? How do we fix this script bug properly?

var pdfDocument = new GcPdfDocument(PdfEditor.GrapeCityLicense);
var pdfPage = pdfDocument.NewPage();
    pdfPage.PaperKind = PaperKind.Legal;
    pdfPage.Landscape = false;

var rectangleField = new RectangleF(10f, 20f, 200f, 10f);
var pdfGraphic = pdfPage.Graphics;
    pdfGraphic.DrawString(
        "Hello World! My car is 2008 Toyota LE Sedan 4 Camary. VIN is 4T1B346K88U780470",
        new TextFormat()
        {
          FontName = "Courier New",
          FontSize = 10.0f,
          ForeColor = Color.Black,
          Language = Language.English,
          FontSizeInGraphicUnits = false,
          FontStyle = FontStyle.Regular
        },
        rectangleField,
        TextAlignment.Leading,
        ParagraphAlignment.Near,
        false
    );

using (var pdfStream = new MemoryStream())
{
    pdfDocument.Save(pdfStream);
    pdfStream.Seek(0, SeekOrigin.Begin);
    pdfBytes = pdfStream.ToArray();
}

Edited: Attached image as per commenter's request.

enter image description here

0

There are 0 best solutions below