Print Excel label via c# service

O Oleksandr Chekmez 3 years 7 months ago
188 1 0

Labels are prepared as Excel files.
When purchase is done, we use Excel file as template and fill it with data in our C# Windows Service.
Now we want to print this filled Excel file to Zebra printer (ZDesigner 140Xi4)
 
Since it is C# Windows Service, we cannot send file to printer (installed as printer in Windows) via Excel.
What is the correct approach for this task?
 
We tried different solutions, but all of them didn`t work well. First of all, if we compare print result via Excel and other methods - size of the label is different. It looks like Excel is adjusting label to paper size (we send to printer with No Scaling option).
At this moment we tried the following options:
1. Convert Excel file to PDF and send PDF to printer via ghostscript. Problem - PDF has size info and page size does not match paper size. When PDF is printer, size and location is wrong.
2. Convert Excel file to BMP and send BMP image to printer via Paint. Result is much better, but size of printed image does not match original size and size of label printed in Excel.
3. Convert Excel file to BMP. Convert BMP to monochrome. Send monochrome image to printer via ZLP. Printed page has the same size as BMP (but does not match label printer via Excel). But new problem appears - text quality is very low after conversion to monochrome. 
 
Main target here is to get the same result as if we print via Excel, because user who prepare Excel templates adjust size and texts and test it via Excel (first of all print preview, and final test via real printing from Excel).

Please Register or Login to post a reply

1 Replies

E Efkan YILMAZ

Can you send the settings in the ZDesigner 140Xi4 driver for the label size?  I suspect this may be what is the issue.  Also, what size labels are you actually trying to print?

CONTACT
Can’t find what you’re looking for?