code: public void addViewerPreference(PdfName key, PdfObject value) {
  		switch(getIndex(key)) {
  		case 0: // HIDETOOLBAR
  		case 1: // HIDEMENUBAR
  		case 2: // HIDEWINDOWUI
  		case 3: // FITWINDOW
  		case 4: // CENTERWINDOW
  		case 5: // DISPLAYDOCTITLE
  		case 14: // PICKTRAYBYPDFSIZE
  			if (value instanceof PdfBoolean) {
  				viewerPreferences.put(key, value);
  			}
  			break;
  		case 6: // NONFULLSCREENPAGEMODE
  			if (value instanceof PdfName
  					&& isPossibleValue((PdfName)value, NONFULLSCREENPAGEMODE_PREFERENCES)) {
  				viewerPreferences.put(key, value);
  			}
  			break;
  		case 7: // DIRECTION
  			if (value instanceof PdfName
  					&& isPossibleValue((PdfName)value, DIRECTION_PREFERENCES)) {
  				viewerPreferences.put(key, value);
  			}
  			break;
  		case 8:  // VIEWAREA
  		case 9:  // VIEWCLIP
  		case 10: // PRINTAREA
  		case 11: // PRINTCLIP
  			if (value instanceof PdfName
  					&& isPossibleValue((PdfName)value, PAGE_BOUNDARIES)) {
  				viewerPreferences.put(key, value);
  			}
  			break;
  		case 12: // PRINTSCALING
  			if (value instanceof PdfName
  					&& isPossibleValue((PdfName)value, PRINTSCALING_PREFERENCES)) {
  				viewerPreferences.put(key, value);
  			}
  			break;
  		case 13: // DUPLEX
  			if (value instanceof PdfName
  					&& isPossibleValue((PdfName)value, DUPLEX_PREFERENCES)) {
  				viewerPreferences.put(key, value);
  			}
  			break;
  		case 15: // PRINTPAGERANGE
  			if (value instanceof PdfArray) {
  				viewerPreferences.put(key, value);
  			}
  			break;
  		case 16: // NUMCOPIES
  			if (value instanceof PdfNumber)  {
  				viewerPreferences.put(key, value);
  			}
  			break;
  		}
  	}
docs: Sets the viewer preferences for printing.