You can generate a custom ID (badically random numbers and letters) and use it in a field in the document and at the same time in the document ID. Another approach is creating the document, getting the latest document you've created and getting from there the ID