fix(pdfburner): correct page indexing for annotation rendering
- Removed unnecessary +1 offset in Manager.SelectPage calls for image and ink annotations - Ensured correct page index is used when adding annotations and form field values - Improved annotation rendering accuracy when burning to PDF
This commit is contained in:
@@ -161,7 +161,7 @@ Namespace Jobs.FinalizeDocument
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub AddImageAnnotation(x As Double, y As Double, width As Double, height As Double, page As Integer, base64 As String)
|
Private Sub AddImageAnnotation(x As Double, y As Double, width As Double, height As Double, page As Integer, base64 As String)
|
||||||
Manager.SelectPage(page + 1)
|
Manager.SelectPage(page)
|
||||||
Manager.AddEmbeddedImageAnnotFromBase64(base64, x, y, width, height)
|
Manager.AddEmbeddedImageAnnotFromBase64(base64, x, y, width, height)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -187,7 +187,7 @@ Namespace Jobs.FinalizeDocument
|
|||||||
|
|
||||||
Dim oSegments = ink.lines.points
|
Dim oSegments = ink.lines.points
|
||||||
Dim oColor = ColorTranslator.FromHtml(ink.strokeColor)
|
Dim oColor = ColorTranslator.FromHtml(ink.strokeColor)
|
||||||
Manager.SelectPage(page + 1)
|
Manager.SelectPage(page)
|
||||||
|
|
||||||
For Each oSegment As List(Of List(Of Single)) In oSegments
|
For Each oSegment As List(Of List(Of Single)) In oSegments
|
||||||
Dim oPoints = oSegment.
|
Dim oPoints = oSegment.
|
||||||
@@ -219,7 +219,7 @@ Namespace Jobs.FinalizeDocument
|
|||||||
{"city", 3}
|
{"city", 3}
|
||||||
}
|
}
|
||||||
|
|
||||||
Manager.SelectPage(page + 1)
|
Manager.SelectPage(page)
|
||||||
Dim posY = y + _pdfBurnerParams.YOffset * yOffset(name)
|
Dim posY = y + _pdfBurnerParams.YOffset * yOffset(name)
|
||||||
' Add the text annotation
|
' Add the text annotation
|
||||||
Dim ant = Manager.AddTextAnnot(x, posY, width, height, value)
|
Dim ant = Manager.AddTextAnnot(x, posY, width, height, value)
|
||||||
|
|||||||
Reference in New Issue
Block a user