質問

ActiveXコントロールを使用してWindows環境でサーマルラベルプリンター(配送ラベルに固有)に印刷できるWebベースのアプリケーションを構築していますが、OSXに最適な方法を把握するために脳を悩ませています。明らかにActivexはMacで動作しません...

どこで探し始めるかについてのアイデアはありますか?フラッシュムービー? Firefoxアドオン?私の指はグーグルにうんざりしています。

役に立ちましたか?

解決

There's no way a vanilla web language will allow you to control peripherals from a webpage under Mac OS.

If you really really need to call that from a webpage and can't afford to make a real application, your best go under Safari would be to build a plugin to use Objective-C from Javascript, and do the heavy-duty work from within your plugin. A similar solution probably exists in Firefox.

Also, as I understand it, your program runs on the client with the printer attached. You could write a server-side script and install it on the Macs, and then have your webpage drive it to do the printing.

他のヒント

My first choice to solve this problem quickly would be to use an enterprise label print server like Loftware or Bartender. But, like you said, they are expensive and you are planning on reselling your product.

My second choice would be to scrap the activex control and build a simple print server. There is no standard control language in the label printer world but if you are going to standardize on a certain class of Zebra printer you would only need to implement one driver at first. I have only ever done this for Datamax printers but I'm sure the process for Zebra printers is similar.

The server takes your label data as input (pallet ID, ship to address, etc), inserts that data into a template (painstakingly crafted in the text based printer control language) and then this label file is sent to the appropriate printer.

My third choice would be the browser based solution you are looking for. IT departments hate that stuff.

You can create an NPAPI plug-in, which will work in Safari, Firefox and other Mac web browsers. You'll need to have the user install the plug-in on their system before it can be used, there's no way to install it automatically.

Can't you just use the JavaScript printing API?

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top