Giter Club home page Giter Club logo

virtual-zpl-printer's Introduction

Virtual ZPL Printer

An Ethernet based virtual Zebra Label Printer that can be used to test applications that produce bar code labels. This application uses the Labelary service found at http://labelary.com.

Latest Release

Download the installer (v 3.3.0)

Now requires .NET 8.0. Download Setup.exe and the MSI if you need to have the .NET 8.0 Framework installed automatically.

Version 3.3.0 Updates:
  1. Added multi-language support. Currently added support for Spanish (es) and Ukrainian (uk). Both translations were done using Google Translate tool and require additional work to be done. These languages can be updated via a pull-request or a new language supported added via same. Right to Left reading languages have not been tested yet. See section on adding, requesting or updating languages. Note that the Labelary API returns messages in English and they are not translated. This language also uses a library called UnitsNet that has its own language support. In some cases output from this library may be in English.
  2. Moved core ZPL templates to application folder. Custom templates can still be dropped in the personal folder as before.

Requesting, Adding or Updating Languages

Requesting a new Language/Region

To request anew language/region add an issue using the label Add Language. The language will be added using Google Translate.

Adding Language/Region Support

Add a pull-request with the title "Added Language xx-YY" or "Added Language xx". Only the the XML string files should be included in the pull request. If any other files are modified, the pull request will not be accepted. You must ensure that all strings are included in each of the XML files. Ensure the file names are correct: Strings.xx-YY.resx or Strings.xx.resx.

Issues posted to correct or change a specific word will not be accepted. If you come across a word that should be translated differently, perform a pull-request to change it.

Updating Language/Region Support

Add a pull-request with the title "Updated Language xx-YY" or "Updated Language xx". Only the the XML string files should be included in the pull request. If any other files are modified, the pull request will not be accepted. Ensure the files are not renamed. If you are not the original creator of the language file, please seek a review from the original creator. If the original creator does not respond within one week, the pull-request can be accepted without their review.

Not Allowed

  • Issues posted to correct or change a specific word will not be accepted. If you come across a word that should be translated differently, report a bug or perform a pull-request to change it.
  • Adding new keywords to the XML file will not be accepted. If a translation was missed in code please report a bug or perform a separate pull request.

Current XML Files

  1. Src/Virtual Printer Solution/VirtualPrinter/Properties
  2. Src/Virtual Printer Solution/ImageCache.Repository/Properties
  3. Src/Virtual Printer Solution/VirtualPrinter.Db.Ef/Properties
  4. Src/Virtual Printer Solution/VirtualPrinter.Repository.LabelParameters/Properties

Screen Shots

History

Version 3.2.1 Updates:
  1. Fixed Issue #51 - Humanizer library caused a crash on unsupported languages. Added exception handling and fallback formatting when language is not supported. Also added all currently supported languages.
  2. Updated button icons.
Version 3.2.0 Updates:
  1. Added the ability to load custom TrueType fonts in the printer and use them in the ZPL.
  2. Clicking the Test button will bring the window to the front if it is already open.
  3. Further re-factored the project structure and code to allow for extended capabilities.
Version 3.1.1 Updates:
  1. Fixed issue #48.
  2. Fixed issue #49.
  3. Refactored TCP listener to allow for extended capabilities in future releases. The listener uses request handlers to process incoming requests.
  4. Corrected issue preventing last filter from being deleted.
  5. Corrected issue where the the application tries to read from the network when there is no more data available. Added a check to stream.DataAvailable.
  6. Changed stream.ReadAsync() to use memory based overloads.
  7. Added detailed logging using Serilog. The path defaults to %USERPROFILE% but can be edited in the appsettings.json file. Logging will be expanded in each new release.
Version 3.1.0 Updates:
  1. Exposed the Labelary API URL in global settings to allow HTTPS or HTTP.
  2. Added the option to use POST or GET in global settings.
  3. Added an option to enable Linting in global settings. Linting is an option provided by Labelary to provide warnings for the ZPL text sent to the API.
  4. Added a viewer for the ZPL warnings. The viewer can be accesses via the context menu on an image or by clicking the button on the label image (which is only visible when warnings exist).
  5. Added a preview button on the label image to open the image viewer.
  6. Made the connection test viewer output read-only.
Version 3.0.2 Updates:
  1. Added menu option to test Labelary connectivity.
  2. Added the ability to configure a physical printer to print a label retrieved from the Labelary API. This is currently limited in functionality and may be expanded in future versions.
Version 3.0.1 Updates:
  1. Added support to specify the cached image file name in ZPL using a comment such as ^FX ImageFileName: USPS-Shipping. The file numbering is still controlled by the application (as well as page numbering when a ZPL file contains more than one label).
