Giter Site home page Giter Site logo

invoicesharp's Introduction

InvoiceSharp

Wrapper arround Migradoc and PDFSharp to generate pdf invoices easy peasy. Based on Invoicer Thanks a lot ! Invoicer was heavily used and modified to be more flexible and (for the moment) translated in french (maybe more to come ?)

Usage

	byte[] image = LoadImage("test.jpg");
        	string imageFilename = MigraDocFilenameFromByteArray(image);

        new InvoicerApi(SizeOption.A4, OrientationOption.Portrait, "€")
            .TextColor("#057a55")
            .BackColor("#F7FAFC")
            .Image(imageFilename, 70, 70)
            .Company(Address.Make(
                "FROM",
                new string[]
                {
                    "Test Limited",
                    "Test House",
                    "Rue de la paix",
                    "Paris",
                    "CEDEX 15"
                },
                "1471587",
                "569953277",
                new string[]
                {
                    "Vodafone Limited. Registered in England and Wales No. 1471587.",
                    "Registered office: Vodafone House, The Connection, Newbury, Berkshire RG14 2FN."
                }))
            .Client(Address.Make("INVOICE TO",
                new string[] {"Isabella Marsh", "Overton Circle", "Little Welland", "Worcester", "WR## 2DJ"}))
            .Items(GenerateFakeDate())
            .Totals(new List<TotalRow>
            {
                TotalRow.Make("Sous Total", (decimal) 631.99, true),
                TotalRow.Make("Total TVA 20%", (decimal) 20.99, true),
                TotalRow.Make("Total TVA 10%", (decimal) 12.99, true),
                TotalRow.Make("Grand Total", (decimal) 800.99, true),
            })
            .Details(new List<DetailRow>
            {
                DetailRow.Make("NOTES", "Payé par Stripe", "",
                    "N'hésitez pas à nous contacter pour toutes questions ou toutes nouvelles commandes",
                    "", "Merci et à très vite !")
            })
            .BillingDate(DateTime.Now)
            .PayedDate(DateTime.Now)
            .Save("Invoice.pdf");

sample.png

References

invoicesharp's People

Contributors

purplepiranha avatar triskae avatar simonray avatar

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.