# Resolving Apostrophe Character Being Replaced with Copyright Symbol in Filled PDF AcroForm

<style>
img[alt$="><"] {
  border: 1px solid lightgrey;
}

</style>

Correct substituted apostrophe characters in filled PDF form fields by updating their font.

## Environment

| Version    | Product          | Author                                                                          |
| ---------- | ---------------- | ------------------------------------------------------------------------------- |
| 2025.2.520 | RadPdfProcessing | [Desislava Yordanova](https://www.telerik.com/blogs/author/desislava-yordanova) |

## Description

Learn how to address the issue where a special symbol (for example, apostrophe character) is replaced by a copyright (or other) symbol in a filled PDF AcroForm using RadPdfProcessing. When the form is opened for editing in a viewer (like Adobe Acrobat), the character appears correctly as an apostrophe in the editor itself.

View the animation comparing the apostrophe in editing mode with the substituted symbol in the filled form:

![Animation comparing an apostrophe in a PDF AcroForm field during editing with its substituted copyright symbol in the filled form](https://www.telerik.com/document-processing-libraries/documentation/assets/69b9af53127bd5c0985bb54b1595adf6/apostrophe-character-replaced-copyright-symbol-acroform.gif).

> note This behavior can occur with other symbols as well, not only with the apostrophe character. Usually, such behavior may occur with XFA forms. However, starting with PDF 2.0 (ISO 32000-2), XFA forms are deprecated.

## Solution

This issue is likely caused by the font encoding used in the [AcroForm](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/model/interactive-forms/acroform) fields. If the font does not properly support the character encoding for the apostrophe or is not embedded or referenced correctly, such substitution may occur.

To resolve this issue, set the font of the AcroForm fields to one of the [14 standard PDF fonts](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/concepts/fonts), such as Helvetica, Times, or Courier. These fonts have broad character support and do not require embedding.

### Steps

1. Iterate through all form fields in `RadFixedDocument.AcroForm.FormFields`.
2. Check if the field type is [TextBox](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/model/interactive-forms/form-fields/textboxfield) or [CombTextBox](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/model/interactive-forms/form-fields/combtextboxfield).
3. Set the widget font and text properties font to `FontsRepository.HelveticaBold`.

### Code Implementation

Use the following code snippet to update the font for all text fields in the PDF document:

```csharp
foreach (FormField field in document.AcroForm.FormFields)
{
    if (field.FieldType == FormFieldType.TextBox || field.FieldType == FormFieldType.CombTextBox)
    {
        TextField textBox = (TextField)field;
        
        // Set the font for the text field widgets
        textBox.Widgets.First().TextProperties.Font = FontsRepository.HelveticaBold;
        
        // Set the font for the text field text properties
        textBox.TextProperties.Font = FontsRepository.HelveticaBold;
    }
}
```

After applying the code, the apostrophe character renders correctly in the filled PDF.

## See Also

* [Fonts in RadPdfProcessing](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/concepts/fonts)
* [RadPdfProcessing Overview](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/overview)
* [Working with AcroForm Fields](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/model/interactive-forms/acroform)
