Commit Graph

13 Commits

Author SHA1 Message Date
Omar Ahmed Hassan
d5faddbc85
Enhancement: Enhance NFunction evaluation and support advanced NFunctions (#2577)
# Description

Enhance NFunction sanitization and support advanced functions:
- Start page counting from 1 rather than 0 as PDFs are one based from
the user's perspective, thus functions results would be affected by
starting with "0" rather than "1".
- Ignore out of bound results rather than stopping iterations to work
with functions such as (n - 4) when page count is 10 as we would get
positive values when n > 4.
- Remove spaces to support expressions such as 2n + 1 rather just 2n+1.
- Support advanced functions as follows:
- Support expressions such as follows 5(n-1), n(n-1), expressions
followed by opening rounded without '*' operator.
- Support expressions such as follows (n-1)5, (n-1)n, expressions
preceded closing rounded without '*' operator.
- Support consecutive "n" expressions, examples: nnn, 2nn, nn*3, nnnn.

Closes #(issue_number)

## Checklist

- [x] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [x] I have performed a self-review of my own code
- [ ] I have attached images of the change if it is UI based
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] If my code has heavily changed functionality I have updated
relevant docs on [Stirling-PDFs doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
- [x] My changes generate no new warnings
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)
2025-01-02 14:48:20 +00:00
Anthony Stirling
58c7d7b9a8 X-API-key to X-API-KEY 2024-12-10 20:39:24 +00:00
Anthony Stirling
3633a979d3
fixes and other changes and debug of WIP SAML (#2360)
* backup

* remove debugs

* oauth to saml and compare fixes etc

* ee flag for saml

* more fixes

* info to debug

* remove unused repo

* spring dev fix for saml

* debugs

* saml stuff

* debugs

* fix
2024-11-29 15:11:59 +00:00
Anthony Stirling
833b3c45c6
Removal of Ghostscript to use qpdf and tesseract directly (#2338)
* navbar fix multi tool and compress location

* release notes and ghostscript removal

* cleanups

* formatting

* update docs

* more

* more

* docs

* release bump

* Hardening suggestions for Stirling-PDF / ghostscript (#2339)

* Protect `readLine()` against DoS

* Sanitized user-provided file names in HTTP multipart uploads

---------

Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>

---------

Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
2024-11-26 20:50:35 +00:00
Anthony Stirling
c85463bc18
Frooodle/license (#1994) 2024-10-14 22:34:41 +01:00
Anthony Stirling
47314a0f38
Extract images enhancements (#1757)
* fix

* extarct images

* langs

* logging

* cuke fix

---------

Co-authored-by: a <a>
2024-08-27 10:46:18 +01:00
Anthony Stirling
510f39ad41
Update examples.feature 2024-08-03 13:47:47 +01:00
Anthony Stirling
0f60974a57
Update examples.feature (#1624) 2024-08-03 10:44:17 +01:00
Anthony Stirling
929f0bbbe5
version bump, multi file fix and disable survey (#1550)
* version bump, multi file fix and disable survey

* example test stuff

* logs

* Update docker-compose-latest.yml

---------

Co-authored-by: a <a>
2024-07-20 09:53:58 +01:00
Anthony Stirling
c9a3f48e5a
Update requirements.txt 2024-05-27 22:34:36 +01:00
Anthony Stirling
3d78e01559 cuke 2024-05-27 17:53:33 +01:00
Anthony Stirling
6ffa80c386 changes 2024-05-27 16:31:00 +01:00
Anthony Stirling
3ae891c62e cucumber 2024-05-26 15:58:33 +01:00