for(int j=1; j<=totalPages; j++){
Object rawTransition = transitionsMap.get(new Integer(j));
if(rawTransition != null){
Transition transition = (Transition) rawTransition;
pdfStamper.setDuration(transition.getDuration(), transition.getPageNumber());
pdfStamper.setTransition(new PdfTransition(getITextTransition(transition.getTransition()),transition.getTransitionDuration()), transition.getPageNumber());
}else{
pdfStamper.setDuration(transitions.getDefaultTransition().getDuration(), j);
pdfStamper.setTransition(new PdfTransition(getITextTransition(transitions.getDefaultTransition().getTransition()),transitions.getDefaultTransition().getTransitionDuration()), j);
}
setPercentageOfWorkDone(((j)*WorkDoneDataModel.MAX_PERGENTAGE)/totalPages);
}
}