code: public void reset() {
  		gsStack.removeAllElements();
  		gsStack.add(new GraphicsState());
  		textMatrix = null;
  		textLineMatrix = null;
  		resources = new DictionaryStack();
  	}
docs: Resets the graphics state stack, matrices and resources.