Skip to content

Commit

Permalink
Merge pull request #6 from the-curve-consulting/mbarber/PWM-262-hotfix
Browse files Browse the repository at this point in the history
PWM-262-V2: Specify portrait and landscape page orientations in the same document
  • Loading branch information
EndoMatrix authored Feb 7, 2024
2 parents b7599e3 + 70b6d54 commit 5198a25
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions lib/caracal/renderers/document_renderer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,12 @@ def render_pageflip(xml, model)
xml['w'].p paragraph_options do
xml['w'].pPr do
xml['w'].sectPr do
if rel = document.find_relationship('footer1.xml')
xml['w'].footerReference({ 'r:id' => rel.formatted_id, 'w:type' => 'default' })
end
if rel = document.find_relationship('header1.xml')
xml['w'].headerReference({ 'r:id' => rel.formatted_id, 'w:type' => 'default' })
end
xml['w'].pgSz({
'w:w' => document.page_width,
'w:h' => document.page_height
Expand All @@ -345,6 +351,12 @@ def render_pageflip(xml, model)
xml['w'].p paragraph_options do
xml['w'].pPr do
xml['w'].sectPr do
if rel = document.find_relationship('footer1.xml')
xml['w'].footerReference({ 'r:id' => rel.formatted_id, 'w:type' => 'default' })
end
if rel = document.find_relationship('header1.xml')
xml['w'].headerReference({ 'r:id' => rel.formatted_id, 'w:type' => 'default' })
end
xml['w'].pgSz({
'w:w' => document.page_height,
'w:h' => document.page_width
Expand Down
2 changes: 1 addition & 1 deletion lib/caracal/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Caracal
VERSION = '1.4.3'
VERSION = '1.4.4'
end

0 comments on commit 5198a25

Please sign in to comment.