Convert Word to PDF and Add Text Stamp in PDF using Java

Have a word document which is converted to pdf.
Uses java for programming.
Get a trouble with add text on the top of word:
image.png (31.8 KB)

            TextFragment textFragment = new TextFragment("Сведения о сертификате ЭП");
            textFragment.getTextState().setFontSize(timesNewRomanFontSize);
            textFragment.getTextState().setFont(FontRepository.findFont(timesNewRomanFont));
            textFragment.getTextState().setFontStyle(FontStyles.Bold);
            textFragment.getTextState().setForegroundColor(com.aspose.pdf.Color.getRed());

            TextParagraph paragraph = new TextParagraph();
            paragraph.appendLine(textFragment);
            paragraph.setPosition(new Position(originX + 100, originY + 50));
            textBuilder.appendParagraph(paragraph);

if you have any advice on how to do it adequately through the code, I would be grateful to you! Thank you very much for your work guys!

P.S. in .doc that piece look like this:
image.png (11.7 KB)

Problem was solved, setBackground(false) was in code when image coverted from .dco to .pdf, set it to true and all works fine. THANKS FOR HELP!

@finfan

It is good to hear that your issue has been resolved. Please keep using our API and feel free to create a new topic in case you need further assistance.