Version 3.0.0 Updates:
  1. Updated to .NET 8.0
  2. Merged Pull-Request: Avoid splitting large messages | Make encoding configurable #37
  3. Fixed Bug: Sizes in millimeters or centimeters not saving correctly #29
  4. Fixed Bug: Test windows not working properly (can't paste or add enters) #30
  5. Fixed Bug: Print settings takes into account regional formatting #33
  6. Fixed Bug: Print ZPL Bug #38
Version 2.3.0 Updates:
  1. Fixed issue with test label window not reopening.
  2. Added ZPL editor to test label window (no save option).
  3. Added application menu.
  4. Added hot keys for certain actions.
  5. Added global settings (with configurable TCP settings).
  6. Added about menu.
Version 2.2.0 Updates:
  1. Made IP address editable.
  2. Corrected an issue where the configuration dialog would only open once.
Version 2.1.0 Updates:
  1. Upgraded to .NET 7 framework.
  2. Added ZPL filters. One or more find replace filters (supporting regular expressions) can be added to each printer configuration.
Version 2.0.2 Updates:
  1. Large labels (greater than 8192 bytes) were being truncated. Changed TCP/IP receive buffer size to be dynamic.
Version 2.0.1 Updates:
  1. Re-factored code/cleanup.
  2. Added USPS sample label.
  3. Corrected an issue where too many labels at one time could cause a multi-thread related exception.
Version 2.0.0 Updates:
  1. Re-factored user interface.
  2. Added printer configurations.
  3. Added test label templates. Custom templates can be added.
Version 1.0.18 Updates:
  1. Use Labelary X-Total-Count HTTP header to determine the number of labels to create.
Version 1.0.17 Updates:
  1. Added rotation support.
  2. Added support for multiple labels within a single ZPL document.

virtual-zpl-printer's People

Contributors

curdbecker avatar porrey avatar porrey-lsc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

virtual-zpl-printer's Issues

Great tool

Thanks for this tool! This saved me a lot of time testing automotive labels. Cheers

Print ZPL Bug

Hello,

The application sent an error when trying to print one ZPL

image

but in another viewer is working fine

image

this is the ZPL

ZPLSample.txt

Exist a log for checking the issue ?

Thanks

Error when remove all printer

When you remove all printer => you can't add new printer

When you launch the app
==> Sequence contains no elements

404 Error when printing test label ?

Hello,

thank you very much for your software !
I just installed the lastest version and I have a 404 when testing the label ?
maybe we are not able to contact the labellary api ?

Kind regards,

Simon Poidevin

Virtuak ZPL Printer - Browser Z** Print

I tried to make Virtual ZPL Printer work with Z* Browser Print.
On my PC it didn't work, and I found that it was caused by an exception during the stream reading.

I replaced in TcpListenerClientHandler (near line 90)

while ((numBytesRead = stream.Read(data, 0, data.Length)) > 0)
{
		ms.Write(data, 0, numBytesRead);
}

by

while ((numBytesRead = stream.Read(data, 0, data.Length)) > 0)
{
		ms.Write(data, 0, numBytesRead);
		if (numBytesRead < data.Length)
		{
				break;
		}
}

And it seems to work better. But not yet 100%.
Not all labels come in Virtual ZPL Printer, and sometimes I have errors between my web site and Z* Browser Print.
(no error in Virtual ZPL Printer)

(Sorry I'm not familiar enough with Git to make pull requests.)

I don't know if I'm the only one having problems with this configuration with Z* Browser Print.

Custom file naming for virtual ZPL printer

Currently, the virtual ZPL printer uses a default file naming convention when saving print jobs as .png files. However, it would be useful to have the ability to pass a custom file name to the virtual printer, so that the generated .png files can be easily identified and organized.

This feature will be useful for applications that need to generate multiple ZPL files with different names.

Send recived image to other printer

I would like to be able to print a "label" immediately after receiving it on a regular label printer that does not support EPL/ZPL. Will such a feature be implemented, or, is it already available?
Thanks in advance for a positive answer))))

Print settings takes into account regional formatting

When editing printer configuration and setting the Label Height/Width settings, the program takes into account the system locale regional format settings.

So if the windows regional format uses comma as a decimal separator, it will only allow to enter Label Height/Width with a comma.

So label height 4,5 instead of 4.5.

The program then uses the value with a comma in the API URL it sends Labelary and comes back with a 404 response.

To Reproduce
Steps to reproduce the behavior:

  1. Go to "Additional date, time & regional settings" in Windows control panel
  2. In "Formats" tab, go to "Additional Settings..."
  3. For "Decimal symbol" enter a comma.
  4. Press OK
  5. Open Virtual ZPL Printer
  6. Edit Active Printer Configuration
  7. Enter Label Height or Label Width with a decimal number (example: 2,5)
  8. Save
  9. Press Start
  10. Press Test and send

Expected behavior

A valid print label.

Screenshots

image

image

Desktop (please complete the following information):

  • OS: Windows 10 Ultimate

Save as PDF

Is it possible to save the output as PDF instead of PNG?

Sizes in millimeters or centimeters not saving correctly

Describe the bug
When you set the label in millimeters this does not save correctly

To Reproduce
Steps to reproduce the behavior:

  1. Go to labels and create new one
  2. Select millimeters and save
  3. If you close and open again the value is not same has saved

image

image

Desktop (please complete the following information):

  • OS: [Windows 11]
    image

** In inchs works fine **

Add custom endpoint instead http://api.labelary.com/

