トップ 一覧 検索 ヘルプ RSS ログイン

印刷イベントをサーバへ通知の変更点

  • 追加された行はこのように表示されます。
  • 削除された行はこのように表示されます。
!!!概要
印刷の各種タイミングでサーバに通知します。
<event>要素を使って実現できます。

!!!印刷許可の判定
<event type="printstart" report="URL"> の部分で、 reportにサーバのurlを指定している場合、サーバのURLからok(改行無しの半角英字)の文字列が帰ってきた場合に印刷できます。reportでURLを指定した場合は必ずokの文字を返してください。ok以外の文字を返した場合は印刷せずにサーバから帰ってきた文字列を画面に表示します。

!!!サンプル

[イベント通知の基本|/samples/autoprint/frame_top.xpxd]

 <?xml version="1.0" encoding="shift-jis"?>
 <pxd paper-type="A4" auto-print="true">
 <event type="printcancel" report="event/printcancel.php" to="_BACK"  frame="_top" />
 <event type="printstart" report="event/printstart.php"/>
 <event type="printend" report="event/printend.php" to="/" frame="_top" />
 <event type="open" report="event/open.php"/>
 <event type="close" report="event/close.php"/> 
 <page>
   <svg width="21cm" height="29.7cm" viewBox="0 0 2100 2970">
     <text x="200" y="500" font-size="200" >サンプル!</text>
     <line stroke-width="1" x1="200" y1="500" x2="1200" y2="500"/>
   </svg>
 </page>
 </pxd>