Partial XML field data as bold in generated PDF

We are merging data from XML to word doc merge fields using aspose and showing the generated PDF in UI. As part of this implementation, need to show partial portion of one of the XML element as bold in PDF. Please let me know if these Is way to do it. Just for FYI, this partial field is conditional and using inside the foreach loop, so cannot do that edit in aspose word doc itself. We are using Java API to do this implementation.pdf.pdf (6.2 KB) (30.1 KB)


Thanks for your inquiry. We will appreciate it if you please share following resources. You may ZIP the documents and attach to the post. We will look into these and will guide you accordingly.

  • Your input Word document
  • Your output document
  • Your expected output document
  • Please share your working sample code (source code without compilation errors)

Hi Ahmad,

Thank you for the reply. I am still in the process of POC, so donot have any code to share with you. Can you please look at the attached docs please. Just for FYI, we are going to load paragraphs from database and adding the bold text in java code. Please let me know you suggestions. And expecting to do the changes in java code to make the text bold (Because that bold text is partial and added inside java code only).

Thank you,


Thanks for your feedback. You may save your mail merge output as DOCX, find and bold required text and save resultant document to PDF. Please check following documentation link it will help you to find and bold the text.

How to Find and Highlight Text

Sounds good. Thank you for the reply Tilal.