Saving a loaded RTF document destroys the font formatting for form fields

The following procedure results in the error:

  1. Loading an RTF document with form fields.
  2. Saving the document as RTF.
  3. Reloading the document.
  4. Saving it as a PDF document with the “PreserveFormFields” option enabled.
var saveOptions = new PdfSaveOptions { PreserveFormFields = true };

Document document = new("form.rtf");
document.Save("success.pdf", saveOptions);

document.Save("form_copy.rtf");
document = new Document("form_copy.rtf");
document.Save("fail.pdf", saveOptions);

fail.pdf (16.4 KB)
success.pdf (16.4 KB)

The error results in the text losing its correct font and size. As a consequence, the text no longer fits within the form field in the PDF document, leading to incomplete display.

@kvaak Could you please attach your input RTF document here for testing? We will check the issue and provide you more information.

1 Like

The file is located within a ZIP archive because the “rtf” file extension is not allowed for uploading.
form.zip (8.7 KB)

@kvaak
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-25806

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as WORDSNET-25806) have been fixed in this Aspose.Words for .NET 23.9 update also available on NuGet.