Spire.PDF 8.2.2 supports getting JavaScript strings from the PDF form field

2022-02-22 03:04:54

We are glad to announce the release of Spire.PDF 8.2.2. This version supports getting JavaScript strings from the PDF form field. It also enhances the conversion from PDF to Image. In addition, it fixes some known issues such as the calculation of the added JavaScriptAction did not take effect. More details are listed below.

Here is a list of changes made in this release

Category ID Description
New feature SPIREPDF-3165 Supports getting JavaScript strings from the PDF form field.
Spire.Pdf.PdfDocument doc = new Spire.Pdf.PdfDocument();
 doc.LoadFromFile(@"input.pdf", FileFormat.PDF);
 PdfFormWidget fw = doc.Form as PdfFormWidget;
 StringBuilder sb = new StringBuilder();
 for (int i = 0; i < fw.FieldsWidget.Count; i++)
 {
     PdfField pdfField = fw.FieldsWidget[i];
     if (pdfField is PdfCheckBoxWidgetFieldWidget)
     { 
       PdfCheckBoxWidgetFieldWidget checkBoxField = pdfField as PdfCheckBoxWidgetFieldWidget; 
       PdfJavaScriptAction mousedown = (PdfJavaScriptAction)checkBoxField.Actions.MouseDown; sb.Append(mousedown.Script.ToString());
     }
 }
 string result = @"js-output.txt";
 File.WriteAllText(result, sb.ToString());
Bug SPIREPDF-2128 Fixes the issue that it generated an error when using PDF-Exchange viewer to open a document protected by the permission password.
Bug SPIREPDF-4813 Fixes the issue that the calculation of the added JavaScriptAction did not take effect.
Bug SPIREPDF-4852 Fixes the issue that the borders and color of the signature field did not display when viewing by a browser.
Bug SPIREPDF-4876 Fixes the issue that the output file was blank when calling AppendPage(PdfDocument doc).
Bug SPIREPDF-4912 Fixes the issue that the application threw "System.FormatException" when flattening the PDF form fields.
Bug SPIREPDF-4917 Fixes the issue that some text content was covered after converting PDF to images.
Bug SPIREPDF-4919 Fixes the issue that some content was lost after converting PDF to images.
Click the link to download Spire.PDF 8.2.2:
More information of Spire.PDF new release or hotfix: