0 Replies Latest reply on Feb 11, 2013 5:07 PM by 811100

    Error printing envelope

      I've been having an issue printing an envelope using PrintRequestAttributeSet and was curious if anyone else has had an issue related to this. My printing works fine when printing envelopes on all other printers except for one. The printer having an issue is a Xerox WC 7556. For some reason when I try to print using a MediaSize of NA_NUMBER_10_ENVELOPE the printer gives an error that says "The Job was deleted due to a Paper Type and/or Paper Size selection within the job that cannot be printed face up.". The strange thing is that it doesn't work when the defaults are set using Java, but if the user selects Tray 1 manually through the print dialog it works just fine. Here is the basic code that I'm using.
      PrintRequestAttributeSet requestAttributes = new HashPrintRequestAttributeSet();
      MediaSize mediaSize = MediaSize.getMediaSizeForName(MediaSizeName.NA_NUMBER_10_ENVELOPE);
      float mediaHeight = mediaSize.getX(MediaSize.INCH);
      float mediaWidth = mediaSize.getY(MediaSize.INCH);
      float leftMargin = .25f;
      float topMargin = .25f;
      float printableWidth = mediaWidth - (leftMargin + leftMargin);
      float printableHeight = mediaHeight - (topMargin + topMargin);
      requestAttributes.add(new MediaPrintableArea(leftMargin, topMargin, printableHeight, printableWidth, MediaPrintableArea.INCH));
      The only thing that really comes to mind is that Xerox No. 10 envelope is 4.1 x 9.5 and the defined envelope in Java is 4.125 x 9.5. Has anyone encountered something like this before?