I want to insert a piece of text in a PDF which contains bold and not-bold areas, but I do not know how can I do this ?
I'm using iText5 (java).
This is my code:
public class CreatePdf{
private Font bigFont = FontFactory.getFont(FontFactory.HELVETICA, "Windows-1254", 12, Font.BOLD, new Color(0, 0, 0));
private Font smallFont = FontFactory.getFont(FontFactory.HELVETICA, "Windows-1254", 8, Font.NORMAL, new Color(0, 0, 0));
public void create(){
Paragraph parag1=new Paragraph("Number: ",bigFont);//This gonna be bold font
Paragraph parag2=new Paragraph("12", smallFont); //This gonna be normal font
//Create one paragraph from these two paragraphs. But How ?
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With