Coder Social home page Coder Social logo

Comments (22)

porrey avatar porrey commented on May 19, 2024 1

The latest release forces US English when formatting the label sizes for the Labelary API.

from virtual-zpl-printer.

StefanZ09 avatar StefanZ09 commented on May 19, 2024

Hello everyone - I have the same problem. It doesnt matter which printer configuration, which label sizes or resolutions I try, and it also doesnt matter which test label I use, I always get the 'Labelary Error - ERROR: HTTP 404 Not Found' error. I also tested to send ZPL code from the ERP system (D365 SCM) to the virtual ZPL printer, but with the same error message. I use the version 2.3.0. Any help is very welcome!

from virtual-zpl-printer.

porrey avatar porrey commented on May 19, 2024

Earlier versions had bugs that caused invalid URL's to be formed resulting in 404 errors. Please use the latest version to rule out bugs as the source of the issue.

I uploaded version 3.0.2 that contains a new menu option to test Labelary connectivity.

Screenshot 2024-02-01 at 9 24 06 PM

from virtual-zpl-printer.

StefanZ09 avatar StefanZ09 commented on May 19, 2024

Hi Daniel! Thanks a lot for your reply. I talked to my IT-department and ask for help. So they updated the Version of the Virtual ZPL-Printer to Version 3.0.2. They also updated the .net as you described on github. Then I restarted my computer and tried it again, but with the same 404 error message (with test from the ERP system to the printer). Then I tried to use the 'Test label' function within the Virtual ZPL printer but without success. I always get the 'HTTP 404 Not found' error, no matter which 'Test Label' settings I use (4x6 USPS, 2x2 Product label, 4x6 Shipping label). Can you give me another tip what I can do to solve that problem?

from virtual-zpl-printer.

porrey avatar porrey commented on May 19, 2024

Try these:

  1. Click the Connection menu option and select Test Labelary. Post the screenshot of those results here.
  2. Open a browser and enter the URL http://api.labelary.com/v1/printers. You should get a 405 error with the following result: ERROR: HTTP 405 Method Not Allowed.

from virtual-zpl-printer.

Simon-Syd avatar Simon-Syd commented on May 19, 2024

hello Daniel,
with 3.0.2 it's still KO (404 error when testing)
but the weird thing its that "test labelary" looks fine :
image

another weird thing, when I compare the "test labelary" output from my computer (which is OK) and the other computer, it's the same informations but not in the same order ?
image

just a little text to change here (it's edit instead of test) :
image

thanks for your help

from virtual-zpl-printer.

Simon-Syd avatar Simon-Syd commented on May 19, 2024

we had to remove this file after uninstalling the software :
image
not it's fine !

from virtual-zpl-printer.

CMIGIT avatar CMIGIT commented on May 19, 2024

It seems to be with and height in the url to labelary, because in some PC, the decimal separator is "," (coma) and not a point "."

from virtual-zpl-printer.

CMIGIT avatar CMIGIT commented on May 19, 2024

In :
Virtual-ZPL-Printer\Src\Virtual Printer Solution\Labelary.Service\LabelService.cs

After (line 110)

						if (width <= 15 && height <= 15)
						{
							string url = $"{this.LabelServiceConfiguration.BaseUrl}/{labelConfiguration.Dpmm}dpmm/labels/{width:#.##}x{height:#.##}/{labelIndex}/";
							url = url.Replace(",", "."); // Add this : Violent but normally no comma in url so complete replacement

from virtual-zpl-printer.

porrey avatar porrey commented on May 19, 2024

Is your system locale set to use a comma for decimal separator?

from virtual-zpl-printer.

CMIGIT avatar CMIGIT commented on May 19, 2024

Yes

from virtual-zpl-printer.

CMIGIT avatar CMIGIT commented on May 19, 2024

I'm already have th issue.
Here is a possible correction, with your code

						```

CultureInfo v_CultureInfo = CultureInfo.InstalledUICulture;
NumberFormatInfo v_NumberFormatInfoPoint = (NumberFormatInfo)v_CultureInfo.NumberFormat.Clone();
v_NumberFormatInfoPoint.NumberDecimalSeparator = ".";

						string widthString = width.ToString("#.##", v_NumberFormatInfoPoint);
						this.Logger.LogDebug("The Width parameter is '{value}'.", widthString);
						string heightString = height.ToString("#.##", v_NumberFormatInfoPoint);
						this.Logger.LogDebug("The Height parameter is '{value}'.", heightString);

from virtual-zpl-printer.

porrey avatar porrey commented on May 19, 2024

Please describe the issue with more detail. Do you have logs? What are your current culture settings?

from virtual-zpl-printer.

CMIGIT avatar CMIGIT commented on May 19, 2024

I still have the same issue.
height and width always have commas when transforming to string.
I propose this code to correct, to force decimal separator.
Note that you can set "v_NumberFormatInfoPoint" in static and compute only once.

from virtual-zpl-printer.

porrey avatar porrey commented on May 19, 2024

I need to be able to reproduce the issue to correct it properly. I have no way of ensuring the code change corrects the issue . Please provide enough details to reproduce the issue.

from virtual-zpl-printer.

CMIGIT avatar CMIGIT commented on May 19, 2024

This is my config for en-US

ConfigCultureUsEN

from virtual-zpl-printer.

porrey avatar porrey commented on May 19, 2024

One of the tests I ran was to change my configuration for us-EN the same as above and I get proper operation. Can you provide more information such as what other language are you running, which one is primary? Also, is the log generating? Can you attach the log file?

from virtual-zpl-printer.

CMIGIT avatar CMIGIT commented on May 19, 2024

May be you can reproduce the issue if you change your regional settings to set comma in decimal separator and space for thousand separator.
Then you configure the printer with paper in centimeters, and setsize to 10cm x 15cm.
You should see, that height and width after convert in string have comma and not point ;-)

from virtual-zpl-printer.

porrey avatar porrey commented on May 19, 2024

That is the test I ran before publishing. I also ran it again after your post and it passed. I am still unable to reproduce.

from virtual-zpl-printer.

ASTIN-UA avatar ASTIN-UA commented on May 19, 2024

Good afternoon. I have the same problem. I set the size in millimeters. 25х40. The label is not displayed, moreover, the program crashes. The localization is Ukrainian. If you convert the entered millimeters to inches, you get the following:
image
And, accordingly, the print does not go. The output image is of the following type:
image
If you convert the settings to inches and align to an integer, it starts working.
OS: win 11
locale: Ukrainian
If you need some logs, say me whare can i find it.

P.S.: I have find it!
Virtual-ZPL-Printer-Log202402161216.txt

In addition, the program crashes after an unsuccessful attempt to print a label.

from virtual-zpl-printer.

ASTIN-UA avatar ASTIN-UA commented on May 19, 2024

THK! in 3.2.0 no more this problem! But crush...

from virtual-zpl-printer.

CMIGIT avatar CMIGIT commented on May 19, 2024

It's ok with 3.2.1

from virtual-zpl-printer.

Related Issues (20)

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.