Dynamic line assignment for encrypted doc