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 standard paper sizes to "insert blank page" and "page size" dialogs #1066

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

kbengs
Copy link
Member

@kbengs kbengs commented Mar 2, 2024

Old - New
old -new
Scaling to a paper size is what I usually want to do. The old (fit to) "width" and "height" can be achieved by setting for example width to desired value and height to a large value.

As the translation files was updated, this can wait to next release if you like to.

Copy link

codecov bot commented Mar 2, 2024

Codecov Report

Attention: Patch coverage is 78.97727% with 37 lines in your changes are missing coverage. Please review.

Project coverage is 79.59%. Comparing base (f561195) to head (c30c35c).

Files Patch % Lines
pdfarranger/pdfarranger.py 41.30% 27 Missing ⚠️
pdfarranger/pageutils.py 91.22% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1066      +/-   ##
==========================================
- Coverage   79.66%   79.59%   -0.08%     
==========================================
  Files          13       13              
  Lines        4963     5076     +113     
==========================================
+ Hits         3954     4040      +86     
- Misses       1009     1036      +27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dreua
Copy link
Member

dreua commented Mar 3, 2024

Support for common pape sizes is a great improvment imo, thanks for the initiative!

Scaling to a paper size is what I usually want to do. The old (fit to) "width" and "height" can be achieved by setting for example width to desired value and height to a large value.

Haven't tried your branch yet but from reading this sounds not ideal for the user experience. Had to read that twice to even understand it. How hard would it be to change the other value based on the value a user just changed manually? We don't support disproportionate scaling at all, do we? (I mean stretching in one dimension more or less than in the other. It's not what someone wants to do with PDFs I hope 😉 )

The old (fit to) "Width" or "Height" are removed as the new
"Fit to paper" can handle thouse cases too
@kbengs
Copy link
Member Author

kbengs commented Mar 4, 2024

change the other value based on the value a user just changed manually

I think that was a good idea so now it look like this:

old -new 2

@kbengs
Copy link
Member Author

kbengs commented Mar 15, 2024

With "Fit mode" added:
Screenshot_20240315_094105

* Basename is stored only at document level (in PDFDoc class)
* Description is stored only at page level (in Page class)
* Page separator character in serialized data is changed so that
  it will not conflict with '/n' used in description (under thumbnail)
Blank pages only make sense as main page
The modes are:
1. Scale page to fit into size
2. Scale page and add white margins to fit the size
3. Crop page (if nessessary) and/or add white margins to fit the size
Aspect ratio is always preserved.
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.

None yet

2 participants