Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4882305

StreamPrintServ.getSupportedAttributeValues returns null for Orientation attr

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 1.4.0
    • client-libs
    • 2d
    • b131
    • generic
    • generic

      StreamPrintService returns the following attribute categories as supported -
      SheetCollate, Sides, OrientationRequested, PageRanges. When actually querying the supported attribute values for each of this attribute category with respect to the supported DocFlavors, null values are returned for the above attributes when the DocFlavor is not either Pageable or Printable (SERVICE_FORMATTED). When I looked into the source code of PSPrintService, it actually does this checking and returns null accordingly. But I tried using these attributes and printed a print data and it worked perfectly. For Ex: Though Stream PrintService returns null for image/jpeg, OrientationRequested category, I printed a jpeg iamge using StreamPrintService in LANDSCAPE mode and it worked fine. I really wonder why StreamPrintService returns the supported values as null for the above attributes when DocFlavor is not a Service Formatted one.

      I have attached a sample code which simulates the above scenario for OrientationRequested attribute. Supported values are properly returned when using the default print service instead of StreamPrintService.

      This is reproducible right from JDK1.4+, on Solaris as well as Win32 platforms.

            psadhukhan Prasanta Sadhukhan
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: