Fix signature field formatting and add text truncation
Address customer feedback on signature field layout issues: - Added truncation logic in `PDFBurner.vb` to limit text length based on per-field maximums, appending a suffix (e.g., `..`). - Enhanced `PDFBurnerParams.vb` with `TextMaxLengths` and `TruncationSuffix` for configurable truncation behavior. - Improved spacing and layout handling for signature fields to prevent text collisions within fixed dimensions. - Updated `EnvelopeGenerator.sln` with documentation for the signature formatting fix (`fix-signature-field-formatting.md`). - Applied truncation consistently across `AddFormFieldValue` overloads and ensured deterministic rendering of annotations.
This commit is contained in:
@@ -12,5 +12,23 @@ Namespace Jobs.FinalizeDocument
|
||||
Public Property FontSize As Integer = 8
|
||||
|
||||
Public Property FontStyle As FontStyle = FontStyle.Italic
|
||||
|
||||
''' <summary>
|
||||
''' The suffix appended to a truncated field value. Defaults to "..".
|
||||
''' Can be changed to any string (e.g. "…", "...", "").
|
||||
''' </summary>
|
||||
Public Property TruncationSuffix As String = ".."
|
||||
|
||||
''' <summary>
|
||||
''' Per-field maximum character count (including the TruncationSuffix).
|
||||
''' If a value exceeds the limit it is cut and TruncationSuffix is appended.
|
||||
''' Keys must match egName values used in PDFBurner (e.g. "name", "position", "city", "date").
|
||||
''' Set a value to 0 to disable truncation for that field.
|
||||
''' </summary>
|
||||
Public Property TextMaxLengths As New Dictionary(Of String, Integer) From {
|
||||
{"position", 20},
|
||||
{"city", 20},
|
||||
{"date", 28}
|
||||
}
|
||||
End Class
|
||||
End Namespace
|
||||
Reference in New Issue
Block a user