1

I have written a code to print a cheque using MICR font, every thing works fine but when coming to print preview I am getting normal text but while printing the document I am getting the required in MICR font. How can I show MICR font in print preview

This is my code

PrivateFontCollection PFC = new PrivateFontCollection();
    PFC.AddFontFile(Server.MapPath("ADVMICR.TTF"));
    FontFamily fm = new FontFamily(PFC.Families[0].Name, PFC);
    Font PrintFont = new Font(fm, 12);

    PrintDocument pd = new PrintDocument();
    pd.PrintPage += new PrintPageEventHandler(pd_PrintPage);
    // Specify the printer to use.
    pd.PrinterSettings.PrinterName = "SnagIt 9";
    PrintPreviewDialog ppdlg = new PrintPreviewDialog();
    ppdlg.Document = pd;
    ppdlg.ShowDialog();
4

1 回答 1

0

尝试这个

ppdlg.PrintPreviewControl.Font = new Font("ADVMICR.TTF", 12);

于 2012-06-08T11:40:04.060 回答