Pyroelectric properties of finite size ferroelectric thin films with structural transition zones