0
votes

I been have problems using MS RawPrinterHelper Class printing a pdf file.I can get txt files to print fine. I passing the name of the printer and pdf bytes to the printer RawPrinterHelper but nothing will print. Any help is great

1
why won't you use any other pdf export plugin ?Mortalus
I am not sure that I understand how can pdf export plugin help me with printing?Jefferson
I though that you are trying to use the MS RawPrinterHelper to print your content into a PDF file..and save the file.. if so there are components that can do that without using the printer and relay on the user to have the necessary "PDF printer Drivers"Mortalus

1 Answers

0
votes
    private static void printLables(byte[] LabelFile)
    {

    string s = System.Text.ASCIIEncoding.ASCII.GetString(LabelFile);
    PrintDialog pd = new PrintDialog();
    pd.PrinterSettings = new PrinterSettings();
    pd.PrinterSettings.PrinterName = "Your Printer Name";

    RawPrinterHelper.SendStringToPrinter(pd.PrinterSettings.PrinterName, s);
    }

Let me know if this work for you.