GSoC/2024/StatusReports/PrathamGandhi: Difference between revisions

From KDE Community Wiki
< GSoC‎ | 2024‎ | StatusReports
(Created a status report page)
 
No edit summary
Line 1: Line 1:
== Forms/Javascript support improvement for Okular ==
== Forms/Javascript support improvement for Okular ==
Okular, the document viewer supports PDFs with forms. These forms often use Javascript to make forms more convenient for its users. However, as of today, the support for Javascript within Okular is quite lacking with large number of open bugs.


This project aims to improving the support for PDF forms in Okular as much as possible and make the feature set more consistent with Adobe Acrobat.
== Work report ==
== Work report ==
The following is the list of bug fixes or new features added during the GSoC period.
* Added support for the following Acrobat pre-defined methods. This would allow for correct processing of text fields.
# AFNumber_Keystroke
# AFSpecial_Keystroke
# AFMerge_Change
# AFTime_Keystroke
# AFDate_FormatEx
# AFDate_KeystrokeEx
# AFPercent_Format
# AFPercent_Keystroke
* Added implementation for ''selStart'' and ''selEnd'' event properties.
* ''change'' event property was fixed to correctly handle for Unicode characters.
* Incorrect cursor position calculation was fixed.
* Following document level events were implemented.
# DocOpen
# DocWillClose
# DocWillPrint
# DocDidPrint
# DocWillSave
# DocDidSave
* Fixed the execution of validation events bug.
* Refresh functions were added for RadioButton, ListEdit and ComboEdit.
* A basic implementation of the ''global'' object was rolled out.
* Added the feature where values in fields are committed upon being accepted and can be reverted back to this committed value in case the newly entered value is rejected.
* Fixed bugs that caused incorrect calculation upon using different locales because of using incorrect numerical interpretation.
* Fixed the size of checkboxes and radiobuttons and made them zoomable.
* Implemented ''value'' (getter), ''numItems'', ''currentValueIndices'' properties and ''getItemAt'' function for FormFieldChoices.
* Added the feature for resetting PDF forms in Okular.


== Links to Blogs and other writing ==
== Links to Blogs and other writing ==
More details about every feature/bug fix and the relevant MR can be found on my blog posts:
* https://prathamgandhi.github.io/posts/gsoc24-update1
* https://prathamgandhi.github.io/posts/gsoc24-update2
* https://prathamgandhi.github.io/posts/gsoc24-update3

Revision as of 13:57, 2 October 2024

Forms/Javascript support improvement for Okular

Okular, the document viewer supports PDFs with forms. These forms often use Javascript to make forms more convenient for its users. However, as of today, the support for Javascript within Okular is quite lacking with large number of open bugs.

This project aims to improving the support for PDF forms in Okular as much as possible and make the feature set more consistent with Adobe Acrobat.

Work report

The following is the list of bug fixes or new features added during the GSoC period.

  • Added support for the following Acrobat pre-defined methods. This would allow for correct processing of text fields.
  1. AFNumber_Keystroke
  2. AFSpecial_Keystroke
  3. AFMerge_Change
  4. AFTime_Keystroke
  5. AFDate_FormatEx
  6. AFDate_KeystrokeEx
  7. AFPercent_Format
  8. AFPercent_Keystroke
  • Added implementation for selStart and selEnd event properties.
  • change event property was fixed to correctly handle for Unicode characters.
  • Incorrect cursor position calculation was fixed.
  • Following document level events were implemented.
  1. DocOpen
  2. DocWillClose
  3. DocWillPrint
  4. DocDidPrint
  5. DocWillSave
  6. DocDidSave
  • Fixed the execution of validation events bug.
  • Refresh functions were added for RadioButton, ListEdit and ComboEdit.
  • A basic implementation of the global object was rolled out.
  • Added the feature where values in fields are committed upon being accepted and can be reverted back to this committed value in case the newly entered value is rejected.
  • Fixed bugs that caused incorrect calculation upon using different locales because of using incorrect numerical interpretation.
  • Fixed the size of checkboxes and radiobuttons and made them zoomable.
  • Implemented value (getter), numItems, currentValueIndices properties and getItemAt function for FormFieldChoices.
  • Added the feature for resetting PDF forms in Okular.

Links to Blogs and other writing

More details about every feature/bug fix and the relevant MR can be found on my blog posts: