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

Pages in output PDF not guaranteed to be in correct order on every platform #7

Closed
pjh1974 opened this issue Jan 9, 2014 · 3 comments
Assignees

Comments

@pjh1974
Copy link

pjh1974 commented Jan 9, 2014

In Linux

glob.glob("%s*.jpg" % basename)

will return the files in the natural filesystem order, rather than name order. This means that the pages in the output PDF file aren't always in the correct order. Might I suggest that the code (in pypdfocr_pdf.py) be changed to:

sorted(glob.glob("%s*.jpg" % basename))

to resolve this issue.

BTW great work - this was just what I was looking for.

@ghost ghost assigned virantha Jan 10, 2014
@virantha
Copy link
Owner

Ah ok, thanks! Had no idea about that subtlety. I'll put this in for a patch release this weekend.
Glad the utility is helpful!

@virantha
Copy link
Owner

Fixed, used a natural-sort to ensure everything is sorted even when page count > 9.

@pjh1974
Copy link
Author

pjh1974 commented Jan 13, 2014

Thanks, good spot on the page count >9 think - I feel a little silly about that one now!

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

No branches or pull requests

2 participants