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)