2

How is this vendor Id gonna use when creating a cloudJobTicket & sending the print job to cloud? what can it do?

link -> https://developers.google.com/cloud-print/docs/cdd#cjt

SaravanaRaja
  • 3,228
  • 2
  • 21
  • 29

1 Answers1

1
  1. vendor_id

vendor_id is an attribute that appears in some CDD as well as CJT items (color, media size, dpi, etc). Generally, it holds an internal ID that the printer uses to disambiguate same values that need to have different behaviour on the printer.

For example, a printer may support 1 resolution (300dpi) but 3 quality settings (draft, normal, best). Since there's no quality setting either on CDD or CJT, their CDD could look like:

{
    "version": "1.0",
    "print": {
        "dpi": {
            "option": [
                {
                    "horizontal_dpi": 300,
                    "vertical_dpi": 300,
                    "vendor_id": "draft300dpi"
                    "custom_display_name": "300dpi - DRAFT"
                },
                {
                    "horizontal_dpi": 300,
                    "vertical_dpi": 300,
                    "is_default": true,
                    "vendor_id": "normal300dpi"
                    "custom_display_name": "300dpi - NORMAL"
                },
                {
                    "horizontal_dpi": 300,
                    "vertical_dpi": 300,
                    "vendor_id": "best300dpi"
                    "custom_display_name": "300dpi - BEST"
                }
            ]
        },
        (...)
    }
}

If in you set the first option for the CJT, it will look like:

{
    "version": "1.0",
    "print": {
        "dpi": {
            "horizontal_dpi": 300,
            "vertical_dpi": 300,
            "vendor_id": "normal300dpi"
        }
    }
}

If you don't set up vendor_id in your CJT, printer will not be able to disambiguate between its internal options, and may not decide what you really selected.

vendor_id is always optional for a printer to provide it in the CDD. As a consequence, it is also optional for a client to provide it in the CJT (check in the documentation, it is always preceded by the optional keyword). My recommendation is that you forward the same value the printer is providing to you for the setting you select in your CJT, in case it provides something.

  1. VendorTicketItem

On the other hand, then there is the VendorTicketItem, which can be used by a printer to expose additional capabilities that are not covered by the items that the specification provides. Printers can use it to advertise these additional features in their CDD, and clients can set them in the CJT.

nhoxbypass
  • 9,695
  • 11
  • 48
  • 71
jmrodrigg
  • 600
  • 6
  • 24