Skip to content

Send a Local File to PLOSSYS 4


Hint - built-in script

The following steps are an example of how to send a local file to PLOSSYS 4. There is also the print-docs built-in script available which outputs a local file via PLOSSYS 4, refer to Call SEAL OP-CLI Built-In Scripts.


With the following steps, you send a local file to PLOSSYS 4 via SEAL Operator:

  1. Create a document (named p4_docfor example):

    opcli document create p4_doc --service-id operator-fileupload
    

    The document is created and information about the document (among others, its document ID id) is output to STDOUT:

    {
      "name": "p4_doc",
      "type": "document",
      "metadata": {
        "lastModified": 1583504006991
      },
      "id": "1bb20a95-f81a-4029-8c1a-5168b9572bdc",
      ...
    }
    
  2. Upload the local file, here C:\Users\Demo\test.pdf, to the document created above:

    opcli document upload-file <id> C:\Users\Demo\test.pdf --service-id operator-fileupload
    
  3. Create a task (named print-to-p4 for example) for the operator-p4 connector:

    opcli task create print-to-p4 --service-id operator-p4
    

    The task is created and information about the task (among others, its task ID tid) is output to STDOUT:

    {
      "name": "print-to-p4",
      "tid": "423e242d-d9fc-4556-8be9-3c7c71ec39fe",
      ...
    }
    
  4. Specify the output settings as metadata, for example in a file, here metadata.json:

    opcli task replace-meta --file C:\Users\Demo\metadata.json <tid> --service-id operator-p4
    

    Example - metadata in a file

    {
      "Printer": "test_printer",
      "Duplex": "undefined",
      "Quality": "undefined",
      "Color": "undefined",
      "Format": "undefined",
      "PLS_FOLD_TYPE": "undefined",
      "PLS_PUNCH_TYPE": "undefined",
      "PLS_SORT_TYPE": "undefined",
      "PLS_STAPLE_TYPE": "undefined",
      "PLS_SCALE_TYPE": "undefined",
    }
    
  5. Add a task item to the task created above and refer the document created above:

    opcli task-item create --href <id> <tid> --service-id operator-p4
    
  6. Start the task:

    opcli task command --start <tid> --service-id operator-p4
    

Hint - more commands and options

For more information about the available commands and options, refer to the specific chapters in Use Cases.


Back to top