How can I use regular and bold in a single String?
问题 I have a String that consists of a constant part and a variable part. I want the variable to be formatted using a regular font within the text paragraph, whereas I want the constant part to be bold. This is my code: String cc_cust_name = request.getParameter("CC_CUST_NAME"); document.add(new Paragraph(" NAME " + cc_cust_name, fontsmallbold)); My code for a cell in a table looks like this: cell1 = new PdfPCell(new Phrase("Date of Birth" + cc_cust_dob ,fontsmallbold)); In both cases, the first