fix to avoid splitting code boxes across pages in pdf