public void reset(){
  gsStack.removeAllElements();
  gsStack.push(new ParserGraphicsState());
  textMatrix=null;
  textLineMatrix=null;
  resourcesStack=new Stack<>();
  isClip=false;
  currentPath=new Path();
}

public void reset ( ) { gsStack . removeAllElements ( ) ; gsStack . push ( new ParserGraphicsState ( ) ) ; textMatrix = null ; textLineMatrix = null ; resourcesStack = new Stack < > ( ) ; isClip = false ; currentPath = new Path ( ) ; }
resets the graphics state stack , matrices and resources .
