Bookmarks & Attachments


#1

Hi,

Can you please give me some vb examples of how to add Bookmarks (if possible) and also how to insert Note & File Attachments.

I can get the note & file icons to appear but the properties do not appear to be set.

For notes I am doing :

Dim noteAttachment As Attachment = New Attachment()
section1.Paragraphs.Add(noteAttachment)
noteAttachment.AttachmentType = AttachmentType.Note
noteAttachment.NoteContent = “This is a note.”
noteAttachment.NoteHeading = "This is a heading"

For files I am doing :

Dim fileAttachment As Attachment = New Attachment()
section1.Paragraphs.Add(fileAttachment)
fileAttachment.AttachmentType = AttachmentType.File
fileAttachment.AttachedFileName = “C:/background.jpg”
fileAttachment.AttachedFileType = “jpeg”
fileAttachment.FileIconType = FileIconType.Graph
fileAttachment.IconColor.ColorSpaceType = ColorSpaceType.Rgb
fileAttachment.IconColor.RgbColorSpace = System.Drawing.Color.BlueViolet


#2

Dear ewen,

Thanks for your consideration.

Please download hot fix in thread New Release 1.5 and Its Hot Fixes.



#3

Thanks Tommy,

I have changed to the latest Aspose.Pdf.dll

When I do :


Dim noteAttachment As Attachment = New Attachment()
section1.Paragraphs.Add(noteAttachment)
noteAttachment.AttachmentType = AttachmentType.Note
noteAttachment.NoteContent = “This is a note.”
noteAttachment.NoteHeading = "This is a heading"

Instead of no text in heading or content my note now appears with junk in the heading and the content (??é0DóT0l?o
¥) ???

Also how do I save and open in browser?
pdf.Save(Response.OutputStream) no longer works?

Also any info on bookmarks please.


Thanks, Ewen.


#4

Dear Ewen,

Thanks for your consideration.

Saving generated pdf with attachement to browser is not supported.

Bookmark is not supported currently.

I can’t reproduce the junk content error. Would you please send me you complete code?