Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Odd-Even Merge operation mode #1445

Merged
merged 7 commits into from
Jun 12, 2024

Conversation

Skillkiller
Copy link
Contributor

Description

In this PR I am adding a new organisation mode for the page organiser. This mode can bring manual double-sided scans into the natural order.
It is about scans of multiple pages where the front side was scanned first and then all back sides. Sequence:
Page 1, page 3, page 5, page 2, page 4, page 6.

This mode brings the pages back into their natural page order (1,2,3,4,5,6). If the PDF document has an odd number of pages, it is assumed that there is one more front page than back pages (1,2,3,4,5).

Input sequence: 1,3,5,7,9,2,4,6,8,10

Output sequence: 1,2,3,4,5,6,7,8,9,10

Closes #1432

Screenshots:

Webpage

grafik

Input

Odd-Even Scan.pdf
Odd-Even Scan

Output

Odd-Even Scan_rearranged.pdf
Odd-Even Scan_rearranged

Checklist:

  • I have read the Contribution Guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings

Contributor License Agreement

By submitting this pull request, I acknowledge and agree that my contributions will be included in Stirling-PDF and that they can be relicensed in the future under the MPL 2.0 (Mozilla Public License Version 2.0) license.

(This does not change the general open-source nature of Stirling-PDF, simply moving from one license to another license)

