Send Command to Zebra Label Printer - vb.net

I need to send the following command to a Zebra Label Printer:
q270
everything I can find online tends to be in C# and I'm working in VB.Net
I was hoping this would be as simple as an example I found online
which basically was
Dim sb As StringBuilder
sb.AppendLine("q270")
RawPrinterHelper.SendStringToPrinter(printername, sb.tostring())
but RawPrinterHelper appears to be a class I don't have, every example if this I can find is in C#. They also appear to be for sending a much more complex string of text to the printer. So I am getting a little lost in it all.
Can anyone assist in sending the single q270 command to the printer?
The printer is a Zebra LP2844. It prints these little sticky labels. The command I'm sending is a EPL command.
Thanks in advance

Related

HPGL File Viewer in vb.net

Hello Respected Everyone,
I'm a Beginner level programmer having working knowledge of vb.net. Currently I'm working on a program in VB.NET, which will extract labels from an HPGL file and print them on Thermal Printer. I've successfully read and extracted the Label Values from Label Command. Now I'm trying to create an HPGL viewer in my Program. I've searched the internet for any Library or sample program which can guide me through but haven't found any reasonable answer. Please Guide me how can I view an HPGL File in a vb.net program.
I'll provide more information if needed.
Thank You in advance...

TcpClientActivex capture to picturebox

Hello i'm trying to make an automated camera capture using TcpClientActivex control. I'm still a beginner at vb.net. But i don't know how to capture it then set the picturebox image.
I can use TcpClientActivex.GetImage.Save("location") though but i don't wanna save it into file, i want to set it to picturebox using codes without saving the file. I tried researching for it but the results are not what i was looking for...
i tried TcpClientActivex.GetImage.Save(picturebox1.image)
and
TcpClientActivex.GetImage.SaveAdd(picturebox1.image
but didn't work...
Did you try assigning the image to the picture box?
PictureBox1.Image = TcpClientActivex.GetImage()
Please read up on the Assignment Operator. You might also want to find yourself a tutorial or book to get a grasp of the basic concepts of VB.NET and Object-oriented programming.

Convert Excel to PDF in SSIS Not Working

I have SSIS code that converts Excel to PDF in a script task similar to this posts code: Code to Convert Excel to PDF using VB.NET. The SSIS job runs all the way to where it exports to excel:
oWorkbook.ExportAsFixedFormat(pFormatType, PDFFileName, pQuality, _
pIncludeDocProperties, _
pIgnorePrintAreas, _
pFrom, pTo, pOpenAfterPublish)
Once it hits this block of code my SSIS job freezes. I have my application.displayalerts set to false thinking that somethiing pops up but that is not the problem. I also have PDF reader installed on my server and that doesn't help either. This code works on my PC but not on the server. I cannot seem to figure out why this is happening. It seems like the code referenced in the link does work also. Any ideas why my code doesn't work on my server?
You can't reliably call desktop applications from a server process that has no desktop.
It's probably missing something like Acrobat or a print queue and is waiting for user input that will never come.
If you need to reliably create PDFs from excel using an automated process, you'll need to look at 3rd party tools or writing something.
I can't locate it right now, but Microsoft has a technote somewhere that mentions this.
So I dug a bit deeper. I was able to run SQL Agent in interactive mode and I could see a pop up stuck in Excel (or at least see a pop up with a title "printer setup", the screen was all wigged out otherwise). I googled that and found this other posting: Excel automation: PDF export causes "Printer setup" popup that describes my problem. He fixed his problem, which worked for me as well, by changing the default printer to the microsoft XPS document printer. Hope this helps someone else.

Printing a form in vb.net

I wrote a small program to store and hopefully print contact information (in vb.net). The program contains a few text fields and a picture box. Saves the Information and so on. Can anyone recommend a quick way to save the form to a format that can then be transferred to her work computer and printed (she can't install my program at work, taboo policy and so on). Using the printform control, printform.print() with the PrintAction set to PrintToFile is just giving me garbled junk. I guess I could print to an html file bit by bit, but I thought I'd ask if anyone knows a better way. Also, with the html route I'm not sure how I'd add the contents of the picture box. Thanks in advance.
You can try saving your Form to a Bitmap using the DrawToBitmap Method which could then be saved as an image then printed out later, the main problem you will run into with this method is that the DPI settings are different between the screen and a printer.
Dim bmp As Bitmap = New Bitmap(Me.Width, Me.Height)
Me.DrawToBitmap(bmp, New Rectangle(New Point(0, 0), Me.Size))
bmp.Save("C:\temp\123.bmp") 'Set your path and your filename here

Convert Omniform to PDF in bulk/commandline

We have a large number of Omniform files (around 100,000). We're updating our main server OS from Windows Server 2003 to Windows Server 2008. Omniform isn't supported in Windows Server 2008 so we need to convert these files to pdf (or another viewable format).
What I've tried so far:
Using Print or PrintTo verb from inside a program using Process.StartInfo and using a PDF Writer printer.
Using Print directly from a command line using the Print verb with the PDF Writer set as the Default Printer:
C:\PROGRA~1\ScanSoft\OMNIFO~1.1\OmniForm.exe /p "Test.ofm"
Both of these Print successfully and a PDF appears. However it prints only the Form, not the Form with the entered in Data. Namely you'll get Last Name then a blank instead of showing the entered last name.
If I print to a normal printer and not a PDF Writer I get the same behavior. Form only with no entered in data appearing.
I've tried calling Nuance Tech Support and they suggested doing them manually 1 at a time. Given this would take someone about half a year of full time work to do, that's not a viable option for us.
So what I'm looking for is a solution to the command line print above
If an "image" of the filled-in form might work for you, Omniformat might help you out. It basically converts the file to pdf using a print-to-file method, but it might help you out, since it does batch conversion.