Printer don't print greek characters

What i'm trying to do is to read a .txt file and sent it to printer. The problem is that the printer normally print the latin alphabet characters but replace the greek characters with ???. I'm really new to C# programming so if anyone could help it will
be realy thankfull. I use windows 7 ultimate 64-bit and microsoft visual studio 2013. My code is:
System.IO.StreamReader fileToPrint;
System.Drawing.Font printFont;
private void printButton_Click(object sender, EventArgs e)
string printPath = System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
fileToPrint = new System.IO.StreamReader(printPath + @"\myFile.txt");
printFont = new System.Drawing.Font("Arial", 10);
printDocument1.Print();
fileToPrint.Close();
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
float yPos = 0f;
int count = 0;
float leftMargin = e.MarginBounds.Left;
float topMargin = e.MarginBounds.Top;
string line = null;
float linesPerPage = e.MarginBounds.Height/printFont.GetHeight(e.Graphics);
while (count < linesPerPage)
line = fileToPrint.ReadLine();
if (line == null)
break;
yPos = topMargin + count * printFont.GetHeight(e.Graphics);
e.Graphics.DrawString(line, printFont, Brushes.Black, leftMargin, yPos, new StringFormat());
count++;
if (line != null)
e.HasMorePages = true;

Thanks for the quick replay it worked with: 
fileToPrint = new System.IO.StreamReader(printPath + @"\myFile.txt", Encoding.Default);

