I am using c# raw printer to send ESC pos commands to impact printer. When i use GS V 65 command it is adding margin on the top for next print any idea how to remove feed after cut?
Related
I have a printer: the PRINTER TG2460HIII USB RS232 CUTTER EJECTOR (915CG040400300)
I use Python Escpos
I have a problem:
The printed ticket has a lot of blank space at the end, about 5cm
Is it possible to define the maximum size of the ticket? I want to save paper.
Set a minimum ticket length:
_raw(b"\x1d\xe8\x20\x38")
I use Tera Term's console connect to Raspberry Pi 3 but the visible lines only 24.
Here is the environment variable
root#raspberrypi:~# export
...
declare -x LINES="24"
...
For expanding the visible lines, I remove the code "shopt -s checkwinsize" in the file "/etc/bash.bashrc" and I add code "export LINES=50" in the file "~/.bashrc".
Unfortunately, after the device reboot, the visible lines still is 24.
How to expand the visible lines?
It's my fault.
Just only to modify the .vimrc and add the line setting as below.
set lines=50
Now I can use vim to edit file with 50 visible lines.
I PuTTY to a HP-UX box, and when I run top command, it only displays the first 21 processes. I also see on the top right hand corner of the list there is a header that says Page# 1/12. I need to know, in such environment, how I can navigate/scroll through pages to view other processes. (I have tried everything from PgUp/PgDown, and pretty much every key with Shift/Alt/Ctrl at no avail.
Try increasing the scrollback (default is 200) and using SHIFT+PAGEUP/SHIFT+PAGEDOWN.
http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter3.html#using-scrollback
http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter4.html#config-scrollback
Depending on the environment/tools sometimes just spacebar works for me as well.
To navigate, use the following:
j : Next screen
k : Previous screen
l : First screen
I don't think one can scroll on top output, not sure about HP-UX though I believe it should be same behaviour, Did you try using number (eg. press 2 for second page, or n for next page ..just a guess )
There are couple of option if you want to see all process...
1. use htop where you can use page up/page down (or up and down arrow key) to scroll
2. run the top command only one iteration using -n option and take output in any file
top -b -n 1
3. ps -ef command can give you list of all process, ps command also have option to sort output based on %CPU or %MEM
I'm using Atom with soft wrap turned on. In most simple editors such as gedit, Ctrl-Down would be used to skip ahead to the true next line, ignoring any wrapped lines below (same as j and k in Vim).
However in Atom this shortcut produces the result of moving the line itself around, which is less useful to me. I'd like to remap Ctrl-Up and Ctrl-Down to move the cursor up or down to the next true line, as described above.
I'm familiar with editing my keymap file, but I simply can't find any command that would be the equivalent of moving ahead one full line.
You could write a custom command in your init.coffee like this:
atom.workspaceView.command 'custom:move-next-buffer-line', ->
editor = atom.workspace.getActiveEditor()
editor.moveCursorToEndOfLine()
editor.moveCursorRight()
And then just reverse it for moving to the previous buffer line. You can then map the custom command in your keymap, which you said you're familiar with.
If you're using the vim-mode-plus package, then just modify your keymap.cson file by adding
# except insert
# -------------------------
'atom-text-editor.vim-mode-plus:not(.insert-mode)':
# Motions
# -------------------------
'k': 'vim-mode-plus:move-up-screen'
'j': 'vim-mode-plus:move-down-screen'
See for details https://github.com/t9md/atom-vim-mode-plus/blob/master/keymaps/vim-mode-plus.cson
I entered man ls. This shows a screen with the manual for ls. I want to close this manual and go back to the previous screen. How do I do it ? The man page for ls is not allowing me to do so. It keeps on showing "(END)" or some message when I try to type a Unix command.
The man command uses your default pager, which is specified by $MANPAGER if it's set, or by $PAGER. If neither is set, it defaults to something reasonable, probably either more or less. (Oddly, I don't see this in the man page for the man command, which you can view by typing man man -- once you get back to your shell prompt.)
Most pagers can be exited by typing q -- which is going to be a useful thing to know for other programs that invoke your pager, or when you use your pager directly to view a file (less some-file.txt).
When I run the man command on my system, the bottom line shows:
Manual page ls(1) line 1 (press h for help or q to quit)
in reverse video. Do you see that? (You may or may not, depending on your settings.)
If your pager is less, then you can get more information by typing h for help -- or by typing man less.
You can press the q key to exit the man pages.
FYI:
In my experience, the man generally uses less to display the information. To get a helpful list of keyboard shortcuts (navigation, exiting) for less (and for man), you can type in:
less --help
Here is a brief exerpt:
SUMMARY OF LESS COMMANDS
Commands marked with * may be preceded by a number, N.
Notes in parentheses indicate the behavior if N is given.
h H Display this help.
q :q Q :Q ZZ Exit.
---------------------------------------------------------------------------
MOVING
e ^E j ^N CR * Forward one line (or N lines).
y ^Y k ^K ^P * Backward one line (or N lines).
f ^F ^V SPACE * Forward one window (or N lines).
b ^B ESC-v * Backward one window (or N lines).
z * Forward one window (and set window to N).
w * Backward one window (and set window to N).
ESC-SPACE * Forward one window, but don't stop at end-of-file.
d ^D * Forward one half-window (and set half-window to N).
u ^U * Backward one half-window (and set half-window to N).
ESC-) RightArrow * Left one half screen width (or N positions).
ESC-( LeftArrow * Right one half screen width (or N positions).
F Forward forever; like "tail -f".
r ^R ^L Repaint screen.
R Repaint screen, discarding buffered input.
---------------------------------------------------
Default "window" is the screen height.
Default "half-window" is half of the screen height.
Just type qand enter this will get you out of any man page
You can simply type q and press Enter
Here q is to quit.