public boolean displayText(AcrFont font, int style, int line, int position, byte[] message) throws AcrReaderException { if(line < 0) { throw new IllegalArgumentException("Expected non-negative line index"); } if(position < 0) { throw new IllegalArgumentException("Expected non-negative position index"); } if(line >= font.getLines()) { throw new IllegalArgumentException("Font " + font + " supports " + font.getLines() + " lines"); } if(position + message.length > font.getLineLength()) { throw new IllegalArgumentException("Font " + font + " supports " + font.getLineLength() + " chars per line"); } if(style != Typeface.BOLD && style != Typeface.NORMAL) { throw new IllegalArgumentException("Only font styles " + Typeface.NORMAL +" and " + Typeface.BOLD + " supported"); } byte[] response; try { response = readerControl.displayText(font.getId(), style == Typeface.BOLD, line, position, message); } catch (RemoteException e) { throw new AcrReaderException(e); } return readBoolean(response); }
public boolean displayText(AcrFont font, int style, int line, int position, String message) throws AcrReaderException { return displayText(font, style, line, position, font.mapString(message)); }
public boolean displayText(AcrFont font, int style, int line, int position, byte[] message) throws AcrReaderException { if(line < 0) { throw new IllegalArgumentException("Expected non-negative line index"); } if(position < 0) { throw new IllegalArgumentException("Expected non-negative position index"); } if(line >= font.getLines()) { throw new IllegalArgumentException("Font " + font + " supports " + font.getLines() + " lines"); } if(position + message.length > font.getLineLength()) { throw new IllegalArgumentException("Font " + font + " supports " + font.getLineLength() + " chars per line"); } if(style != Typeface.BOLD && style != Typeface.NORMAL) { throw new IllegalArgumentException("Only font styles " + Typeface.NORMAL +" and " + Typeface.BOLD + " supported"); } byte[] response; try { response = readerControl.displayText(font.getId(), style == Typeface.BOLD, line, position, message); } catch (RemoteException e) { throw new AcrReaderException(e); } return readBoolean(response); }
public boolean displayText(AcrFont font, int style, int line, int position, String message) throws AcrReaderException { return displayText(font, style, line, position, font.mapString(message)); }