Class BillFormat
Formatting properties for QR bill.
Inheritance
Implements
Inherited Members
Namespace: Codecrete.SwissQRBill.Generator
Assembly: Codecrete.SwissQRBill.Core.dll
Syntax
public sealed class BillFormat : IEquatable<BillFormat>
Constructors
| Improve this Doc View SourceBillFormat()
Initializes a new instance with default values.
Declaration
public BillFormat()
BillFormat(BillFormat)
Initializes a new instance with the same values as the specified instance.
Declaration
public BillFormat(BillFormat format)
Parameters
Type | Name | Description |
---|---|---|
BillFormat | format | The instance with values to copy. |
Fields
| Improve this Doc View SourceDefaultMarginWidth
Declaration
public static readonly double DefaultMarginWidth
Field Value
Type | Description |
---|---|
System.Double |
Properties
| Improve this Doc View SourceFontFamily
Gets or sets the font family to be used for text.
According to the implementation guidelines Arial, Frutiger, Helvetica and Liberation Sans are the only permitted fonts.
Two styles of the font are used: normal/regular and bold.
Defaults to Helvetica,Arial,"Liberation Sans"
.
Declaration
public string FontFamily { get; set; }
Property Value
Type | Description |
---|---|
System.String | The font family. |
GraphicsFormat
Gets or sets the graphics format to be generated.
Defaults to SVG.
Declaration
public GraphicsFormat GraphicsFormat { get; set; }
Property Value
Type | Description |
---|---|
GraphicsFormat |
Language
Gets or sets the bill language.
Defaults to EN (English).
Declaration
public Language Language { get; set; }
Property Value
Type | Description |
---|---|
Language | The bill language. |
LocalCountryCode
Gets or sets the local country code.
For postal addresses of the local country, the country code is omitted. For all other countries, the country is prepended to the postal code and town.
Defaults to "CH".
Declaration
public string LocalCountryCode { get; set; }
Property Value
Type | Description |
---|---|
System.String | country code (ISO 3166, two uppercase letters) |
MarginLeft
Gets or sets the left margin width (from edge of paper to start of text).
Valid values are between 5mm and 12mm. The default is 5mm.
Values other than 5mm are not fully standard compliant as the fields in the receipt on the left-hand side become narrower. It is especially obvious if Payable by or Amount are not pre-filled so that the black corners are printed instead of text. Yet values higher than 5mm are more compatible with typical office and home printers, which are not capable of printing up to the edge of the paper and require a margin wider than 5mm.
Declaration
public double MarginLeft { get; set; }
Property Value
Type | Description |
---|---|
System.Double | margin width, in mm |
MarginRight
Gets or sets the the right margin width (from the end of the text to the edge of the paper).
Valid values are between 5mm and 12mm. The default is 5mm.
Values other than 5mm are not fully standard compliant but are more compatible with typical office and home printers, which are not capable of printing up to the edge of the paper and require a margin wider than 5mm.
Declaration
public double MarginRight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | width width, in mm |
OutputSize
Gets or sets the output size for the generated QR bill.
Defaults to QrBillOnly, i.e. the QR bill only (105 by 210 mm).
Declaration
public OutputSize OutputSize { get; set; }
Property Value
Type | Description |
---|---|
OutputSize | The output size. |
See Also
| Improve this Doc View SourceResolution
Gets or sets the resolution for pixel image graphics formats.
It is recommended to use at least 144 dpi for a readable result.
Defaults to 144 dpi.
Declaration
public int Resolution { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The graphics resolution, in dpi (pixels per inch). |
SeparatorType
Gets or sets the type of separator drawn above and between the payment part and the receipt.
Defaults to DashedLineWithScissors.
Declaration
public SeparatorType SeparatorType { get; set; }
Property Value
Type | Description |
---|---|
SeparatorType | The separator type. |
Methods
| Improve this Doc View SourceEquals(BillFormat)
Determines whether the specified bill format is equal to the current bill format.
Declaration
public bool Equals(BillFormat other)
Parameters
Type | Name | Description |
---|---|---|
BillFormat | other | The bill format to compare with the current bill format. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Equals(Object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Overrides
GetHashCode()
Gets the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for the current object. |