-
-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create dotnet - test.yml * Bump SkiaSharp from 2.88.3 to 2.88.6 in /src/BinaryKits.Zpl.Viewer Bumps [SkiaSharp](https://github.com/mono/SkiaSharp) from 2.88.3 to 2.88.6. - [Release notes](https://github.com/mono/SkiaSharp/releases) - [Commits](mono/SkiaSharp@v2.88.3...v2.88.6) --- updated-dependencies: - dependency-name: SkiaSharp dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * fix(viewer): cannot find package vue@next (#208) * fix(viewer): cannot find package vue@next * Update index.html Don't use specific versions for web dependencies. * Enable ^FV command (needed for UPS) (#195) * Enable ^FV command - Based off ^FD * ZPL Parser: Enable ignoring certain commands (#194) * Enable ignoring certain commands - small refactors + comments in the zpl parser * Comment specification * Add documentation on how to add barcode support (#198) * Change invertdraw to skia xor blending (#193) - Also added tests - Refactored viewer tests * Structure Viewer UnitTest project (merge after #193) (#199) * Change invertdraw to skia xor blending - Also added tests - Refactored viewer tests * Begin structuring viewer testing project - readme for goals - custom test for feature development - zpl/png data folder copied to output - factor out more to common * Try to fix cannot copy data to output for linux build * Copy data again * Capitalization mistake * Added: Font fallback structure for the default fonts. (#217) * Added: Font fallback structure for the default fonts. * Improved: DejaVu Sans Mono as first mono type Improved: Courier New is more often available than Courier * Added: Roboto font to Dockerfile * Improved: Enabled antialiased text (#218) * Improved: Barcode scaling for PDF417 and Code128 (#219) * Improved: Code128 charset usage Improved: PDF417 scaling Improved: DHL uses a decimal height for PDF417 Improved: PDF417 size when no column value is given * Improved: PDF417 uses correct vertical scaling now * Improved: GS1 type support Improved: Code128 invocation filtering * Added: PDF generation (#220) * Added: Font fallback structure for the default fonts. * Improved: DejaVu Sans Mono as first mono type Improved: Courier New is more often available than Courier * Improved: Enabled antialiased text * Improved: Code128 charset usage Improved: PDF417 scaling Improved: DHL uses a decimal height for PDF417 Improved: PDF417 size when no column value is given * Added: Roboto fontface to docker image * Improved: Added a working roboto font to the Dockerfile * Improved: PDF417 uses correct vertical scaling now * Added: PDF support Added: Download buttons for ZPL, PNG and PDF Fixed: GraphicBox radius with thicker lines Improved: Invert/Reverse draw results when using white elements Improved: White background for PNG requested from viewer * Added: More real world tests Improved: Tabs for tests and examples in webinterface * Improved: GraphicBox can't have a border smaller than 1 * Improved: Made more ^FR blending native for performance * Improved: GraphicBox border should not exceed half of the smallest side. Improved: Adjusted some example sizes * Fixed: Build issues * Improved: More Skia blending to improve performance Improved: Performance of GraphicBox rounding fix Added: GraphicCircle supports reverse draw now Improved: Overlay can handle custom label sizes better now * Improved: Overlay requests may use wrong number formatting * Bump Dependencies Bump ImageSharp and SkiaSharp dependencies. * Added: MaxiCode support (#224) * Added: MaxiCode support * Improved: Slight finetune on maxicode linux fix * Patch #194 (#227) Don't neglect to append on ignore. * Added: Barcode93 support (#226) * Added: Barcode93 support * Update Code93 Update interpretation line Add test to WebApi * Fix vue lib URL (#228) * Drop BarcodeLib dependency (#229) * Drop BarcodeLib dependency * don't inline regex * Prepare for release * Silence warnings --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Yiping <YipingRuan@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Dmitrii Savchenkov <dmisavchenkv@gmail.com> Co-authored-by: reportingissue <136993729+reportingissue@users.noreply.github.com> Co-authored-by: Daniël van der Garde <12891775+daanggc@users.noreply.github.com> Co-authored-by: Marius Starke <72494359+marius-arch@users.noreply.github.com> Co-authored-by: Yiping <kookaburracc@msn.com>
- Loading branch information
1 parent
3f4df76
commit 5c72337
Showing
84 changed files
with
3,028 additions
and
520 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: .NET | ||
|
||
on: | ||
push: | ||
branches: [ develop ] | ||
pull_request: | ||
branches: [ develop ] | ||
|
||
jobs: | ||
build-windows: | ||
|
||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup .NET 6.0 | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 6.0.x | ||
- name: Restore dependencies | ||
working-directory: ./src | ||
run: dotnet restore | ||
- name: Build | ||
working-directory: ./src | ||
run: dotnet build --configuration Release --no-restore /p:NoWarn=1591 | ||
- name: Test | ||
working-directory: ./src | ||
run: dotnet test --configuration Release --no-restore --no-build --verbosity normal | ||
|
||
build-linux: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup .NET 6.0 | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 6.0.x | ||
- name: Restore dependencies | ||
working-directory: ./src | ||
run: dotnet restore | ||
- name: Build | ||
working-directory: ./src | ||
run: dotnet build --configuration Release --no-restore /p:NoWarn=1591 | ||
- name: Test | ||
working-directory: ./src | ||
run: dotnet test --configuration Release --no-restore --no-build --verbosity normal | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace BinaryKits.Zpl.Label.Elements | ||
{ | ||
/// <summary> | ||
/// Code 93 Barcode | ||
/// </summary> | ||
public class ZplBarcode93 : ZplBarcode | ||
{ | ||
public bool CheckDigit { get; private set; } | ||
|
||
/// <summary> | ||
/// Code 93 Barcode | ||
/// </summary> | ||
/// <param name="content"></param> | ||
/// <param name="positionX"></param> | ||
/// <param name="positionY"></param> | ||
/// <param name="height"></param> | ||
/// <param name="moduleWidth"></param> | ||
/// <param name="wideBarToNarrowBarWidthRatio"></param> | ||
/// <param name="fieldOrientation"></param> | ||
/// <param name="printInterpretationLine"></param> | ||
/// <param name="printInterpretationLineAboveCode"></param> | ||
/// <param name="bottomToTop"></param> | ||
/// <param name="checkDigit"></param> | ||
public ZplBarcode93( | ||
string content, | ||
int positionX, | ||
int positionY, | ||
int height = 100, | ||
int moduleWidth = 2, | ||
double wideBarToNarrowBarWidthRatio = 3, | ||
FieldOrientation fieldOrientation = FieldOrientation.Normal, | ||
bool printInterpretationLine = true, | ||
bool printInterpretationLineAboveCode = false, | ||
bool checkDigit = false, | ||
bool bottomToTop = false) | ||
: base(content, | ||
positionX, | ||
positionY, | ||
height, | ||
moduleWidth, | ||
wideBarToNarrowBarWidthRatio, | ||
fieldOrientation, | ||
printInterpretationLine, | ||
printInterpretationLineAboveCode, | ||
bottomToTop) | ||
{ | ||
this.CheckDigit = checkDigit; | ||
} | ||
|
||
///<inheritdoc/> | ||
public override IEnumerable<string> Render(ZplRenderOptions context) | ||
{ | ||
//TODO:Add 'mode' | ||
|
||
//^FO100,100 ^ BY3 | ||
//^BAN,100,Y,N,N | ||
//^FD123456 ^ FS | ||
var result = new List<string>(); | ||
result.AddRange(RenderPosition(context)); | ||
result.Add(RenderModuleWidth()); | ||
result.Add($"^BA{RenderFieldOrientation()},{context.Scale(Height)},{RenderPrintInterpretationLine()},{RenderPrintInterpretationLineAboveCode()},{(CheckDigit ? "Y" : "N")}"); | ||
result.Add($"^FD{Content}^FS"); | ||
|
||
return result; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace BinaryKits.Zpl.Label.Elements | ||
{ | ||
public class ZplMaxiCode : ZplPositionedElementBase, IFormatElement | ||
{ | ||
public string Content { get; protected set; } | ||
|
||
public int Mode { get; private set; } | ||
|
||
public int Position { get; private set; } | ||
|
||
public int Total { get; private set; } | ||
|
||
public bool UseHexadecimalIndicator { get; protected set; } | ||
|
||
/// <summary> | ||
/// Zpl QrCode | ||
/// </summary> | ||
/// <param name="content"></param> | ||
/// <param name="positionX"></param> | ||
/// <param name="positionY"></param> | ||
/// <param name="mode">2 (numeric postal code) Default, 3 (alphanumeric postal code), 4 (standard), 5 (full EEC), and 6 (reader programming)</param> | ||
/// <param name="position">1-8, (default: 1)</param> | ||
/// <param name="total">1-8, (default: 1)</param> | ||
/// <param name="useHexadecimalIndicator"></param> | ||
/// <param name="bottomToTop"></param> | ||
public ZplMaxiCode( | ||
string content, | ||
int positionX, | ||
int positionY, | ||
int mode = 2, | ||
int position = 1, | ||
int total = 1, | ||
bool useHexadecimalIndicator = false, | ||
bool bottomToTop = false) | ||
: base(positionX, positionY, bottomToTop) | ||
{ | ||
Content = content; | ||
Mode = mode; | ||
Position = position; | ||
Total = total; | ||
UseHexadecimalIndicator = useHexadecimalIndicator; | ||
} | ||
|
||
///<inheritdoc/> | ||
public override IEnumerable<string> Render(ZplRenderOptions context) | ||
{ | ||
//^FO100,100 | ||
//^BD2,1,1 | ||
//^FH^FD002840100450000_5B)>_1E01_1D961Z00136071_1DUPSN_1D123X56_1D028_1D_1D001/001_1D011_1DN_1D_1DNEW YORK_1DNY_1E_04^FS | ||
var result = new List<string>(); | ||
result.AddRange(RenderPosition(context)); | ||
result.Add($"^BD{Mode},{Position},{Total}"); | ||
result.Add(RenderFieldDataSection()); | ||
|
||
return result; | ||
} | ||
|
||
protected string RenderFieldDataSection() | ||
{ | ||
var sb = new StringBuilder(); | ||
if (UseHexadecimalIndicator) | ||
{ | ||
sb.Append("^FH"); | ||
} | ||
|
||
if (Content != null) | ||
{ | ||
sb.Append("^FD"); | ||
sb.Append(Content); | ||
sb.Append("^FS"); | ||
} | ||
|
||
return sb.ToString(); | ||
} | ||
|
||
/// <inheritdoc /> | ||
public void SetTemplateContent(string content) | ||
{ | ||
Content = content; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.