phin1x / go-ipp

Pure Go IPP library
Apache License 2.0
138 stars 35 forks source link

Setting collections attributes? #38

Open ragequitninja opened 1 year ago

ragequitninja commented 1 year ago

Thank you for making this library, it has helped so far a lot however I have a question regarding nesting/collections. For example, below is a config file used for testing in IPP tool where in the collection for media-col I would set the paper size dimensions. How is this achieved using this tool?

{
    VERSION 2.0
    OPERATION Print-Job

    GROUP operation-attributes-tag
    ATTR charset attributes-charset utf-8
    ATTR language attributes-natural-language en
    ATTR mimeMediaType document-format application/pdf
    ATTR uri printer-uri $uri
    ATTR enum orientation-requested 4

    GROUP job-attributes-tag
    ATTR keyword print-scaling none
    ATTR collection media-col {
        MEMBER keyword media-source "by-pass-tray"
        MEMBER collection media-size {
            MEMBER integer x-dimension 13510
            MEMBER integer y-dimension 14800
        }
    }

    FILE $filename
}
phin1x commented 1 year ago

Hi, nested attributes are not supported at the moment. i keep this issue open as kind of feature request.