I want to rename font using itextsharp I have Managed to rename the font in the pdf using the following code
PdfName baseFont = dict.GetAsName(PdfName.BASEFONT);
if (baseFont.GetBytes()[7] == '+')
{
string rename = baseFont.ToString().Substring(8);
string temp = baseFont.ToString().Replace(rename, "Changed" + cnt).Replace("/", "");
baseFont = new PdfName(temp);
dict.Put(PdfName.BASEFONT, baseFont);
cnt++;
}
PdfDictionary fontDescriptor = dict.GetAsDict(PdfName.FONTDESCRIPTOR);
PdfDictionary Encoding = dict.GetAsDict(PdfName.ENCODING);
if (fontDescriptor == null)
return;
fontDescriptor.Put(PdfName.FONTNAME, baseFont);
by using the above code i am able to change the font name in acrobat document property.
but old name is visible when i select the text using edit text and image using acrobat 10