Similar Messages

  • The Printer don`t print in color, only black/whit​e

    Please Help, The printer only prints black/white

    Hi,
    If your eprint jobs are printed in Black and White and not in color, then please go to www.hp.com/go/eprintcenter and then type your username and password and log in to the HP Eprint center. Then click on te printer and then click on Eprint Settings button.
    Then click on print option tab and select Color and click on Save.
    This will resolve the issue.
    Say "Thanks" by clicking the Kudos Star in the post that helped you.
    Please mark the post that solves your problem as "Accepted Solution"
    (Although I am employed by HP, I am speaking for myself and not for HP)

  • Report printing in Greek characters after changing Font

    Hi All,
    We had a bunch of reports created in 'Courier New' font whose output type is PDF. The users wanted the reports to print in 'Arial' font. When I changed the same from Courier New to Arial and ran the report , the report is printing in Greek characters instead of English. I initially thought that it prints in Greek may be because of insufficient space or something for the text fields but there seems to be sufficient spaces to print characters. I tried reducing the size and still the reports prints in Greek in lower size.
    Can anyone let me know how to get rid of this?
    Thanks,
    Srini.

    See if the solution in the following thread applies to you:
    Problem converting font to .afm using ttf2pt1

  • My printer starts out printing PDF files in english and switches to random characters​.

    Hp officejet 6310 ALl in one printer.  WHen printing PDF files, the part or all of the first page prints out in english and the balance is random characters.  What is going wrong.

    The troubleshooting steps here may help resolve the issue.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • Exporting a PDF so that non-printing objects show but don't print?

    I've just spent a couple hours trying to find an answer to this in the forums, but can't. (The most frustrating was one thread where the original poster said, "I found the answer here," and gave a link that went right back to the main page of the forum. Argh.)
    Okay, anyway ... what I need to do?
    I've got a document with graphics that I want to show up on the pdf when I export it, but that--if a reader prints it--don't print.
    The document looks like a 3-ring binder with "tabs" for each section--just like the real thing. But the rings and tabs go right up to the edge and look terrible when printed, and whose printer can print right at the edge of the paper, anyway? But the tabs work as navigational links while looking a the pdf, and the rings just make it look cool, so I WANT them in the pdf.
    I've tried:
    Turning the entire layer into a non-printing layer (one that "shows" but does not "print"). But when I export it to a pdf, it doesn't show up on the pdf to look at OR to print. So that doesn't work.
    Using the Attribute option to turn each object into a non-printing object, but so far as I can tell, that doesn't do a thing, because they still print from the pdf.
    Exporting with the "create pdf layers" turned on and off. Exporting with the "include non-printing items" turned on and off.
    Basically, I've pretty much tried everything. I gather, from browsing the forums, that this is POSSIBLE, but can't for the life of me figure out what to do to make it happen. (Short of hiding the tabs' layer and creating an entirely separate PDF and calling it "Print version" which is not exactly what I want to do!)
    Is there maybe some magical combination of ons and offs I need to select to make this whole thing work?
    (And, seriously, am I the only person who thinks the supporting documentation is just dreadful? I can't find anything in any of the Help screens that even mentions this, much less explains how to do it.)
    Any help is appreciated!!
    --Deb

    Partial progress...
    The button option (and, I'm using CS3, by the way--I should have said that originally) does work in terms of showing on the pdf but not printing.
    The problem is that it messes up the way the document looks.
    I said it's designed to look like a 3-ring binder with tab-dividers between each section, and each tab has a hyperlink to take you to that section.
    Now, when you've got a paper binder in front of you, the tabs stay in the same sequence, and often overlap a bit (which mine do). The problem I'm having, having turned all of them into buttons, is that when you click on any of them, it "jumps" to the front of the row, so that they don't "flow" in the correct sequence.
    Am I explaining this well? You know, the top-most tab is at the top of the pile, the next one is always below it and above the third one, and so on ... you never see the second tab on TOP of the first one. I'm trying to get the document to act as close to a hard-copy binder as I can, and it did ... except the buttons keep jostling each other for attention...
    I'm going to go play around with this some more now, but ... any suggestions? (Other than restructuring my tabs so that they don't overlap at all?)

  • Officejet 8620 don't print on Windows 8.1

    Hi,
    I purchased a Officejet 8620 to replace an Officejet 8600 PRO irreparably damaged by lightning.
    The printer is connected via wired ethernet.
    I installed the software on the CD on a HP laptop with Windows 7 Ultimate and the printer, scanner and fax machine worked perfectly.
    I repeated the installation on a PC laptop with Windows 8.1, the installation was successful, but only the fax and scanner worked, the printer does not print even the test page.
    I disabled firewall and antivirus (Kaspersky Internet Security 14) and repeated several times to install but always with the same result.
    I performed "HP Print and Scan Doctor" that does not detect any problems.
    I also run "sfc / scannow" but to no avail.
    My user type is Administrator.
    Only if I access the printer properties in as "Administrator" I can get print a test page.
    I added my user to the list of authorized users all'utlizzo printer, but without success.
    I downloaded from the HP website the latest versions of drivers and firmware, but the print does not work.
    At the same PC and 'also connected a printer, on the same Ethernet network, HP LaserJet CP1515n with driver
    "HP Universal Printing PCL 6" that works perfectly.
    Can anyone help me please?
    Thanks.
    Claudio [edited personal information by Moderator]

    To be honest, I don't know what else to suggest other than calling us. A phone support professional can access your computer remotely, with your permission of course, and look through the settings and software with you.
    If you are in Canada or US call 800 474 6836, or you can Contact HP Worldwide.
    I hope this helps.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • HT1338 I'm trying to follow HP's instructions to add a driver for HP Color Laserjet CP 1215 which is connected to my Time Capsule. However, in System Preferences I can't "add" the printer to the print queue because I don't have a driver and you have to se

    I’m trying to follow HP’s instructions to add a driver for HP Color Laserjet CP 1215 which is connected to my Time Capsule. However, in System Preferences I can’t “add” the printer to the print queue because I don’t have a driver and you have to select a driver before the add button becomes active.  Therefore, the Mountain Lion software update doesn’t add driver software for the CP 1215 driver because I was unable to add the printer to the print queue. 

    This printer doesn't seem to be supported in ML:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c01664444&lc=en&cc=us&dlc=en &product=412187#N2043
    You could try the 1515 driver or use the Generic PostScript Printer PPD when adding the printer.
    Hope this helps.

  • Acrobat PDF Printer don´t work

    When I choose File->Print->"Adobe PDF Printer" from any application (i.E. "Ai") I get following two windows. The first Window will disappear with 100%, but the second don´t and no file will be created?!!??!??!?
    My system: Win7 64 and Adobe CC (Acrobat XI Pro)
    Can anyone help me to fix this, please?
    Used CS5 a few days before and it does the job.

    You will need to manually create using the link tool or if you're lucky
    (and the destination URL is spelt out in the text) use Advanced /
    Document Processing / Create from URLs option.
    The PDF Maker on the Mac does not work the same as Windows ...
    Jon

  • HT3669 Hi I have a Konica Minolta PagePro 1300W printer. This works with my Windows-based Toshiba laptop but not with my i-Mac. Can someone please advise me how I get the printer to work with my i-Mac? I have installed it but documents don't print. Thanks

    Hi I have a Konica Minolta PagePro 1300W printer. This works with my Windows-based Toshiba laptop but not with my i-Mac. I have the latest (Mountain Lion 10.8.2) OS-X software.
    I have installed the printer using 'System Preferences' on my i-Mac and it appears on the list of available printers but documents that I create just don't print.
    Can someone please advise me how I get the Konica Minolta PagePro 1300W printer to work with my i-Mac?
    Thanks, John Lee

    Looking at the Konica web site for the PagePro 1300W, I saw the following note.
    Please note: This printer is designed to be used in computer operating systems running MS Windows only. Operating systems such as UNIX, Macintosh, or Linux are not supported nor do we have workaround drivers available. Older MS Windows versions, such as Windows 3.1/95/98[pre-SE] and NT 3.51/4.0, are not supported.
    So KM are not going to help you. But the LinuxFoundation does provide a workaround that should allow you to print. Have a look at this web page. You will need to install all three packages as per the instructions from that page.

  • Keeps printing done...

    I know why this code keeps printing done, its one my for loops. Currently this code does percisily what I want it to with a few hiccups that will be fixed. The current problem is that it keeps printing done for each row or record it places in the csv file. I need it to print to the file and then when it is truly done - print done. Also this is really slow....there are 1500+ records to pull from the cdata section, convert to comma delaminated and then place into the csv. the ripping and converting takes seconds. the writing's to the file takes .....well i never let it finish, every time I press stop its up to the 600th record and that's after a couple minutes.
    I know I am missing something. I just need some eyes to look at it. its not the most efficient way to do this, I get that. All i care about right now is making it print done ONLY when it is truly DONE writing to the file - and it shouldn't take so long to write to a file. 600 records in 2 minutes? something is wrong.
    Code is bellow. - prepare for a long read.
    package xmlcsv;
    import java.io.File;
    import java.io.FileWriter;
    import java.util.StringTokenizer;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.CDATASection;
    import org.w3c.dom.CharacterData;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    * Essentially we take a xml file, find its cdata section and then
    * process the information in there to then spit out to a csv file.
    public class XmlCSV {
          * We need to process the data in the Cdata section and spit it out in a csv file.
          * This is the "main" part of the program which is run.
          * @param args
         public static void main(String[] args) throws Exception
              File file = new File("Data.xml");
              DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
              Document doc = db.parse(file);
              doc.getDocumentElement().normalize();
              NodeList nodes = doc.getElementsByTagName("TransmissionWrapper");
              for (int i = 0; i< nodes.getLength(); i++)
                   Element element = (Element) nodes.item(i);
                   NodeList cData = element.getElementsByTagName("TransmissionData");
                   Element line = (Element) cData.item(0);
                   //test
                   getInfo(getCData(line));
          * We want to get all the data out of the CData Section.
          * Pass it into the getInfo() method to then get the
          * the data which will be parsed and thrown into a csv file.
          * @param e
          * @return
         private static final String getCData(Element e)
              NodeList child = e.getChildNodes();
              if (child != null)
                   for (int i = 0; i< child.getLength(); i++)
                        Node childNode = child.item(i);
                        if (childNode.getNodeType() == Node.CDATA_SECTION_NODE)
                             CDATASection cdata = (CDATASection) childNode;
                             String data = cdata.getData();
                             return data;
              return "Theres nothing there";
          * We want to remove all pipes then replace all those pipes with commas
          * the simple .replace() does not work. so we pass all the data into a string array and
          * pass it to a method that reforms the data and replaces pipes with commas
          * TODO: I didn't realize some information is comma deliminated so we have:
          * CHEVROLET,COBALT which may pose a problem later.
          * @throws Exception
         private static final String getInfo(String str) throws Exception
              StringTokenizer st = new StringTokenizer(str.trim());
              while (st.hasMoreTokens())
                   String[] info = str.split("\\|", -1);
                   for(int i = 0; i<info.length; i++)
                        returnComma(info);
              return "Nothing to return";
          * We take the String array of data and reform it back into
          * a comma deliminated peice of data that we can then use with CSV
          * @param str
          * @return
          * @throws Exception
         private static final String returnComma(String[] str) throws Exception
              StringBuffer sb = new StringBuffer();
              for (int i =0; str != null && i < str.length; i++)
                   sb.append(str);
                   if(i < str.length - 1)
                        sb.append(",");
              writeToFile(sb.toString(), "data2.csv");
              return null;
         * Write the data to a csv file.
         * @param st
         * @param filename
         * @throws Exception
         private static final void writeToFile(String st, String filename) throws Exception
              FileWriter fw = new FileWriter(filename);
              fw.append(st);
              fw.flush();
              fw.close();
              System.out.println("done");

    The question(s) is: +"How do I make it write to the file and print done only when done?"+Move the print statement out of the loop?
    +"Why is it taking up to 5-10 minutes to write 600 records to a file when it takes 30 seconds to parse the pipes, and put commas in and spit it out to the page"?+Because you are writing to the file every time you call returnComma(), and you are calling returnComma() lots of times. Most probably your entire file writing scheme is up the pole. You can't really want the file just to contain whatever the last invocation of returnComma() printed, and if you do why do all the preceding writes at all?
    Also returnComma() doesn't return a comma. Poor naming. Fix its name to describe what it really does.

  • My document don't print the same color when I print it from PDF rather than InDesign

    I have a vector image that don't print the same color when I export it to PDF but the colors are the same on the screen.
    How can I be sure to have the same colors as my InDesign original document when I print it as a PDF ?

    I use the default settings for High Quality Print

  • HP Deskjet 710c printer don't work on a Mac Mini

    I have a Mac Mini with OSX 10.9 but my HP Deskjet 710c printer don't work. I install the HP driver package from Apple but I don't see my printer in the list. Who can help me out? Thanks.

    Hi,
    The printer is not supported on Mac OS X 10.9, you my find any supported printer listed in the following document:
    http://support.apple.com/kb/HT3669#HP
    As well no Mac supported is offered for the specific model within its driver download pages:
    http://h10025.www1.hp.com/ewfrf/wc/softwareCategor​y?cc=us&dlc=en&lc=en&product=59307&task=&
    I afraid you will not be able to use the specific model with Mavericks, those are not compatible.
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • Printer don't work at all "

    Hola! Hello! My first time here  ,so sorry if i not so good in inglish,My problem is the printer don't work at all ,and I have everything new in, the catrige, i also try every step that the screen show in Diagnose, and the last thin is help in cumunity .The light still flashing and the catrige is new ! I will thanks for you help ..Gary....

    There are two ways to go back to Leopard in your circumstances: Archive and install and erase and install. The best way to do it is the second, but your files will have to be backed up somewhere else. Archive and install is a good technique, in concept, but it goes against Apple's advice under your circumstances. If you do the first, then your files will end up in the proper place. Still, they should be backed up somewhere else. Something that should facilitate your choice is whether or not you have an external drive where you could create a bootable clone of your internal. Let me know about this matter specifically and what you think about the alternatives.

  • Typed words in pdf doc don't print

    I have a paper copy of a form that needed to be filled out so
    I scanned the document to a pdf file, typed in the file (I have
    adobe writer) and when I printed it, the typed words don't print.
    Does anybody know why that would happen? I entered the words by
    using "FreeTextTool" just like I always do. Thanks in
    advance.

    Hi PaulaFord,
    Thank you for your post. You should know that these forums
    are specific to the
    Acrobat.com website and its set of hosted services, and do
    not cover the Acrobat family of desktop products.
    Please visit the following Acrobat forums for any questions
    related to the Acrobat family of desktop products:
    http://www.adobeforums.com/cgi-bin/webx/.3bbeda8b/
    Cheers,
    Pete

  • Some Adobe PDF documents don't print from Adobe Reader; with other software it works correctly

    Dear community,
    I'm facing the problem that some Adobe PDF documents with lots of colors and lines (size less than 3 MB) don't print on our printers from Adobe Reader XI.
    The same files when opened with PDF XChange or PDF Architect are printed out without problems.
    How can I provide an Adobe Reader that is able to do so? Any recommendations about solving the issue are very appreciated.
    Best regards
    Christian

    Word document problem fixed at the moment by deleting and adding the Lexmark printer again.

Maybe you are looking for

  • Why does the app store try to charge me for free apps?

    I am trying to download free apps and I keep getting sent to my account settings page. Is my phone trying to charge me for free apps?

  • Error when calling to an screenflow in a process deployed in Websphere

    Hi all, Environment: Solaris SunOS 5.10 (Generic January 2005), Websphere 6.1.0.13, JVM: 1.5.0_07 Product: AquaLogic BPM 6.0.2 for WebSphere We are testing our environment with a very simple process with only one interactive activity that is associat

  • How to open xlsx file corrupted?

    Need to recover MORE data from corrupt Excel XLSX Files than Microsoft Excel autorepair function does. Function recover data from last autobackup only, but I want xlsx repair function with MORE fix possibility.

  • How to extract external directory users from a shared services group from shared services RDBMS repository

    Hi, I have a security group in shared services, which has external directory users. I want to extract the list of users from shared services RDBMS repository using a SQL query. Please let me know if this is possible and from which table(s) I can quer

  • Homehub 2.0

    Hi can anyone help me PLEASE I have a bt homehub 2.0 which works fine.I have just got a laptop which works fine also on the wireless part of it.So you are asking yourself is wrong.Well I live in a very non standard construction bungalow with dodgy wi