update pdf gem
This commit is contained in:
+1
-1
@@ -261,7 +261,7 @@ GEM
|
|||||||
signet (>= 0.16, < 2.a)
|
signet (>= 0.16, < 2.a)
|
||||||
hashdiff (1.1.0)
|
hashdiff (1.1.0)
|
||||||
hashery (2.1.2)
|
hashery (2.1.2)
|
||||||
hexapdf (0.34.1)
|
hexapdf (0.37.1)
|
||||||
cmdparse (~> 3.0, >= 3.0.3)
|
cmdparse (~> 3.0, >= 3.0.3)
|
||||||
geom2d (~> 0.4, >= 0.4.1)
|
geom2d (~> 0.4, >= 0.4.1)
|
||||||
openssl (>= 2.2.1)
|
openssl (>= 2.2.1)
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ module Submissions
|
|||||||
column.text(account.linked_account_account&.testing? ? 'Testing Log - Not for Production Use' : 'Audit Log',
|
column.text(account.linked_account_account&.testing? ? 'Testing Log - Not for Production Use' : 'Audit Log',
|
||||||
font_size: 16,
|
font_size: 16,
|
||||||
padding: [10, 0, 0, 0],
|
padding: [10, 0, 0, 0],
|
||||||
position: :float, position_hint: :right)
|
position: :float, text_align: :right)
|
||||||
end
|
end
|
||||||
|
|
||||||
composer.column(columns: 1) do |column|
|
composer.column(columns: 1) do |column|
|
||||||
@@ -80,7 +80,7 @@ module Submissions
|
|||||||
|
|
||||||
unless submission.source.in?(%w[embed api])
|
unless submission.source.in?(%w[embed api])
|
||||||
column.formatted_text([{ link: verify_url, text: 'Verify', style: :link }],
|
column.formatted_text([{ link: verify_url, text: 'Verify', style: :link }],
|
||||||
font_size: 9, padding: [15, 0, 10, 0], position: :float, align: :right)
|
font_size: 9, padding: [15, 0, 10, 0], position: :float, text_align: :right)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -192,7 +192,7 @@ module Submissions
|
|||||||
font_size: 6
|
font_size: 6
|
||||||
}
|
}
|
||||||
].compact_blank,
|
].compact_blank,
|
||||||
align: field['name'].to_s.match?(RTL_REGEXP) ? :right : :left,
|
text_align: field['name'].to_s.match?(RTL_REGEXP) ? :right : :left,
|
||||||
line_spacing: 1.3, padding: [0, 0, 2, 0]
|
line_spacing: 1.3, padding: [0, 0, 2, 0]
|
||||||
),
|
),
|
||||||
if field['type'].in?(%w[image signature initials stamp])
|
if field['type'].in?(%w[image signature initials stamp])
|
||||||
@@ -239,7 +239,7 @@ module Submissions
|
|||||||
value = Submissions::GenerateResultAttachments::REPLACE_EMOJI[value] || value
|
value = Submissions::GenerateResultAttachments::REPLACE_EMOJI[value] || value
|
||||||
|
|
||||||
composer.formatted_text_box([{ text: TextUtils.maybe_rtl_reverse(value.to_s.presence || 'n/a') }],
|
composer.formatted_text_box([{ text: TextUtils.maybe_rtl_reverse(value.to_s.presence || 'n/a') }],
|
||||||
align: value.to_s.match?(RTL_REGEXP) ? :right : :left,
|
text_align: value.to_s.match?(RTL_REGEXP) ? :right : :left,
|
||||||
padding: [0, 0, 10, 0])
|
padding: [0, 0, 10, 0])
|
||||||
end
|
end
|
||||||
]
|
]
|
||||||
@@ -309,7 +309,7 @@ module Submissions
|
|||||||
font: [FONT_BOLD_NAME, { variant: :bold }],
|
font: [FONT_BOLD_NAME, { variant: :bold }],
|
||||||
width: 100,
|
width: 100,
|
||||||
padding: [5, 0, 0, 8],
|
padding: [5, 0, 0, 8],
|
||||||
position: :float, position_hint: :left)
|
position: :float, text_align: :left)
|
||||||
end
|
end
|
||||||
# rubocop:enable Metrics
|
# rubocop:enable Metrics
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ module Submissions
|
|||||||
|
|
||||||
# rubocop:disable Metrics
|
# rubocop:disable Metrics
|
||||||
def call(submitter)
|
def call(submitter)
|
||||||
cell_layouter = HexaPDF::Layout::TextLayouter.new(valign: :center, align: :center)
|
cell_layouter = HexaPDF::Layout::TextLayouter.new(text_valign: :center, text_align: :center)
|
||||||
|
|
||||||
template = submitter.submission.template
|
template = submitter.submission.template
|
||||||
|
|
||||||
@@ -65,8 +65,8 @@ module Submissions
|
|||||||
|
|
||||||
value = submitter.values[field['uuid']]
|
value = submitter.values[field['uuid']]
|
||||||
|
|
||||||
layouter = HexaPDF::Layout::TextLayouter.new(valign: :center,
|
layouter = HexaPDF::Layout::TextLayouter.new(text_valign: :center,
|
||||||
align: value.to_s.match?(RTL_REGEXP) ? :right : :left,
|
text_align: value.to_s.match?(RTL_REGEXP) ? :right : :left,
|
||||||
font: pdf.fonts.add(FONT_NAME), font_size:)
|
font: pdf.fonts.add(FONT_NAME), font_size:)
|
||||||
|
|
||||||
next if Array.wrap(value).compact_blank.blank?
|
next if Array.wrap(value).compact_blank.blank?
|
||||||
|
|||||||
Reference in New Issue
Block a user