I'm updating a CAT application that applies Stamps to pages. In the code below you can see that I can set the position of the stamp ( LfPoint(x, y) ) but when the page is Clockwise or Counterclockwise the size of the applied stamp is very large (aspect ratio - stamp covers much of the page)
Note: when Rotation = none or UpsideDown the stamp size is correct.
Has anyone run into this?
- - - - -
For Each SI As StampInfo In ListOfStamps
If SI.Name = DocPageDispositionName Then
SA.StampId = SI.Id
SA.Comment = DocPageDispositionName
SA.Color = LfColor.FromAbgr(255)
' Create a red stamp.
If PI.HasImage = True Then
If PI.ImageRotation = PageRotation.None Then
SA.Rotation = 0
SA.Position = New LfPoint(25, 25)
ElseIf PI.ImageRotation = PageRotation.Clockwise Then
SA.Rotation = 270
SA.Position = New LfPoint(25, 2466)
ElseIf PI.ImageRotation = PageRotation.UpsideDown Then
SA.Rotation = 180
SA.Position = New LfPoint(2158, 3227)
ElseIf PI.ImageRotation = PageRotation.Counterclockwise Then
SA.Rotation = 90
SA.Position = New LfPoint(2466, 25)
End If
PI.AddAnnotation(SA)
PI.Save()
End If
- - - - -
I've tried "Dim StampRect As Laserfiche.RepositoryAccess.Common.LfRectangle = BCStampAnnotation.Coordinates" from Bert's post below
https://answers.laserfiche.com/questions/124325/create-dynamic-barcode-stamp