calc the block size from document size