When I save a word document to PDF with PDF_A_1_B compliance, the resulting PDF contains a valid document ID.
When I try to save a word document with PDF_15 compliance, or no compliance at all, the resulting PDF document contains no document ID.
This is not very consistent behaviour, it would be nice if the resulting document always contains a Document ID, or at least this can be specified using PdfSaveOptions.
Saving document to pdf without compliance (snippet):
com.aspose.words.Document doc = com.aspose.words.Document("word-with-form-fields.docx");doc.save("tmp.pdf")com.aspose.pdf.Document pdf = com.aspose.pdf.Document("tmp.pdf")com.aspose.pdf.Id documentId = pdf.getId()
Saving document to pdf with compliance (snippet):
com.aspose.words.Document doc = com.aspose.words.Document("word-with-form-fields.docx");com.aspose.words.PdfSaveOptions save_options = com.aspose.words.PdfSaveOptions()save_options.setCompliance(com.aspose.words.PdfCompliance.PDF_A_1_B)doc.save("tmp.pdf", save_options)com.aspose.pdf.Document pdf = com.aspose.pdf.Document("tmp.pdf")com.aspose.pdf.Id documentId = pdf.getId()
I'm using Aspose Words 16.7 and Aspose PDF 11.9