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

[components] Add element_ordering argument to PDFDocument #95

Merged
merged 2 commits into from
Jun 22, 2020

Conversation

jstockwin
Copy link
Owner

@jstockwin jstockwin commented Jun 22, 2020

Description

Adds element_ordering to the PDFDocument. You can now specify an ordering function from the elements. You can choose from an enum of presets (left to right, top to bottom (default), right to left, top to bottom, top to bottom, left to right, top to bottom, right to left), or you can pass your own callable.

This will be helpful for certain pdfs, for instance when creating sections (since these must be continuous sets of elements).

Linked issues

Closes #94

Testing

Tests have been added.

Checklist

  • I have provided a good description of the change above
  • I have added any necessary tests
  • I have added all necessary type hints
  • I have checked my linting (docker-compose run --rm lint)
  • I have added/updated all necessary documentation
  • I have updated CHANGELOG.md, following the format from
    Keep a Changelog.

@jstockwin jstockwin force-pushed the element-ordering branch 3 times, most recently from 525a647 to ee53777 Compare June 22, 2020 14:34
Copy link
Collaborator

@kawa-marcin kawa-marcin left a comment

Choose a reason for hiding this comment

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

👍 Looking good!

@jstockwin jstockwin merged commit 37b01aa into master Jun 22, 2020
@jstockwin jstockwin deleted the element-ordering branch June 22, 2020 14:43
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.

Allow different element orderings
2 participants