Невозможно перенаправить печать в Zebra на Mac через удаленный рабочий стол

1414
vIceBerg

Позвольте мне объяснить мое обычное размещение. У меня есть клиенты на Windows, у которых есть принтеры Zebra.

Мы устанавливаем локально этот принтер, используя драйверы универсального / текстового принтера.

Они подключаются через удаленный рабочий стол к моему серверу Windows 2008. Мое приложение отправляет необработанный код ZPL II (текст) в драйвер принтера, и все работает.

Теперь у меня есть клиент на MacOSX Yosemite 10.10.3. Он использует приложение Microsoft Remote Desktop для подключения. Я вижу принтер Zebra в списке принтеров. Когда мое приложение печатает в драйвере принтера, спул Mac говорит «Невозможно преобразовать файл PostScript». Это "нормально", так как я отправляю необработанный текст на принтер.

Unable to convert PostScript File

Затем я попытался добавить принтер Raw в MacOS, но он не отображается в удаленном рабочем столе.

Что я должен делать?

0

1 ответ на вопрос

2
Tonny

There is no such thing as a generic text printer on OSX.
OSX internally treats EVERY printer as postscript at the OS level. Then converts the postscript output to whatever language the printer needs (ZPLII in your case).

So the Remote Desktop APP sees a "postscript" printer on OSX and communicates that to your Windows server. (Windows usually sees it as a "MS ImageSetter device" which is a generic Postscript printer.)

Your application ignores that and pushes the RAW ZPLII to the Mac anyway, but the Mac was expecting to receive Postscript and hence your error message when it tries to interpret the Postscript file (which is actually no Postscript, but ZPLII).

This is nasty because you don't really have an easy way around that.

If the customer printer is a network printer (I seem to recall the GXxxxt models have the regular Zebra LAN interface) you may be able to supply the raw ZPL file to the customer and have the customer send it manually to the printer using the good old lpr command. The customer would have to run something like this on a commandline in Terminal:

lpr -H <ip-address printer> -P PORT1LF -l <filename of ZPL-file> 

Please note: -H and -P are case-sensitve !! "-l" is a lowercase L.
-H (hostname) specifies the ip-address of the printer, -P the queue-name, -l means "file is already formatted, don't touch the content".

Please note (2): PORT1LF is the normal queue-name used internally by Zebra LAN-interfaces. If the Zebra doesn't use a Zebra LAN interface but another brand you usually need to use "auto" or "text" for the -P parameter. Consult the manual.

EDIT added after some research
On OSX you can create a so-called "RAW" print-queue by using the commandline lpadmin tool or by using the CUPS webinterface at http://localhost:631.
However such RAW printers do not show up as regular printers in OSX, because OSX GUI applications absolutely need a printer to be Postscript. For non-Postscript printers CUPS provides a Postscript converter that translates the Postscript to something the non-Postscript printer understands.
For a RAW printer this conversion to Postscript can't be done, so RAW printers are not offered to OSX GUI applications as valid print-devices. (They can be used with the command-line print-tools like lpq, lpr, etc.)
And that is why NO RDP client on OSX forwards them! They just forward regular printers.
(Technically there is no reason why the RDP client couldn't present a RAW printer (using old-school unix lpr/lpq handling) over RDP as a "Generic/Text Only" printer to Windows. But it would require extra programming to make this happen. And given that this particular usage is a very small niche I won't see this happen anytime soon.)

Your only workaround, as far as I can tell, is the one I already mentioned. Supply the file to the user and have him print it locally using lpr.
The printer is USB attached, but that is no problem. Using the CUPS web-interface you can set up a USB printer as a raw print-queue. Part of this web-page Add raw print-queue, you only need steps 3 to 7 explains how to do that. It even uses a Zebra as example.

Мой клиент на самом деле использует порт USB ... Я не видел его, поэтому я не могу сказать, есть ли интерфейс локальной сети. Если он использует порт USB, какие параметры я должен использовать для печати файла? vIceBerg 9 лет назад 0
И нет общего текста, но есть RAW принтеры ... Я ничего не могу с этим поделать? vIceBerg 9 лет назад 0
@vIceBerg USB подключен ... Я не знаю, можете ли вы отправить файл напрямую на принтер таким способом. Я никогда не использовал USB-принтер на Mac. Я нашел Учебное пособие по коду Google [ссылка] (https://code.google.com/p/jzebra/wiki/TutorialRawOSX), в котором описано, как настроить принтер RAW с помощью CUPS в OSX. Это может просто подойти для вашего варианта использования. Я сейчас в офисе. Когда я вернусь домой сегодня вечером, я смогу проверить это сам и обновить свой ответ, если это даст решение. Tonny 9 лет назад 0
Проблема с драйвером RaW заключается в том, что удаленный рабочий стол их не распознает. По крайней мере, я не нашел как. vIceBerg 9 лет назад 0
@vIceBerg Вопрос о вашей настройке. Вы не упоминаете, находятся ли ваши клиенты в одной локальной сети или подключены к VPN. Последнее кажется более логичным чтением между строк. Это имеет значение для возможных решений. Tonny 9 лет назад 0
Они не находятся в одной локальной сети. Каждый из них использует свое собственное подключение к Интернету для подключения к нашим серверам RDC. В нашей настройке нет VPN vIceBerg 9 лет назад 0
@vIceBerg Вы говорите, что служба RDP напрямую подключена к Интернету? С точки зрения безопасности это не разумно ... Но в любом случае, это ограничивает варианты решения. Я вернусь домой через 2-3 часа. Посмотрим, смогу ли я найти способ сделать это с помощью приложения Microsoft RDP на OSX. Tonny 9 лет назад 0
Наше программное обеспечение предлагается в режиме «локальной установки» и «облачной установки». Это программа для Windows, поэтому у нас установлен сервер Windows 2008 на Amazon с лицензированием удаленного рабочего стола. Не волнуйтесь, мы следовали некоторым рекомендациям, чтобы избежать проблем безопасности сообщества. Я знаю, что это не идеально, но мы не делаем конфиденциальные операции и не храним конфиденциальную информацию. vIceBerg 9 лет назад 0
Баунти вознагражден ... vIceBerg 9 лет назад 0