問題タブ [ppapi]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
828 参照

google-chrome - Accessing printers installed and printing raw data to label printer using Google Native client

Our web application has a flow where in the on click of print button on a page, raw data from the server is printed on the client's machine on a user selected printer (Zebra label printer). Following sequence of interactions are involved between the browser and the server:
1)User clicks on print on a page
2)Server sends back an applet
3)This applet makes url connection to the server to retrieve the print data
4)The applet then looks up the list of printers installed on the client's machine and shows the printer selection dialog. All the printer lookup is done using javax.print
5)Once the user selects the label printer, the applet creates a print job and sends it to the selected printer. The label gets printed

Now since google has removed NPAPI from chrome, we were looking at what alternatives do we have to get the same functionality on chrome and specifically on windows. Initially going though Google native client docs, we thought that we could realize the above use case using PNACL. Following code is from MSDN which is routine for printing raw data to the default printer using winspool.h

BOOL RawDataToPrinter(LPBYTE lpData, DWORD dwCount) {

Initially we thought that we would be able to call the above routine from a pepper plugin. The javascript on page would retreive the label data and pass it to the native client instance, and this would call the RawDataToPrinter(..) routine.
However from what we understood from the forums out here is that Native client won't be able to access/lookup the printers and spool the raw data to the selected printer.it wont allow you to call anything outside the api ports that they provide
Is this understanding correct? If yes then is there any alternative to realize the above mentioned use case on chrome? if no and the above is possible, are there any available ports which allow access to printers installed on client's machine and allow us to print the data to the selected printer?

0 投票する
2 に答える
244 参照

google-chrome - 実行された .pexe ファイルからの出力/結果の抽出

私の目標は、後でリモート コンピューターで実行するために、C++ プログラムを .pexe ファイルに変換することです。.pexe ファイルには、リモート コンピューターで計算されるいくつかの数式または関数が含まれているため、基本的にはリモート コンピューターの計算能力を使用します。このすべてのために、私は Pepper ライブラリで nacl_sdk を使用します。

  1. リモート コンピューターで実行された .pexe ファイルの出力をファイルに保存することは可能ですか? どのファイル形式がサポートされていますか?
  2. リモート コンピューターで実行された .pexe ファイルの出力を自動的にホスト コンピューターに送信することは可能ですか?
  3. リモート コンピューターで動作させるには、何かをインストールする必要がありますか?

任意の提案をいただければ幸いです。

0 投票する
1 に答える
129 参照

c++ - PNaCl を使用する名前空間 'pp' に 'VarDictionary' という名前の型がありません

なぜコンパイルエラーが発生するのか誰か説明してもらえますか

関数に辞書を設定しようとしています

この Google ページの下部から例をコピーしましたhttps://developer.chrome.com/native-client/devguide/coding/message-system

そして、このような簡単なことを試しました

しかし、コードをコンパイルすると、エラーメッセージが表示されますが、pp::VarDictionary dictionary;問題はありませんpp::VarArray an_array;

Google のこの Makefile を使用しています

0 投票する
0 に答える
126 参照

windows - Pepper API で Vulkan を使用できますか

私はここを読みました: Calling Windows API from Native Client/Pepper Plugin

で chrome を起動すると--no-sandbox、windows api を呼び出すことができます。だから私の質問は、フラグを使用すると--no-sandbox、自分のコンピューターでのみ実行されるペッパープラグインを開発できますVulkanか?

0 投票する
1 に答える
1808 参照

c++ - C++ コード (ネイティブ クライアント) をブラウザー (Web アプリ) に移植する

Qt-creator SDK を使用して記述された C++ モジュールがあります。このコードを移植して、ソース コードをエンド ユーザーに提供することなく、任意の Web ページで実行できるようにしたいと考えています。ユーザーは、追加のブラウザー プラグインをインストールしなくても、任意のブラウザー (Chrome、Firefox、Safari、Explorer) でこのモジュールの出力を表示できる必要があります。これを達成するために利用できるより良いオプションは何ですか。私はググって、そのようなオプションをいくつか見つけました:

  1. Google ネイティブ クライアント (NaCl) - ただし、Chrome でのみ実行されます。これが Web アプリケーションの未来ですか??
  2. PPAPI - NaCl と同じかどうかは不明
  3. NPAPI - ほぼ非推奨
  4. Emscripten - c++ を js に変換します. したがって、ソースコードはユーザーに表示されます。
  5. WebAssembly

私が探しているものを達成するための他のオプションはありますか? そうでない場合は、上記のオプションからどれを選択する必要がありますか!? よろしくお願いします。a