none
Not able to print RAW data RRS feed

Answers

  • If your printer can print pdf directly than it could work. But with most printers it won't. You need something to read the pdf and make it printable. You could maybe use ghostscript to change the pdf to postscript or bitmaps.
    Tuesday, August 25, 2009 2:28 PM
  • With a search engine you can find lot of examples, but here is one to convert to jpeg files:

    http://jedrm.wordpress.com/2007/05/09/convert-pdf-to-jpg/



    Ghostscript is a command line tool, so you have to use Process.Start and put the output in temp directory. Remove it after printing.


    Little bit further searching, I found PDFBox . It says it can print PDF files. Here is a small sample how to use it.
    Wednesday, August 26, 2009 7:46 AM

All replies

  • Try to debug it and get back with information which part doesn't work.
    -Karel
    Monday, August 24, 2009 5:57 PM
    Moderator
  • Hi,

    When i debug the code, it opens the printer and sends the bytes to the printer. But when I look into the printer, it wont show up the file.

    After execution, it says the document was sent to printer.

    Thanks,
    Sudarshan
    Tuesday, August 25, 2009 5:57 AM
  • What are you printing and does your printer support it?
    Not all modern printers can print text anymore, they don't have a font render in them. They can only print dots.
    So it might that if you send text like "hello" the printer is not able to do anything with it.
    Tuesday, August 25, 2009 11:56 AM
  • We are trying to print the PDF file (which is in byte stream in the memory). We are looking out ways to render the RTF Tags, as RTF tags are considered as normal string in e.Drawstring(...) method.

    Please let us know if there are any other ways to print the byte stream.  We want to print the PDF without using Acrobat reader.

    Tuesday, August 25, 2009 12:05 PM
  • If your printer can print pdf directly than it could work. But with most printers it won't. You need something to read the pdf and make it printable. You could maybe use ghostscript to change the pdf to postscript or bitmaps.
    Tuesday, August 25, 2009 2:28 PM
  • Hi Karel,

    Thanks for the reply. Could you please send me the code snipper or examples for the ghost script?

    Thanks,
    Sudarshan

    Wednesday, August 26, 2009 5:24 AM
  • With a search engine you can find lot of examples, but here is one to convert to jpeg files:

    http://jedrm.wordpress.com/2007/05/09/convert-pdf-to-jpg/



    Ghostscript is a command line tool, so you have to use Process.Start and put the output in temp directory. Remove it after printing.


    Little bit further searching, I found PDFBox . It says it can print PDF files. Here is a small sample how to use it.
    Wednesday, August 26, 2009 7:46 AM