Is it possible to put a GraphNote on a TIFF image added to a page?
In the code below, when I use a JPEG file, it works fine. But when I use various TIFF files, there is no error reported, but I never see the note on the generated page.
Sub AsposeTestIt()
Dim pdf1 As Aspose.Pdf.Pdf = New Aspose.Pdf.Pdf
Dim sec1 As Aspose.Pdf.Section = New Aspose.Pdf.Section(pdf1)
sec1.PageInfo.PageWidth = 1728 + 90 + 90 ’ image size + left/right margins
sec1.PageInfo.PageHeight = 2080 + 72 + 72 ’ image height + top/bottom margins
pdf1.Sections.Add(sec1)
Dim image1 As Aspose.Pdf.Image = New Aspose.Pdf.Image(sec1)
sec1.Paragraphs.Add(image1)
'???
’ Using TIFF, the note is not seen on the page???
image1.ImageInfo.File = “C:/tmp/test.tif”
image1.ImageInfo.ImageFileType = Aspose.Pdf.ImageFileType.Tiff
'???
’ Using JPEG, the note is seen just fine
’ image1.ImageInfo.File = “c:/tmp/kidatcomputer.jpg”
’ image1.ImageInfo.ImageFileType = Aspose.Pdf.ImageFileType.Jpeg
Dim note1 As GraphNote = New GraphNote(sec1)
note1.Content = “this is note1”
note1.PositionX = 50
note1.PositionY = 100
image1.ImageNotes.Add(note1)
pdf1.Save(“c:\tmp\ImageTest2.pdf”)
End Sub