I am in the process of creating a system that can print labels. The designs have been created in Label Matrix, but I need the ZPL (Zebra Programming Language). Does anyone know if I can go from Label Matrix to ZPL?
Thank you very much
You can add a new ZebraDesigner ZPL driver to the system and use a file as the port. Then when you "Print" the document, it will write the ZPL code to the file.
Note that it might have some header information before the first ^XA which you might not need.
Also, how to add a local port for a driver:
Go to Printer Properties
Click on the Ports tab
Click Add Port
Select Local Port and click New port
Enter a filename e.g. C:\output.zpl
Make sure it is checked in the ports list
Now all printing output should go to C:\output.zpl
Alternatively, can just click Print, tick "Print to file" checkbox, output to a *.prn file, open that file with Notepad and the code is there.
Related
I need page orientation to landscape with a command through pdftoprinter.exe, does anyone know what parameter?
Dim retval
retval = Shell(App.Path & "\PDFtoPrinter.EXE C:\_GR\VB6\TEstePDF_Printer\pdfs\teste*.pdf ", 0)
If you want to change the orientation, you can use the advise given on the documentation of using the dat-file created by PDF-Xchange viewer:
By default, this system uses these printing options as set in PDF-XChange Viewer: Scaling is set to None; Auto-rotate Sheets; Auto-centre pages in sheets; and Choose paper source by PDF-page size. If you want to change any of these, or choose any other options, download and install PDF-XChange Viewer; open a PDF file, go to the Print menu, set your desired options (and, just to be certain, print the file). Then go to the Edit menu and choose Export All Settings to Data File... Accept the suggested filename, "PDF-XChange Viewer Settings.dat", and save the file to a convenient location. Move or copy the file to the same folder with PDFtoPrinter.exe. When you next run PDFtoPrinter.exe it will use the settings saved in that file.
Found here.
Mind that:
Move or copy the file to the same folder with PDFtoPrinter.exe.
I am writing a simple application that should implement the TELNET protocol.
I got to the point where I have to implement the console-like text behaviour. I need the following:
Something that prints out the message from the remote host (Different options available)
Something that gets my message to the remote host (Doable with an external text field)
What I am trying to achieve is a single text view/field that prints the output, gets my input in the same view, and doesn't let me edit the previously printed text (just like a regular terminal window)
I tried with a (scrollable)TextView, tweaking the isEditable field on and off, but it does not appear to be what I am looking for.
This is what appears to the user once the connection is established
This is what happens when the user press backspace.
I would also like to prevent the editing of all the text written before the last return key.
Am I checking out the correct container? Is there something more suitable for my need?
I am trying to create a program which will have live updates from some data source. And I also want to wait for user input just like a normal terminal. Right now, whenever there is update, I will print the content and print the prompt message for input again which create something like this:
Enter command >
This is a live update message
Enter command >
This is a multi-line li......
......ve update message
Enter command > quit
Bye bye!
The problem is that for every live message I received, I will print it and the "Enter command >" will be displayed again again and again, which is not desired. I want the live update to be update on the main part of the terminal, while the "Enter command >" always stay at the bottom
The closest package I can found on Github is https://github.com/gizak/termui but most of the examples inside is trying to display text, gauge and graphs. So I am not quite sure how to get started.
Is there any package or example of the termui package to achieve this? Thank you.
With github.com/gizak/termui you're heading in the correct direction.
To understand why you can't get that
I want the live update to be update on the main part of the terminal, while the "Enter command >" always stay at the bottom
part sorted out, a little excursion to the history of computing is due. ;-)
The thing is, the mode your teminal emulator¹ works by default originated
in how computers would communicate to the operator in the era which predated
alphanumeric displays — they would print their responses using a line printer. Now think of it: a line printer works like this: it prints whatever is sent to it on a roll of paper. What was output, was output.
The new output always appears physically below the older.
When alphanumeric displays (screens) came into existence they
naturally continued to support this mode:
the line text to be output was rendered at the bottom of the screen
with the text above it scrolled upwards.
That's what you see in your typical terminal emulator all the time when you're working in the command line of a shell (such as bash) running by the emulator window.
This, default, work mode of a terminal is called "canonical" or "cooked".
Then came more advanced displays, for which it was possible to change
individual positions on the screen — identified by their column and
row numbers.
This changed the paradigm of how the information was output: the concept
of a so-called "full-screen application" was born.
Typical examples of them are text editors such as Vim and Emacs.
To support full-screen text output, terminals (and terminal emulators)
were adapted by implementing certain extensions to their protocols.
A full-screen application first requests the terminal to switch into another
mode called "raw", in which the terminal sends most of what is input by the
user directly to the program running on the terminal.
The program handles this input and orders the terminal where and what
to draw.
You can read this good summary
of the distinction between the both modes.
As you are supposedly suspecting by now, to be able to keep some block
of information at a certain fixed place of the terminal's text screen,
you want your program to be a full-screen program and use the terminal's
raw mode and its special commands allowing you to directly modify
text at certain character cells.
Now the problem is that different terminals (and terminal emulators)
have different commands to do that, so there exist libraries to isolate
the programs from these gory details. They rely on the special "terminal
information databases" to figure out what capabilities a terminal has
and how to make it do what the program asks.
See man terminfo for more background.
The most widely known such library (written in C) is called ncurses,
and there exist native solutions for Go with supposedly the most visible
one being github.com/nsf/termbox-go.
The github.com/gizak/termui makes use of termbox-go but for you it might
suffice to use the latter directly.
¹ Chances are very high you're not sitting at
a real hardware terminal
connected to a UNIX® machine but are rather working in a GUI application
such as GNOME Terminal or xterm or Termial.app etc.
These are not "terminals" per se but are rather
terminal emulators —
that is, pieces of software emulating a hardware terminal.
I want to recover the content of the show log module of Omnet++/Tkenv (see picture attached here) into a file in order to analyze the traffic happened between nodes and RSU at each time after the end of the simulation.
How can I do this please?
For a one-off simulation running in Tkenv, you can use the clipboard: Right click the module log window, choose select all. Right click the log window, choose copy to copy the text to the clipboard. Open a text editor of your choosing, right click and select paste to insert the text from the clipboard.
For batch simulations running in Cmdenv, you can set two parameters in the omnetpp.ini file: cmdenv-express-mode = false and cmdenv-output-file = log.txt -- this will store the log output in a file.
If you are doing this for result collection, though, better use OMNeT++'s signal, scalar, and vector features.
I work on mainframes and don't have much knowledge about windows other than playing warcraft :-) hence pardon me if I ask something nooby/silly.
I have a requirement to enter a particular long-text in the current position of a cursor whenever a shortcut key is pressed.
I am thinking of creating a bat file and assigning a windows keyboard shortcut to the bat file and whenever I have requirement to enter the long text, I press the windows shortcut key
and the long text gets typed in the current position of the cursor.
The current position of the cursor can be in any application, like Excel, Word or notepad or Windows dialog prompts.
Could you please let me know if this is possible and point me where I could get some information about this "technique".
Thanks & Regards,
Vasanth.S
To make a single key combo do what you are asking, you may need another program. You can make a link to a batch file, hook up a shortcut and then use the clip command to copy text from a file onto the clipboard. That would require the shortcut and then a Ctrl+V to paste. The batch file would look like this:
clip < c:\SomeDir\sometext.txt
You might like to look at using a clipboard manager - which saves a history of clipboard entries, can search for an entry, and paste it at the cursor.
Ditto and CLCL are both useful and free - which one you use depends on your windows version.
They are hotkey driven for ease of use, but mouse can be used.