Hi
I’m adding attachments to PDF using the following code:
Public Shared Sub AddAttachmentToDocument(ByVal document As IO.Stream,
ByVal attachment As IO.Stream,
ByVal attachmentName As String,
ByVal attachmentDescription As String,
ByRef output As IO.Stream)
If document Is Nothing Then Return
' register Aspose license
Dim PdfLicense As New Aspose.Pdf.License
PdfLicense.SetLicense("Aspose.Total.lic")
Dim PdfDocument As New Aspose.Pdf.Document(document)
Dim PdfAttachment As New Aspose.Pdf.FileSpecification(attachment, attachmentName)
PdfAttachment.Description = attachmentDescription
PdfDocument.EmbeddedFiles.Add(PdfAttachment)
'save output document
PdfDocument.Save(output)
End Sub
Attachments are added with given name and description but “Modified” and “Size” are not filled and there are no such properties in FileSpecification.