Giter Club home page Giter Club logo

Comments (3)

lukevp avatar lukevp commented on May 14, 2024

@asafgo switching code pages is not yet implemented, but it's pretty straightforward to make changes to the library. Why don't you fork and give it a try, and send us a PR if you add it in? Would be a great feature to have!

from esc-pos-.net.

asafgo avatar asafgo commented on May 14, 2024

Hi,
In what class code page is so I will happy to give it a try as I am not professional programmer?

from esc-pos-.net.

asafgo avatar asafgo commented on May 14, 2024

Hi,
I have succeeded to print in Hebrew, thanks @lukevp

public static partial class Tests
{
    public static byte[] Printing(ICommandEmitter e) =>
     ByteSplicer.Combine(
            e.Print("Multiline Test: Windows...\r\nOSX...\rUnix...\n"),
            e.FeedLines(1),
            e.RightAlign(),
            System.Text.CodePagesEncodingProvider.Instance.GetEncoding(1255).GetBytes(Reverse("הדפסה בעברית.")),  //Needs to install "System.Text.Encoding.CodePages" https://www.nuget.org/packages/System.Text.Encoding.CodePages/
            e.FeedLines(2),
            e.LeftAlign(),
            // TODO: sanitize test.
            e.PrintLine("Feeding 250 dots."),
            e.FeedDots(250),
            e.PrintLine("Feeding 3 lines."),
            e.FeedLines(3),
            e.PrintLine("Done Feeding."),
            e.PrintLine("Reverse Feeding 6 lines."),
            e.FeedLinesReverse(6),
            e.PrintLine("Done Reverse Feeding.")
         );

    public static string Reverse(string s)
    {
        char[] charArray = s.ToCharArray();
        Array.Reverse(charArray);
        return new string(charArray);
    }
}

from esc-pos-.net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.