Closed toshi1127 closed 1 year ago
Hi @toshi1127 Thanks for raising the PR. Could you please add a test case with the PDF for the issue that you are facing which fails otherwise but passes with your fix?
@samkit-jain Thanks for reviewing.
Is it mandatory to add the PDF as a test case to merge this PR? We are developing SaaS, and we would like to avoid adding it as test data as much as possible, because an error occurred in a PDF uploaded by contractor.
If you insist, we will attempt to see if we can create a separate PDF to reproduce the error.
Thank you, @toshi1127 and thank you @samkit-jain. Ideally, PRs come with proving test cases, but this change is simple/clear enough, and true to the specification*, that I think we can make an exception here. Merging.
* Per the spec (p. 146), rotation refers to "The number of degrees by which the page should be rotated clockwise when displayed or printed. The value must be a multiple of 90. Default value: 0."
And I'm curious, @toshi1127: What's the SaaS product?
@jsvine Thank you for the review ! I am using pdfplumber for the following product.
An error occurred when calculating rotation when Rotate was None. Fixed to calculate rotation using 0 when Rotate is None.