@Skillkiller Skillkiller requested a review from Frooodle as a code owner June 12, 2024 17:09
@@ -821,6 +821,7 @@ pdfOrganiser.mode.6=Odd-Even Split
pdfOrganiser.mode.7=Remove First
pdfOrganiser.mode.8=Remove Last
pdfOrganiser.mode.9=Remove First and Last
pdfOrganiser.mode.10=Odd-Even Merge
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add to GB file not US for the base

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added also to the messages_en_GB.properties

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
24.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@Frooodle Frooodle merged commit f60a8d8 into Stirling-Tools:main Jun 12, 2024
3 of 4 checks passed
@Skillkiller Skillkiller deleted the odd-even-merge branch June 12, 2024 22:03
szinn referenced this pull request in szinn/k8s-homelab Jun 15, 2024
…0.26.1 ) (#3852)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[ghcr.io/stirling-tools/s-pdf](https://github.com/Stirling-Tools/Stirling-PDF)
| patch | `0.26.0` -> `0.26.1` |

---

### Release Notes

<details>
<summary>Stirling-Tools/Stirling-PDF
(ghcr.io/stirling-tools/s-pdf)</summary>

###
[`v0.26.1`](https://github.com/Stirling-Tools/Stirling-PDF/releases/tag/v0.26.1):
0.26.1 Various minor enhancements + survey

[Compare
Source](https://github.com/Stirling-Tools/Stirling-PDF/compare/v0.26.0...v0.26.1)

New Survey introduced this version, which will not pop up again after
hitting don't show or after opening the survey just once
We would appreciate it if you could give us some feedback on how we are
doing!
https://stirlingpdf.info/s/clwzgtfw7000gltkmwz1n212m

## Enhancements

-   Language updates as always! thankyou all!
- change to Pdf.js-Legacy to support older chrome versions
[@&#8203;Ludy87](https://github.com/Ludy87)
- Odd-Even operation mode for organise feature (thanks
[@&#8203;Skillkiller](https://github.com/Skillkiller) )

## Bug fixes

- contextPath issue fixes for root uri changes like /pdf etc
[@&#8203;Ludy87](https://github.com/Ludy87)
- PDF to image producing incorrect single image results if pages are
different oriantations/sizes (thanks
[@&#8203;Skillkiller](https://github.com/Skillkiller) )

#### What's Changed

- Update messages_ar_AR.properties by
[@&#8203;wahab95](https://github.com/wahab95) in
[https://github.com/Stirling-Tools/Stirling-PDF/pull/1430](https://github.com/Stirling-Tools/Stirling-PDF/pull/1430)
- change to Pdf.js-Legacy Version 4.3.136 by
[@&#8203;Ludy87](https://github.com/Ludy87) in
[https://github.com/Stirling-Tools/Stirling-PDF/pull/1444](https://github.com/Stirling-Tools/Stirling-PDF/pull/1444)
- Update messages_zh_TW.properties: Translate English sentence to
Chinese by [@&#8203;WorldOfWheat](https://github.com/WorldOfWheat) in
[https://github.com/Stirling-Tools/Stirling-PDF/pull/1438](https://github.com/Stirling-Tools/Stirling-PDF/pull/1438)
- Bugfix: missing contextPath by
[@&#8203;Ludy87](https://github.com/Ludy87) in
[https://github.com/Stirling-Tools/Stirling-PDF/pull/1434](https://github.com/Stirling-Tools/Stirling-PDF/pull/1434)
- 📝 Update README: Translation Progress Table by
[@&#8203;github-actions](https://github.com/github-actions) in
[https://github.com/Stirling-Tools/Stirling-PDF/pull/1431](https://github.com/Stirling-Tools/Stirling-PDF/pull/1431)
- survey by [@&#8203;Frooodle](https://github.com/Frooodle) in
[https://github.com/Stirling-Tools/Stirling-PDF/pull/1446](https://github.com/Stirling-Tools/Stirling-PDF/pull/1446)
- 📝 Update README: Translation Progress Table by
[@&#8203;github-actions](https://github.com/github-actions) in
[https://github.com/Stirling-Tools/Stirling-PDF/pull/1447](https://github.com/Stirling-Tools/Stirling-PDF/pull/1447)
- Add Odd-Even Merge operation mode by
[@&#8203;Skillkiller](https://github.com/Skillkiller) in
[https://github.com/Stirling-Tools/Stirling-PDF/pull/1445](https://github.com/Stirling-Tools/Stirling-PDF/pull/1445)
- When converting PDF to Word, add parameters to speed up soffice
startup by [@&#8203;HHHHHMMMM](https://github.com/HHHHHMMMM) in
[https://github.com/Stirling-Tools/Stirling-PDF/pull/1450](https://github.com/Stirling-Tools/Stirling-PDF/pull/1450)
- Add missing of Ukrainian translation to the resource file by
[@&#8203;anroypaul](https://github.com/anroypaul) in
[https://github.com/Stirling-Tools/Stirling-PDF/pull/1448](https://github.com/Stirling-Tools/Stirling-PDF/pull/1448)
- Update messages_it_IT.properties by
[@&#8203;albanobattistella](https://github.com/albanobattistella) in
[https://github.com/Stirling-Tools/Stirling-PDF/pull/1454](https://github.com/Stirling-Tools/Stirling-PDF/pull/1454)
- Update messages_ja_JP.properties by
[@&#8203;tkymmm](https://github.com/tkymmm) in
[https://github.com/Stirling-Tools/Stirling-PDF/pull/1457](https://github.com/Stirling-Tools/Stirling-PDF/pull/1457)
- \[ImgBot] Optimize images by
[@&#8203;imgbot](https://github.com/imgbot) in
[https://github.com/Stirling-Tools/Stirling-PDF/pull/1455](https://github.com/Stirling-Tools/Stirling-PDF/pull/1455)
- Fixed a spelling mistake in French by
[@&#8203;bistory](https://github.com/bistory) in
[https://github.com/Stirling-Tools/Stirling-PDF/pull/1459](https://github.com/Stirling-Tools/Stirling-PDF/pull/1459)
- PDF-to-Image different page formats fix by
[@&#8203;Skillkiller](https://github.com/Skillkiller) in
[https://github.com/Stirling-Tools/Stirling-PDF/pull/1460](https://github.com/Stirling-Tools/Stirling-PDF/pull/1460)
- 💾 Update Version by
[@&#8203;github-actions](https://github.com/github-actions) in
[https://github.com/Stirling-Tools/Stirling-PDF/pull/1461](https://github.com/Stirling-Tools/Stirling-PDF/pull/1461)

#### New Contributors

- [@&#8203;WorldOfWheat](https://github.com/WorldOfWheat) made their
first contribution in
[https://github.com/Stirling-Tools/Stirling-PDF/pull/1438](https://github.com/Stirling-Tools/Stirling-PDF/pull/1438)
- [@&#8203;Skillkiller](https://github.com/Skillkiller) made their
first contribution in
[https://github.com/Stirling-Tools/Stirling-PDF/pull/1445](https://github.com/Stirling-Tools/Stirling-PDF/pull/1445)
- [@&#8203;HHHHHMMMM](https://github.com/HHHHHMMMM) made their first
contribution in
[https://github.com/Stirling-Tools/Stirling-PDF/pull/1450](https://github.com/Stirling-Tools/Stirling-PDF/pull/1450)
- [@&#8203;anroypaul](https://github.com/anroypaul) made their first
contribution in
[https://github.com/Stirling-Tools/Stirling-PDF/pull/1448](https://github.com/Stirling-Tools/Stirling-PDF/pull/1448)
- [@&#8203;bistory](https://github.com/bistory) made their first
contribution in
[https://github.com/Stirling-Tools/Stirling-PDF/pull/1459](https://github.com/Stirling-Tools/Stirling-PDF/pull/1459)

**Full Changelog**:
Stirling-Tools/Stirling-PDF@v0.26.0...v0.26.1

</details>

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MDguMiIsInVwZGF0ZWRJblZlciI6IjM3LjQwOC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL3BhdGNoIl19-->

Co-authored-by: repo-jeeves[bot] <106431701+repo-jeeves[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Merge Odd-Even Pages
2 participants