Search Results for

    Show / Hide Table of Contents

    Class QrCode

    Represents a QR Code that can be rendered.

    Inheritance
    System.Object
    QrCode
    Namespace: IronQr
    Assembly: IronQr.dll
    Syntax
    public class QrCode : Object

    Methods

    Save(Nullable<QrStyleOptions>)

    Returns the QR Code as an AnyBitmap object. Optionally include styling such as size, color, logo, and other customization by providing the QrStyleOptions parameter.


    To Save this QR Bitmap to a File use the SaveAs method on IronSoftware.Drawing.AnyBitmap:
    AnyBitmap qr = myQr.Save();
    qr.SaveAs("qr.png");
    Declaration
    public AnyBitmap Save(Nullable<QrStyleOptions> styleOptions = null)
    Parameters
    Type Name Description
    System.Nullable<QrStyleOptions> styleOptions
    Returns
    Type Description
    IronSoftware.Drawing.AnyBitmap

    StampToExistingPdfPage(String, Int32, Int32, Int32, String)

    Stamps (draws) the QR Code onto an existing page of an existing PDF document.

    Declaration
    public void StampToExistingPdfPage(string filePath, int x, int y, int pageNumber, string password = null)
    Parameters
    Type Name Description
    System.String filePath

    The file path of the PDF which will have the QR Code added to it..

    System.Int32 x

    The horizontal position of the QR Code on the PDF page in pixels

    System.Int32 y

    The vertical position of the QR Code on the PDF page in pixels

    System.Int32 pageNumber

    The page of the PDF to stamp. [One Based] such that the first page is number 1 rather than 0.

    System.String password

    The PDF encryption or administrator password if this PDF is digitally protected from modification or opening.

    StampToExistingPdfPages(String, Int32, Int32, IEnumerable<Int32>, String)

    Stamps (draws) the QR Code onto multiple existing pages of an existing PDF document.

    Declaration
    public void StampToExistingPdfPages(string filePath, int x, int y, IEnumerable<int> pageNumbers, string password = null)
    Parameters
    Type Name Description
    System.String filePath

    The file path of the PDF which will have the QR Code added to it..

    System.Int32 x

    The horizontal position of the QR Code on each PDF page in pixels

    System.Int32 y

    The vertical position of the QR Code on each PDF page in pixels

    System.Collections.Generic.IEnumerable<System.Int32> pageNumbers

    The page numbers of the PDF to stamp as an enumeration, list or array. [One Based] such that the first page is number 1 rather than 0.

    System.String password

    The PDF encryption or administrator password if this PDF is digitally protected from modification or opening.

    ToDataUrl()

    Converts the QR Code to a base64 data URL.

    The data URI scheme is a uniform resource identifier (URI) scheme that provides a way to include data in-line in web pages as if they were external resources.

    https://en.wikipedia.org/wiki/Data_URI_scheme

    Declaration
    public string ToDataUrl()
    Returns
    Type Description
    System.String

    The Data URL as a string.

    See Also
    ToHtmlTag()

    ToHtmlTag()

    Renders the QR Code as a HTML image Tag. The tag is fully formed (using a data-url> and can be injected into HTML with no JS, CSS or image dependencies.

    Declaration
    public string ToHtmlTag()
    Returns
    Type Description
    System.String

    An Html img tag as a string.

    Verify(String)

    Verifies this QR Code is still readable by IronQR.

    Resizing a QR Code to a very small size or using unconventional colors may make it unreadable to a machine. This method verifies that a QR Code is still fully readable.

    Declaration
    public bool Verify(string expected = null)
    Parameters
    Type Name Description
    System.String expected
    Returns
    Type Description
    System.Boolean

    true if the QR Code is still machine-readable

    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with NuGet
    Want to deploy IronQR to a live project for FREE?
    What’s included?
    30 days of fully-functional product
    Test and share in a live environment
    No watermarks in production
    Get your free 30-day Trial Key instantly.
    No credit card or account creation required
    Your Trial License Key has been emailed to you.
    Download IronQR free to apply
    your Trial Licenses Key
    Install with NuGet View Licenses
    Licenses from $499. Have a question? Get in touch.