Случи се така, че се наложи да подкарам DOS на цял екран с Norton Commander и кирилица с печат към LPT1 порт под Windows 7 x86/x64!
Как без да използваме VirtualPC поради бавното зареждане и прочие, ами най лесното, за което се сетих беше:
http://dfendreloaded.sourceforge.net/
Та реших да го споделя с Вас и да уточня, че е тествано и сработва, всичко е въпрос на настройки.
Пакета е лесен за работа и е с интегрирана последна версия на прочутият DOSBox Има също така и FreeDOS, а с малко преработка може да зарежда и Norton Comander както и да се работи на разни складови и други програми под DOS с печат към мапнат LPT1 порт на USB принтер Изискването беше и за въвеждане на Кирилица в DOS прозореца
Всичко от което имате нужда е копията на съответните програми както и да ги сложите в папка: VirtualHD (виртуалният DOS диск)
Честно се забавлявах с ползването на команди NC, DIR, ARJ, RAR, CD и др.
Лично аз Ви съветвам да сложите паметта да е 32 MB до максимум 64 MB версия на DOS 6.2
Може да си изтеглите стари DOS игри да се позабавлявате, но лично аз заради задачката се забавлявах с писането на разни BAT скриптчета за да подкарам коректно кирилизация (BDS.COM, CYR.COM)
===========================================
Подкарването на принтера се извършва по следният начин:
1. Правим Sharing/Споделяне на USB принтера на който ще принтираме, аз лично Ви съветвам принтера да е на същата машина на която е и DOS програмата. По мрежа става, но тогава се налага да използвам програми от вида на WIN2MIK и Total Commander и доста писане за да прекодираме в правилната кодова MIC таблица
Hint: Добавяме нов принтер локално независимо какъв и махаме отметката на Auto Detect, като избираме за порт LPT1:, намерете точно "Generic/Text only" принтер, който се намира в производители "Generic"
Печат от RAW в TXT
Айде и още един HINT:
Инсталирате локално USB принтер. След това инсталирате абсолютно същият принтер 2-ри път, но му указвате, че порта е LPT1. След което отивате на настройките за порт на USB принтера и включвате Enable Printer Pooling (не знам как да си го преведа) и слагате отметки между порт USB00x и порт LPT1
След това отидете на Advanced -> Print Processor -> сложете TEXT от Default datatype и съответните APPLY и OK
Така всяка задача изпратена на LPT1 порт автоматично се прерутира към USB порта защото принтера на LPT1 порта ще бъде винаги извън линия (off-line)
Все пак за да улесня и мрежовиците
Hint: CMD трябва да бъде с делегирани права: Run as Administration
A. START->RUN->CMD ->
net use lpt1:\\името на компютъра(или IP адрес)\името на принтера който преди това си шернал /yes
Пример за командата:
net use lpt1 \\pc-01\hplusb /persistent:yes
net use lpt1 \\192.168.1.111\hpusb /persistent:yes
net use lpt1: \\127.0.0.1\hpusb
Горните команди са при положение, че принтера е със Shared/Споделено име hpusb и че адреса в мрежата е 192.168.1.111 / 127.0.0.1 и името на компютъра в мрежата е pc-01
Сложил съм loopback за всеки случай. Използвайте една от трите команди.
==========================================
Проверка дали печата коректно в следващите 4 стъпки
1. START->RUN->CMD ->
COPY CON LPT1:
[TYPE] - Напишете някакъв текст с желателно кирилица символи и най вече: Й, Я, Ю, Ж и др.
Й, Я, Ю, Ж и др.
CTRL + Z за край
2. START->RUN->CMD ->
COPY CON PRN:
[TYPE] - Напишете някакъв текст с желателно кирилица символи и най вече: Й, Я, Ю, Ж и др.
CTRL + Z за край
3. START->RUN->CMD ->
PRINT FILE.TXT
FILE.TXT да съдържа повече символи за сравнение!
4. START->RUN->CMD ->
COPY /B FILE.PRN LPT1:
FILE.PRN да съдържа повече символи за сравнение!
* /B - бинарен режим защото DOS предполага, че LPT порта ще бъде TEXT ONLY т.е. 7-bit. Повечето .PRN файлове са бинарни - 8-bit, но DOS отрязва последният бит на всеки знак.
Hint: Ако въведете дадената команда в DOS за дадена папка, то тя ще принтира всички *.PDF файлове в дадената папка към съответният принтер особено ако поддържа директно принтиране нa *.PDF (HP Color Laserjet 3800n), както и повечето модерни принтери
COPY /B *.pdf \\127.0.0.1\hpusb
Hint: За да си освободите LPT порта, зает от принтера, изпълнете командата:
net use lpt1 /delete
Hint: За да видитe компютрите в мрежата използвайте, като команда: net view в DOS прозорец.
Информативно за по новаците, на които мишката им е придатък на ръката ги съветвам да заредят с BAT файл MOUSE.COM или GMOUSE.SYS
За кiрилiцаtа ползвам работещо и тествано: BDS.COM на V.Valev
Айде дерзайте и успех!
Как без да използваме VirtualPC поради бавното зареждане и прочие, ами най лесното, за което се сетих беше:
http://dfendreloaded.sourceforge.net/
Та реших да го споделя с Вас и да уточня, че е тествано и сработва, всичко е въпрос на настройки.
Пакета е лесен за работа и е с интегрирана последна версия на прочутият DOSBox Има също така и FreeDOS, а с малко преработка може да зарежда и Norton Comander както и да се работи на разни складови и други програми под DOS с печат към мапнат LPT1 порт на USB принтер Изискването беше и за въвеждане на Кирилица в DOS прозореца
Всичко от което имате нужда е копията на съответните програми както и да ги сложите в папка: VirtualHD (виртуалният DOS диск)
Честно се забавлявах с ползването на команди NC, DIR, ARJ, RAR, CD и др.
Лично аз Ви съветвам да сложите паметта да е 32 MB до максимум 64 MB версия на DOS 6.2
Може да си изтеглите стари DOS игри да се позабавлявате, но лично аз заради задачката се забавлявах с писането на разни BAT скриптчета за да подкарам коректно кирилизация (BDS.COM, CYR.COM)
===========================================
Подкарването на принтера се извършва по следният начин:
1. Правим Sharing/Споделяне на USB принтера на който ще принтираме, аз лично Ви съветвам принтера да е на същата машина на която е и DOS програмата. По мрежа става, но тогава се налага да използвам програми от вида на WIN2MIK и Total Commander и доста писане за да прекодираме в правилната кодова MIC таблица
Hint: Добавяме нов принтер локално независимо какъв и махаме отметката на Auto Detect, като избираме за порт LPT1:, намерете точно "Generic/Text only" принтер, който се намира в производители "Generic"
Печат от RAW в TXT
Айде и още един HINT:
Инсталирате локално USB принтер. След това инсталирате абсолютно същият принтер 2-ри път, но му указвате, че порта е LPT1. След което отивате на настройките за порт на USB принтера и включвате Enable Printer Pooling (не знам как да си го преведа) и слагате отметки между порт USB00x и порт LPT1
След това отидете на Advanced -> Print Processor -> сложете TEXT от Default datatype и съответните APPLY и OK
Така всяка задача изпратена на LPT1 порт автоматично се прерутира към USB порта защото принтера на LPT1 порта ще бъде винаги извън линия (off-line)
Все пак за да улесня и мрежовиците
Hint: CMD трябва да бъде с делегирани права: Run as Administration
A. START->RUN->CMD ->
net use lpt1:\\името на компютъра(или IP адрес)\името на принтера който преди това си шернал /yes
Пример за командата:
net use lpt1 \\pc-01\hplusb /persistent:yes
net use lpt1 \\192.168.1.111\hpusb /persistent:yes
net use lpt1: \\127.0.0.1\hpusb
Горните команди са при положение, че принтера е със Shared/Споделено име hpusb и че адреса в мрежата е 192.168.1.111 / 127.0.0.1 и името на компютъра в мрежата е pc-01
Сложил съм loopback за всеки случай. Използвайте една от трите команди.
==========================================
Проверка дали печата коректно в следващите 4 стъпки
1. START->RUN->CMD ->
COPY CON LPT1:
[TYPE] - Напишете някакъв текст с желателно кирилица символи и най вече: Й, Я, Ю, Ж и др.
Й, Я, Ю, Ж и др.
CTRL + Z за край
2. START->RUN->CMD ->
COPY CON PRN:
[TYPE] - Напишете някакъв текст с желателно кирилица символи и най вече: Й, Я, Ю, Ж и др.
CTRL + Z за край
3. START->RUN->CMD ->
PRINT FILE.TXT
FILE.TXT да съдържа повече символи за сравнение!
4. START->RUN->CMD ->
COPY /B FILE.PRN LPT1:
FILE.PRN да съдържа повече символи за сравнение!
* /B - бинарен режим защото DOS предполага, че LPT порта ще бъде TEXT ONLY т.е. 7-bit. Повечето .PRN файлове са бинарни - 8-bit, но DOS отрязва последният бит на всеки знак.
Hint: Ако въведете дадената команда в DOS за дадена папка, то тя ще принтира всички *.PDF файлове в дадената папка към съответният принтер особено ако поддържа директно принтиране нa *.PDF (HP Color Laserjet 3800n), както и повечето модерни принтери
COPY /B *.pdf \\127.0.0.1\hpusb
Hint: За да си освободите LPT порта, зает от принтера, изпълнете командата:
net use lpt1 /delete
Hint: За да видитe компютрите в мрежата използвайте, като команда: net view в DOS прозорец.
Информативно за по новаците, на които мишката им е придатък на ръката ги съветвам да заредят с BAT файл MOUSE.COM или GMOUSE.SYS
За кiрилiцаtа ползвам работещо и тествано: BDS.COM на V.Valev
Айде дерзайте и успех!
- error_404
- Глобален модератор
- Мнения: 317
- Регистриран на: 22 дек 2012 10:58
Re: Работещ DOS със печат в Windows XP/VISTA/7 x86/x64
Допълнително да добавя:
Информативно в България се ползват под DOS следните кодови таблици:
CP866, CP855, MIC, CP1251
Някои PRN файлове се нуждаят от преконвертиране в правилната кодова таблица за да се отпечатат коректно и в случая използваме: WIN2MIK
Някои принтери се нуждаят от допълнително зареди шрифтове в паметта за да сработят коректните кодови таблици при печат.
За някои HP LaserJet и DeskJet принтери долупосочените команди са ни спасителният пояс
Зареждане на външни шрифтове за HP за коректно принтиране в BAT файл:
hpload /cp pc7.hpf
hpload /cp mx9.hpf
hpload /cp mx10.sfp
hpload /p8 MX10.HPF
hpload /p9 MX10B.HPF
hpload /p12 MX9.HPF
hpload /p13 MX9B.HPF
hpload /p20 PC7.HPF
Landscape:
copy/b linep08n.sfl LPT1:
Portrait:
copy/b linep08n.sfp LPT1:
Премахва шрифтовете от паметта:
hpload /c
За BDS.COM на V.Velev малко HELP с клавишните комбинации:
Ако правилно сме заредили кирилицата под DOS, то би трябвало да видим следният надпис
с Кирилицата е в действие.
ALT+ Десен Shift - БДС/Фонетична
ALT+ Ляв Shift - Кирилица/Латиница
ляв Shift + десен Shift - Standard Font/User Font (User е с Кирилица)
Ctrl + Десен Shift - Standard characters/Graphics characters, това заменя латиницата с някакви знаци.
Ако сте решили да ползвате DOSPRN то не забравяйте коректната MIК.CP кодова таблица
Благодарение на прочутият "ИнжИнер
IN MEMORIAM на Генади Атанасов
2DOSPRN.BAT
Намирането на всички външни файлове и програми оставям на Вас, аз лично всичко съм тествал и да Ви кажа се забавлявах!
От чиста спортна злоба си позволявам да Ви представя и примерен BAT файл за зареждане, който оставям на Вас да си редактирате "по свой образ и подобие"
За да може Windows XP/VISTA/7 да се отпечатва коректно от матричен принтер в текстов режим, то след инсталация на драйвера "Generic / Text Only" да се заменят файловете tty* (tty.dll, ttyres.dll, ttyui.dll) в папка
%windir%\system32\spool\drivers\w32x86\3 - x86
%windir%\system32\spool\drivers\x64\w32x86\3 -x64
(важно е да се отбележи, че това е папката с инсталираните принтери и е възможно цифрата "3" да е всяка друга, просто използвайте търсачката)
Коректни TTY* файлове могат да се извлекат от Windows 2000, (\i386\driver.cab)
Тогава вече имате възможност да определите кодовата таблица да е CP866 предвид, че преди "пачването" е CP1251 в настройките на драйвера "Generic / Text Only".
В старите Windows инсталации имаше възможност за редакция на файл TTY.DAT който съдържаше набор от символи за правилна кодировка при печат, но впоследващите версии на Windows липсва възможност за редакция освен с пренаписването на TTY от SDK на Microsoft
Важен ключ за манипулация на print spooler:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WOW
По подразбиране изчакването е: 15 sec.
Ключ: "LPT_timeout"
Стойност: Примерно "30" или "3" в зависимост от времето, което желаете да пуснете на спулера за печат!
В момента определено подкарах всичко включително през VPN и смея да твърдя сработва.
Информативно в България се ползват под DOS следните кодови таблици:
CP866, CP855, MIC, CP1251
Някои PRN файлове се нуждаят от преконвертиране в правилната кодова таблица за да се отпечатат коректно и в случая използваме: WIN2MIK
Windows (ANSI) <--> MIK ASCII Cyrillic Charset Convertor
(C) 1997, Grigor Gatchev, M.D, Ph.D. No rights reserved.
Някои принтери се нуждаят от допълнително зареди шрифтове в паметта за да сработят коректните кодови таблици при печат.
За някои HP LaserJet и DeskJet принтери долупосочените команди са ни спасителният пояс
Зареждане на външни шрифтове за HP за коректно принтиране в BAT файл:
hpload /cp pc7.hpf
hpload /cp mx9.hpf
hpload /cp mx10.sfp
hpload /p8 MX10.HPF
hpload /p9 MX10B.HPF
hpload /p12 MX9.HPF
hpload /p13 MX9B.HPF
hpload /p20 PC7.HPF
Landscape:
copy/b linep08n.sfl LPT1:
Portrait:
copy/b linep08n.sfp LPT1:
Премахва шрифтовете от паметта:
hpload /c
За BDS.COM на V.Velev малко HELP с клавишните комбинации:
Ако правилно сме заредили кирилицата под DOS, то би трябвало да видим следният надпис
Cyrillic keyboard driver & CGA/EGA/VGA font handler v2.1 (Jun 1995)Натискаме ляв Shift + десен Shift, веднъж и още веднъж, това гарантира, че фонта
Copyright (C) V.Valev Sofia 1987-1995. Tel: (02) 819-700, 8418-304
Supports IBM-PC/XT,IBM-PC/AT,PS/2 computers
Bulgarian version
с Кирилицата е в действие.
ALT+ Десен Shift - БДС/Фонетична
ALT+ Ляв Shift - Кирилица/Латиница
ляв Shift + десен Shift - Standard Font/User Font (User е с Кирилица)
Ctrl + Десен Shift - Standard characters/Graphics characters, това заменя латиницата с някакви знаци.
Ако сте решили да ползвате DOSPRN то не забравяйте коректната MIК.CP кодова таблица
Благодарение на прочутият "ИнжИнер
IN MEMORIAM на Генади Атанасов
2DOSPRN.BAT
@echo off
rem copy textfile to C: and rename to PRNSPL
rem Read DOSPRN Help
IF EXIST C:\PRNSPL GOTO EXIST
copy %1 C:\PRNSPL
EXIT
:EXIST
ECHO File C:\PRNSPL alreadi exist. Break operation
exit
Намирането на всички външни файлове и програми оставям на Вас, аз лично всичко съм тествал и да Ви кажа се забавлявах!
От чиста спортна злоба си позволявам да Ви представя и примерен BAT файл за зареждане, който оставям на Вас да си редактирате "по свой образ и подобие"
:: This BAT file DO the following:Само информативно на който му се занимава:
:: Map a shared printer on LPT
:: Map drive letter X as sahred resource
:: Sets clipper, sets Columns and Lines as in XP
:: Loads BDS Cyrllic Driver 10x to V.Valev
:: Substitutes drive letter T as C:\TEMP for TEMP directory
:: Substitutes drive letter U as C:\DATA for DATA files
:: Substitutes drive letter P as C:\PRNSPL for PRINT Processor
:: Sets LIB to Library path
:: Sets PATH for various programs
:: Delete the OLD archive (arj) files
:: Make new archive with all DBF files inside
:: Call external BAT file for PRINT fix and loading fonts
:: Call external BAT file for MENU
:: Start the Program
:: EOL
:: deep for D-Fend Reloaded DOSBox 0.74
:: 25/05/2010
@echo off
mode con lines=25
mode con cols=80
set clipper=f48
net use LPT1 \\192.168.1.1\LPT /persistent:yes
net use X: \\192.168.1.1\DATA
c:
bds/user/bds
subst T: C:\TEMP
subst U: C:\DATA
subst P: C:\PRNSPL
SET LIB=C:\LIBRARY;C:\LIB;
SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\;C:\UTIL;C:\CLIPPER\BIN;C:\FOX
cls
del C:*.arj
arj a -va C:ARCHIVE *.DBF
call C:\DIR\FIX.BAT
call C:\DIR\MENU.BAT
cd\DIR
PROG
За да може Windows XP/VISTA/7 да се отпечатва коректно от матричен принтер в текстов режим, то след инсталация на драйвера "Generic / Text Only" да се заменят файловете tty* (tty.dll, ttyres.dll, ttyui.dll) в папка
%windir%\system32\spool\drivers\w32x86\3 - x86
%windir%\system32\spool\drivers\x64\w32x86\3 -x64
(важно е да се отбележи, че това е папката с инсталираните принтери и е възможно цифрата "3" да е всяка друга, просто използвайте търсачката)
Коректни TTY* файлове могат да се извлекат от Windows 2000, (\i386\driver.cab)
Тогава вече имате възможност да определите кодовата таблица да е CP866 предвид, че преди "пачването" е CP1251 в настройките на драйвера "Generic / Text Only".
В старите Windows инсталации имаше възможност за редакция на файл TTY.DAT който съдържаше набор от символи за правилна кодировка при печат, но впоследващите версии на Windows липсва възможност за редакция освен с пренаписването на TTY от SDK на Microsoft
Важен ключ за манипулация на print spooler:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WOW
По подразбиране изчакването е: 15 sec.
Ключ: "LPT_timeout"
Стойност: Примерно "30" или "3" в зависимост от времето, което желаете да пуснете на спулера за печат!
В момента определено подкарах всичко включително през VPN и смея да твърдя сработва.
- error_404
- Глобален модератор
- Мнения: 317
- Регистриран на: 22 дек 2012 10:58
Re: Работещ DOS със печат в Windows XP/VISTA/7 x86/x64
D-Fend-Reloaded > Confs > DOSBox DOS.prof
следните редове и добави:
[serial]
serial1=Dummy
serial2=Dummy
serial3=Disabled
serial4=Disabled
lpt1=true
lpt1=enabled
Не съм го пробвал, но предполагам ще стане! Аз лично използвам трика с map-ване на принтера
http://ykhwong.x-y.net/ - Този BUILD на DOSBox има поддръжка на принтери.
Съгласно информацията тук: http://www.dosbox.com/wiki/SVN_Build...ced_SVN_builds
P.S. Гореописаният BUILD на официалният SVN на DOSBox наистина има LPT + меню и което на мен ми допадна самият прозорец на DOSBox има възможност в реално време да му се променят параметрите.
Да живее и пребъде Корейският народ и подобни
Успях да го интегрирам в D-Fend Reloaded Frontend без проблем!
следните редове и добави:
[serial]
serial1=Dummy
serial2=Dummy
serial3=Disabled
serial4=Disabled
lpt1=true
lpt1=enabled
Не съм го пробвал, но предполагам ще стане! Аз лично използвам трика с map-ване на принтера
http://ykhwong.x-y.net/ - Този BUILD на DOSBox има поддръжка на принтери.
Съгласно информацията тук: http://www.dosbox.com/wiki/SVN_Build...ced_SVN_builds
P.S. Гореописаният BUILD на официалният SVN на DOSBox наистина има LPT + меню и което на мен ми допадна самият прозорец на DOSBox има възможност в реално време да му се променят параметрите.
Да живее и пребъде Корейският народ и подобни
Успях да го интегрирам в D-Fend Reloaded Frontend без проблем!
I'm trying to find a way to run an old Dos based application that uses a printer connected to the parallel port, I don't think Dosbox supports lpt.
I am interested both in using that printer and in trying to emulate the printer somehow and connect a USB based printer.
| ||||
migrated from stackoverflow.com Jan 17 '10 at 6:57
This question came from our site for professional and enthusiast programmers.
| ||||
You can use one of the patched/forked versions of DOSBox that support printing. There are a few.
One I've recently started using is Taewoong's enhanced "ykhwong" version (as of writing, it was last updated Oct. 12. 2011):
It allows redirecting LPT1 (through LPT3) to an actual LPT port, a printer file (.prn), or to the virtual printer. The valid options in the Parallel/Dongle dialog are
reallpt , printer , file and disabled .
If you set it up to send to the virtual printer, it can "print" to a graphic file (.PNG, .BMP, .PS), or to a Windows printer on the host (it pops up Windows a print dialog):
|
Ниуя по болгарски не понял, но статья зачётная!
ОтветитьУдалить