Is your feature request related to a problem? Please describe.
When you are testing labels with alot of data the api can't response,
Maybe if you have a custom endpoint with self server can change the endpoint to get the labels,

Describe the solution you'd like
Add option to change the api endpoint

SQLite Error 14: Unable to open database file

After running the installer for version 3.0.1 and attempting to run the application, the following error appears.

Screenshot 2024-01-11 100649

Dismissing the error (by clicking the OK button), opens the app. However, adding label settings is not possible. This error renders the app unusable.

Screenshot 2024-01-11 101107

Grid and background image in preview

Hi,
First of all, I like to congratulate you for this wonderful tool!

I'd like to share with you a couple of thoughts, just in case you find them interesting...

Sometimes I get a label layout, designed with another more general software.
Transforming it into something I could feed to a ZPL printer means several iterations: ZPL code, preview, compare, change, and back again.

In the label preview, I can think of two features that would speed up that process a lot.
If I were able to set a background image, to compare the printed label with the desired label, and a grid (in dots/mm/inches) to check dimensions, then I think I could do the above process even with my eyes closed.

If you could add that features, I'd be very grateful!

Thanks in advance,

Carlos

VZPL crush after printing

THK you for your soft!
But it crush every time after printing...
v 3.2.0
Win 11
I print with this code:

^XA
^LH0,0
^CI28
^FO10,20^A0N,25,20^FDСеча (Стерильний контейнер)^FS
^FO10,45^A0N,25,20^FDЛубніна жін. 07.10.1984^FS
^FO10,70^A0N,20,18^FDКсенія Макарівна^FS
^BY2,3,40
^FO60,100^BCN,50,N,N,N,A^FD002463^FS
^FO95,160^A0N30,20^FD002463 ^FS
^XZ

or any other text on this code....
No information about crash in logs, but I add it.
Virtual-ZPL-Printer-Log202402180032.txt

In addition, there is an error in the program window after launch:
image

Thank you in advance for solving the problem!

Cooperation

Hello Porrey I accidentally became aware of your project. I am currently developing a Zebra Tool solution with another developer. Your project would fit well with it. Also you might be interested to work on our project as a whole. https://github.com/BinaryKits/BinaryKits.Zpl

InvalidOperationException

Describe the bug
When running in debug mode on Visual Studio 2022, an InvalidOperationException occurs with the message:
Unable to resolve service for type 'Diamond.Core.Repository.IRepositoryFactory' while attempting to activate 'VirtualZplPrinter.ViewModels.MainViewModel

To Reproduce
Steps to reproduce the behavior:

  1. Open ZPL Printer Solution.sln with Visual Studio 2022
  2. Rebuild solution
  3. Start in debug mode

Expected behavior
The application should start without any error

Screenshots
image

**Desktop: **

  • OS: Windows 10
  • Visual Studio 2022

[IDEA] What about a `Virtual-ESC/POS-Printer`

it would be very useful

http://escpos.atwebpages.com/base64html.php

Look at that web service, i am testing this way with jquery

$.post('http://escpos.atwebpages.com/base64html.php',{esc:btoa(esc_pos_raw_data),width:344}).done(function( data ){
    console.log( "Data Loaded: " + data );
    addLabel(data)
});

You send esc/pos data as raw text on base64 encoding, and returns the label on base64 html

Labelary service error

Hello
Trying some test prints today and I am getting a Labelary service error "Not Found". Is your application using the labelary API? There may have been a recent update. Thanks

Custom fonts usage and save to PNG

Is your feature request related to a problem? Please describe.
I have a Zebra ZD421 printer in which I have installed (downloaded) and mapped some custom fonts:

^CWG,E:DIN000.FNT ^FX Dinot Bold 10
^CWH,E:DIN001.FNT ^FX Dinot Regular 7
^CWI,E:DIN002.FNT ^FX Dinot Bold 14
^CWJ,E:DIN003.FNT ^FX Dinot Light 8
^CWK,E:DIN004.FNT ^FX Dinot 7
^CWL,E:DIN005.FNT ^FX Dinot Bold 9
^CWM,E:DIN006.FNT ^FX Dinot Bold 7

Describe the solution you'd like
I want to preview my label using the fonts installed in my printer, all my labels will use only those fonts, not any of the default fonts from my Zebra printer. Also, my goal is to save the label in png to be able to display in my form of my application, not externally.

Describe alternatives you've considered
If there is any, please advise.

Test windows not working propelly (can't paste or add enters)

Describe the bug
If you are using a test windows they seems block some actions,

Can't paste a custom ZPL code, also can't add new lines, the "enter" button seems locked

To Reproduce

  1. Click on test
  2. Write new lines with enter it dosent works
  3. Or you want to pase code with CTRL + V

image

image

Add Usage Instructions

I ran the installer and was able to get the active printer started, but I don't know how to make my applications recognize it as a ZPL printer. Are there additional steps?

Additional option to use...

Could you add a few options? Here is what I would like to see:

  1. Run the program at startup
  2. Minimize to tray.
  3. Tray minimize at startup

And what about translation to other langs? Can translate to Ukrainian.))

Thank you in advance for your work!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.