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
    IronQR_for_dotnet_log2o
    Blue key in circleGet started for FREE
    No credit card required
    Test in a live environment

    Test in production without watermarks.
    Works wherever you need it to.

    Fully-functional product

    Get 30 days of fully functional product.
    Have it up and running in minutes.

    24/5 technical support

    Full access to our support engineering team during your product trial

    Grey key in circleGet started for FREE
    The trial form was submitted successfully.
    Calendar in circleBook Free Live Demo
    No contact, no card details, no commitments Book a 30-minute, personal demo.
    Here's what to expect:

    A live demo of our product and its key features

    Get project specific feature recommendations

    All your questions are answered to make sure you have all the information you need. (No commitment whatsoever.)

    Grey key in circleBook Free Live Demo
    Your booking has been completed Check your e-mail for confirmation
    Support Team Member 6 related to The C# PDF Library Support Team Member 14 related to The C# PDF Library Support Team Member 4 related to The C# PDF Library Support Team Member 2 related to The C# PDF Library
    Online 24/5
    Need help? Our sales team would be glad to help you.
    Try the Enterprise Trial
    ironpdf_for_dotnet_log2o
    Key in blue circle
    Get your free 30-day Trial Key instantly.
    bullet_checkedNo credit card or account creation required
    Key in blue circle
    Get your free 30-day Trial Key instantly.
    Blue key in circleNo credit card or account creation required
    Green Check in orange circle
    The trial form was submitted successfully.
    badge_greencheck_in_yellowcircle
    Thank you for starting a trial

    Please check your email for the trial license key.

    If you don’t receive an email, please start a live chat or email support@ironsoftware.com

    Install with NuGet
    View Licensing
    • Logo Aetna
    • Logo NASA
    • Logo GE
    • Logo Porsche
    • Logo USDA
    • Logo Qatar
    Join Millions of Engineers who’ve tried IronQR