Skip to content

Commit f14c8a1

Browse files
author
Markus Munk
committed
fixes rotation bug
1 parent fe11372 commit f14c8a1

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
#### Change log v.1.0.26b (2025-01-23)
4+
5+
**Fix**: Fixes bug that reverses `rotate_right` and `rotate_left`
6+
37
#### Change log v.1.0.26 (2023-12-22)
48

59
**Performance**: possible performance bump. Credit to @denislavski (Denislav Naydenov) for opening PR #235.

combine_pdf.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
1010
spec.email = ["bo@bowild.com"]
1111
spec.summary = %q{Combine, stamp and watermark PDF files in pure Ruby.}
1212
spec.description = %q{A nifty gem, in pure Ruby, to parse PDF files and combine (merge) them with other PDF files, number the pages, watermark them or stamp them, create tables, add basic text objects etc` (all using the PDF file format).}
13-
spec.homepage = "https://github.com/boazsegev/combine_pdf"
13+
spec.homepage = "https://github.com/NovitasDK/combine_pdf"
1414
spec.license = "MIT"
1515

1616
spec.files = `git ls-files -z`.split("\x0")

lib/combine_pdf/page_methods.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ def fit_text(text, font, length, height = 10_000_000)
403403
def fix_rotation
404404
return self if self[:Rotate].to_f == 0.0 || mediabox.nil?
405405
# calculate the rotation
406-
r = (360.0 - self[:Rotate].to_f) * Math::PI / 180
406+
r = self[:Rotate].to_f * Math::PI / 180
407407
s = Math.sin(r).round 6
408408
c = Math.cos(r).round 6
409409
ctm = [c, s, -s, c]

lib/combine_pdf/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module CombinePDF
2-
VERSION = '1.0.26'.freeze
2+
VERSION = '1.0.26b'.freeze
33
end

0 commit comments

Comments
 (0)