Hi Team,
Could you please help to check that symbol is coming in next line in pdf. When you will come the pdf and word file you will see the difference.
I have attached screenshot and files for reference.
Code snippet to convert word into pdf:
Document document = new Document(wordFile.getAbsolutePath());
document.save(outputPdfFilePath);
String rightsWatchMark = document.getCustomDocumentProperties().get("RightsWATCHMark").toString();
String encodedRightsWatchMark = Base64.getEncoder().encodeToString(rightsWatchMark.getBytes());
com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document(outputPdfFilePath);
DocumentInfo documentProperty = pdfDocument.getInfo();
documentProperty.set_Item("RightsWATCHMark", encodedRightsWatchMark);
pdfDocument.save();
Please find the attachment
sample_issue_23_06_2025.zip (1.0 MB)