I have a pdf file with 2 FreeText annotations (1 with horizontally aligned text and 1 with vertically aligned text).
I’m importing these annotations with ImportAnnotationFromXfdf method.
When i don’t specify a licence (using Evaluation) the annotations are imported correctly. When the licence is specified the text of vertical FreeText annotation becomes aligned horizontally.
Any help what can cause this behavior and how to solve it?
Code:
Dim StartFile As String = “C:\Test\StartFile.pdf”
Dim AnnotFile As String = “C:\Test\AnnotFile.xfdf”
Dim OutFile As String = “C:\Test_NoLicResult.pdf”
Dim outFile2 As String = “C:\Test_WithLicResult.pdf”
Dim annType As
Enum = {AnnotationType.FreeText}
Dim editor As New PdfAnnotationEditor()
editor.BindPdf(StartFile)
Dim fileStream As New FileStream(AnnotFile, FileMode.Create, FileAccess.Write)
editor.ExportAnnotationsXfdf(fileStream, 1, 1, annType)
fileStream.Close()
Dim fileStream2 As New FileStream(AnnotFile, FileMode.Open, FileAccess.Read)
editor.ImportAnnotationFromXfdf(fileStream2, annType)
editor.Save(OutFile)
fileStream2.Close()
Dim vLicense As Aspose.Pdf.Kit.License = New Aspose.Pdf.Kit.License
vLicense.SetLicense(“Aspose.Total.lic”)
Dim editor2 As New PdfAnnotationEditor()
editor2.BindPdf(StartFile)
Dim fileStream3 As New FileStream(AnnotFile, FileMode.Open, FileAccess.Read)
editor2.ImportAnnotationFromXfdf(fileStream3, annType)
editor2.Save(outFile2)
fileStream3.Close()
Results in attachments.
P.S. same behavior in Aspose.Pdf