隨筆 - 0, 文章 - 2, 評論 - 1, 引用 - 0
          數據加載中……

          對JavaPrintService API的一個誤解

          使用JavaPrintService API打印HTML文檔失敗,原來是因為對JPS的誤解。雖然JPS中提供了DocFlavor.INPUT_STREAM.TEXT_HTML_HOST類型的DocFlavor,但根本沒有提供具體的實現HTML打印的功能。

          This is "not a bug". It is user misunderstanding of the API.

          Note that contrary to the indication of the submitter there is
          documentation on this API.

          See http://java.sun.com/j2se/1.4/docs/guide/jps/index.html

          We have already documented explanation of this aspect of the API in
          the user guide and in javadoc specification for the DocFlavor class.

          Eg in the user guide it says
          "..Before printing a document of a particular format, the client needs to ensure
          that the printer can understand the format..."

          The API allows you to ask to find all print services that print a particular
          document type. A document type is little more than a mime string.
          The only point in being able to ask the question is if there's more than
          one possible answer. If all print services could print all document types
          there'd be no need for such a query.

          You can ask for almost anything. For example I could ask for a PrintService
          that prints RTF or TIFF or anything. But for a print service to be able to
          do that requires a whole lot of code somewhere that understands that format.

          In merlin (1.4) there's no code anywhere in the printing implementation
          that can handle any HTML in any form at all.
          So when you ask for services that handle this, the answer is there are none.

          The only way this is going to work is with some additional software.
          A third party could write this and plug it in, (read the API docs for more
          background in what's involved there) but that's a large chunk of
          work and unlikely to be available any time soon.

          posted on 2005-03-10 11:17 笨蛋糕 閱讀(356) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 沿河| 滁州市| 丹巴县| 龙陵县| 綦江县| 洛浦县| 永川市| 西盟| 洛宁县| 江华| 淮南市| 汉源县| 顺义区| 海安县| 中山市| 金秀| 博客| 双辽市| 蚌埠市| 海安县| 晋城| 崇礼县| 太原市| 柏乡县| 宿州市| 平乡县| 阳江市| 福安市| 道真| 上杭县| 和田市| 舒城县| 岐山县| 常山县| 大姚县| 抚松县| 商水县| 蒙自县| 淳安县| 麻城市| 如皋市|