RoboLynx.Umbraco.QRCodeGenerator.Core 8.0.0-alpha0001

This is a prerelease version of RoboLynx.Umbraco.QRCodeGenerator.Core.
There is a newer version of this package available.
See the version list below for details.
dotnet add package RoboLynx.Umbraco.QRCodeGenerator.Core --version 8.0.0-alpha0001                
NuGet\Install-Package RoboLynx.Umbraco.QRCodeGenerator.Core -Version 8.0.0-alpha0001                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RoboLynx.Umbraco.QRCodeGenerator.Core" Version="8.0.0-alpha0001" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RoboLynx.Umbraco.QRCodeGenerator.Core --version 8.0.0-alpha0001                
#r "nuget: RoboLynx.Umbraco.QRCodeGenerator.Core, 8.0.0-alpha0001"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install RoboLynx.Umbraco.QRCodeGenerator.Core as a Cake Addin
#addin nuget:?package=RoboLynx.Umbraco.QRCodeGenerator.Core&version=8.0.0-alpha0001&prerelease

// Install RoboLynx.Umbraco.QRCodeGenerator.Core as a Cake Tool
#tool nuget:?package=RoboLynx.Umbraco.QRCodeGenerator.Core&version=8.0.0-alpha0001&prerelease                

QR Code Generator

Property editor allowing to generate QR codes straight from Umbraco Backoffice. User can customizing generate code by color, size, output format, error correction level, adding quite zone and also by adding icon (not for all formats). The developer can set the source provider on the basis of which the code will be generated and type of passed data. Now data source it can be document property (now simple only), document URL or you can create a custom QR code data source.

Attention!

It's can be us only for Document content. It can't be used for Media, Member or User at now.

Configuration

  1. Create a new data type under the Settings tab and select QR Code

  2. Select data source

  3. Set Source provider settings field (see here)

  4. Select QR code type

  5. Set default settings (all settings with prefix Default can be customize by backoffice user in when generating code but this value will be set up when user select this code type).

  6. Save data type

  7. Edit or create document type where you wont you QR Code Generator

  8. Add new property and select created before data type. Remember! Document type has to have all property names defined in Source provider settings.

  9. Save document type.

  10. Now you can open or create document of type where you add QR Code Generator property.

  11. If document is published you will see active QR Code icon between content icon and info icon. Click them.

  12. HearUmbraco backoffice users can create QR Codes and download them.

Source providers

Source provider gets data from specify source and pass it to attributes containing by QR Code type. Now we have available only two build-in source providers. But you can write your on data source.

1. Content Property

It's get data from content property by property name. Configuration is required. Configuration can by write on two way:

  1. Property names separated by commas. i.e. propertyName1, propertyName2, propertyName3. When you use this syntax you must remember then property names order is important. Values will be pass to QR Code type as attributes by index. This syntax may also contain regular expression (just after property name between double curly brackets {{\d*}}) witch can extract only part of property value. Regular expression is optional. i.e. location{{^\d*(\.\d*)?}}, location{{(?<=,)\d*(\.\d*)?(?=,)}}
  2. JSON syntax. i.e.
{ 
    properties: {
        atributeName1: {
            name: 'propertyName1',
            regex: '\d*'
        },
        atributeName2: 'propertyName2'
}

When you use this syntax property value is pass to QR Code type as attributes by attribute name. Check attribute names hear. You can find them also in information bellow selected QR Code type filed in backoffice.

2. Absolute URL

Always pass absolute document URL for each attribute of QR Code type. That's way this source provider should be use only with URL QR Code type.

3. Custom

You can write your own QR Code type writing a class extending QRCodeSource class.

QR Code Types

The setting defines what type of data will be passed on to the end user and how it will be displayed to him.

Available build-in types:

  • Text - After user will scan the code it will saw specify text in code scanner. Argument: text
  • Phone number - After user will scan the code it will saw specify phone number ready to call. Argument: number
  • URL - After user will scan the code it will open specify resource in default application for specify protocol. i.e. specify website in default browser if protocol will bee HTTP or HTTPS. Argument: url
  • SMS - After user will scan the code it will saw new SMS message with specific content ready to send on specific number. Arguments: number, subject
  • Geo-location (Google Map) - After user will scan the code it will open Google Maps application or website with pinned specify position. Arguments: latitude, longitude
  • Geo-location (GEO) - After user will scan the code it will open default map application with pinned specify position. Arguments: latitude, longitude
  • Custom - You can also write your own QR Code type writing a class extending QRCodeType class.

Formats

Output format of generated file.

Supported formats:

  • svg
  • jpg (with icon support)
  • png (with icon support)
  • bmp (with icon support)
  • Custom - You can make your own output format writing a new class extending QRCodeFormat class.

Attention! Custom format must be readable by <img /> element

Example

  • When user scan the code then will see position what you pin in document on map. Geo-location (GEO) and Geo-location (Google Map) QR Code type needs two arguments, the latitude and the longitude attributes. To achieve the aim you can use the property editor like Our.Umbraco.OsmMaps and create property with alias location. This editor save latitude and longitude in one string like 53.35055131839989,18.74267578125,7. To get correct data we need select Content Property set correct configuration witch extract correct value by regular expression. In this case, I should look like this: location{{^\d*(\.\d*)?}}, location{{(?<=,)\d*(\.\d*)?(?=,)}}.
Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on RoboLynx.Umbraco.QRCodeGenerator.Core:

Package Downloads
RoboLynx.Umbraco.QRCodeGenerator.Backoffice

Part of QR Code Generator for Umbraco. Property editor and Content App to generate QR codes in Umbraco Backoffice for the specify data source (e.g. published document property value, URL, any custom source).

RoboLynx.Umbraco.QRCodeGenerator.Core.ImageSharp

Part of QR Code Generator for Umbraco. Allows using the ImageSharp library to generate QR codes.

RoboLynx.Umbraco.QRCodeGenerator.Cache

Cache implementation for QRCodeGenerator.

RoboLynx.Umbraco.QRCodeGenerator.Core.ImageSharp2

Part of QR Code Generator for Umbraco. Allows using the ImageSharp 2 library to generate QR codes.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
13.0.0 1,316 2/9/2024
12.0.2 373 10/27/2023
12.0.1 217 10/24/2023
12.0.0 233 10/20/2023
11.1.1 194 10/30/2023
11.1.0 212 10/20/2023
11.0.0 194 9/26/2023
10.1.2 207 10/30/2023
10.1.1 219 10/20/2023
10.1.0 200 10/20/2023
10.0.0 250 9/14/2023
10.0.0-beta.8 219 7/5/2022
9.0.0 1,798 4/11/2022
8.1.0 321 12/30/2021
8.0.1 374 4/9/2021
8.0.0 341 4/9/2021
8.0.0-alpha0001 227 4/9/2021
7.0.0 335 4/29/2021
7.0.0-alpha0027 201 4/27/2021

Release for Umbraco 8