In Development
Last Updated: 14 Aug 2025 14:11 by Dan
Dan
Created on: 12 Aug 2025 08:00
Category: PdfProcessing
Type: Bug Report
0
PdfProcessing: Manually set form field values are not preserved when opened in Adobe Acrobat
Manually set form field values are not preserved when opened in Adobe Acrobat.
2 comments
Dan
Posted on: 14 Aug 2025 14:11
resolved the issue.  thanks
ADMIN
Martin
Posted on: 14 Aug 2025 06:58

Hello Dan,

After researching this item, we found out that there is no issue with the document filling. This unexpected behavior comes from a setting that the original document has in it. It is related to a JavaScript action that triggers on a page open event (OnPageOpen) and clears all the form fields. This behavior seems like regression because before Q4 2024, the JavaScript actions were not supported and were stripped on import.

There are several options to workaround this behavior:

  • Clear or modify the JavaScript action:
    • page.Actions.OnPageOpen.Clear();
    • JavaScriptAction? action = page.Actions.OnPageOpen.First(a => a is JavaScriptAction jsAction && jsAction.Script.Contains("resetForm")) as JavaScriptAction;
      action.Script = "new script";
  • Strip all JavaScript actions on export:
    • PdfFormatProvider provider = new PdfFormatProvider();
      provider.ExportSettings.StripJavaScriptActions = true;

Regards,
Martin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.