toDynamicDocument