BinaryKits.Zpl
BinaryKits.Zpl copied to clipboard
Viewer convert to PDF instead image
Hi I recently made some PRs to fix some bugs.
This was the initial viewer result, before fixes:
And after fixes this was the result:
This is the result using Labelary:
I can say that is approximately the same result, maybe your viewer needs some tune(in font sizes and types) , but nothing big.
Now that those bugs are fixed, I need want to know if can I create a PDF file instead a image files, I know that I can create a PDF and add 1 image per page, but I saw in Labelary that, when you donwload as PDF file, the resulting file doesnt have images on each PDF page, it have text.
This is an example that proves that if you download PDF from Labelary, all is rendered as text (I select it, to prove it):
So can I create a PDF instead an image? or do I need to investigate and create my own function?
Thank you!
Hi, I have an update.
I'm using pdfSharp to create PDFs based on ElementDrawers from viewer, with some modifications.
At this moment I had ported this classes to draw in a PDF page, instead a image (I created other classes adding Pdf before Element, like TextFieldPdfElementDrawer):
TextFieldElementDrawer
QrCodeElementDrawer
FieldBlockElementDrawer
Barcode128ElementDrawer
Barcode39ElementDrawer
BarcodeEAN13ElementDrawer
The text highlighted in pink, is text, not an image!
This library can be a real competition for labelary for zpl to pdf conversion
=====UPDATE 10/06/22=====
Image from Labelary
My Pdf drawer (is not an entire image, is text + images (barcodes, qrcodes, graphics)
Font is Arial, because Zpl fonts are from Zebra, and Arial is a default one in Windows, linux etc.
Here is the PDF test file with the same ZPL code 16 times (Created with ZPL code repeated 16 times) test.pdf
The major benefit to draw directly in a PDF instead an Image is the filesize, a PDF with images and 50 labels, was like 10mb, with this method, the filesize is reduced to only 436kb, with the same 50 labels.
Also processing time was cut from 30+ seconds to only ~8 seconds to process the same labels.
Hi @ingfdoaguirre,
Will you plan to share these codes with us?
@ingfdoaguirre Thank you!
Hi I recently made some PRs to fix some bugs.
Just to confirm the PDF support is to allow user download a PDF file, and has nothing to do with the web page rending?
Hello @ingfdoaguirre
Is there any example I can use to create PDF files instead of images? Thank you
Hello @ingfdoaguirre ,
pdf conversion is something I am currently missing here. Could you please share the code with us? I think this will help many people out there which need to handle label requirements :)
Thanks a lot and best regards