BinaryKits / BinaryKits.Zpl

BinaryKits.Zpl a set of .net libraries. The project supports you in the simple creation of zebra labels. It generates the ZPL data, it is a printer description language from Zebra Technologies. ZPL II is now emulated by many label printers from different manufacturers. So with this implementation you can create labels for most printers.
MIT License
291 stars 105 forks source link

Label text overlaping issue after moved on AKS #243

Open PradeepTiwari98 opened 1 month ago

PradeepTiwari98 commented 1 month ago

When try to download zpl label in pdf on my local machine then label looking good, but after moving on AKS getting text overlaping issue in label. please see below screenshot. Please suggest if any reference missing.

Local machine label image

After moved on AKS

image

primo-ppcg commented 1 month ago

The issue is that a font with appropriate metrics is not installed on the server.

@YipingRuan do you think it would be a good idea to package an open source font with the Web Viewer? This is a commonly mentioned issue.

YipingRuan commented 1 month ago

The issue is that a font with appropriate metrics is not installed on the server.

@YipingRuan do you think it would be a good idea to package an open source font with the Web Viewer? This is a commonly mentioned issue.

Do you mean adding a package to the C# project or in the docker image? Either way is cool.

primo-ppcg commented 1 month ago

Do you mean adding a package to the C# project or in the docker image?

Preferably to the docker image. I'd rather not distribute it.

YipingRuan commented 1 month ago

@primo-ppcg Will you be okay to test the below?

RUN apt-get update; apt-get install -y fontconfig
RUN mkdir -p /usr/share/fonts/custom
COPY "What are the fonts we need to add?" /usr/share/fonts/custom
RUN fc-cache -f -v
PradeepTiwari98 commented 1 month ago

We have already install libfontconfig1 on server (Please see below)

RUN apt-get update && \ apt-get install -y libfreetype6 libfontconfig1 RUN apt-get update && apt-get install -y libgdiplus FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build

Refering to follwing commond

COPY "What are the fonts we need to add?" /usr/share/fonts/custom

Could you please confirm what are the fonts need to install on server??

primo-ppcg commented 1 month ago

COPY "What are the fonts we need to add?" /usr/share/fonts/custom

Nimbus Sans Narrow Bold seems to be a good substitute for Helvetica Sans Narrow Bold. /usr/share/fonts/opentype/urw-base35/NimbusSansNarrow-Bold.otf

I'm unsure if it's available on the target server, though. And also: /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf