API version 4

- ‐

ExtractInfo

文書情報を取得した際に発生します。



使用例 CRSダウンロード ダウンロード(00000001.pss) ダウンロード(00000002.pss)

Form formPrintableDocument {
   x = 0; y = 0; width = 800; height = 600;

   PrintStreamDocument pssDoc {
           function onExtractInfo(e) {
                   print("PrintStreamDocument.onExtractInfo, status=", status);
                   print("paperSize=", paperSize);
                   print("orientation=", orientation);
                   print("width=", width);
                   print("height=", height);
                   print("marginLeft=", marginLeft);
                   print("marginTop=", marginTop);
                   print("pageCount=", pageCount);
           }
           function onExtractPage(e) {
                   print("PrintStreamDocument.onExtractPage page=", e.page, ", status=", status);
                   print("pageCount=", pageCount);
           }
           function onExtractFinished(e) {
                   print("PrintStreamDocument.onExtractFinished, status=", status);
                   print("pageCount=", pageCount);
           }
           function onExtractFailed(e) {
                   print("PrintStreamDocument.onExtractFailed, status=", status);
           }
   }

   PrintPreview preview {
           x = 8; y = 40; width = 784; height = 552;
   }

   TextBox textUrl {
           x = 8; y = 8; width = 448; height = 24;
           value = "./";
   }

   Button buttonGet {
           x = 464; y = 8; width = 160; height = 24;
           title = "PrintStreamDocument.get";
           function onTouch(e) {
                   ^.preview.clearPages();
                   ^.preview.document = ^.pssDoc;
                   var retryCount = 3;
                   var waitTime = 4.0;
                   var waitScale = 2.0;
                   ^.pssDoc.get(^.textUrl.value, retryCount, waitTime, waitScale);
           }
   }

   Button buttonLoad {
           x = 632; y = 8; width = 160; height = 24;
           title = "PrintableDocument.load";
           function onTouch(e) {
                   var doc = PrintableDocument.load(^.textbox2.value);
                   if (doc) {
                           ^.preview.clearPages();
                           ^.preview.document = doc;
                   }
           }
   }

}