Document pdfDocument = new Document();
pdfDocument.Pages.Add();
Page pdfPage = pdfDocument.Pages[1];
Aspose.Pdf.FloatingBox floatBox = new Aspose.Pdf.FloatingBox(100, 50);
floatBox.Padding.Left = 965;
floatBox.Padding.Top = 553;
Aspose.Pdf.Text.TextFragment fragment = new TextFragment("Inline Text");
floatBox.Paragraphs.Add(fragment);
pdfPage.Paragraphs.Add(floatBox);
FileStream fs = new FileStream("C:\\Sample.docx", FileMode.Open);
FileSpecification fileSpecification = new FileSpecification(fs, "Sample.docx", "Testing");
pdfDocument.EmbeddedFiles.Add(fileSpecification);
FileAttachmentAnnotation fileAttachment = new FileAttachmentAnnotation(pdfPage,
new Aspose.Pdf.Rectangle(240, 210, 256, 226), pdfDocument.EmbeddedFiles[1]);
fileAttachment.Icon = FileIcon.Paperclip;
pdfDocument.Pages[1].Annotations.Add(fileAttachment);
const string fullpath = "C:\\pdftest\\Test.pdf";
pdfDocument.Save(fullpath);
System.Diagnostics.Process.Start(fullpath);
from the above sample code the generated pdf contains Sample.docx embedded twice in the attachment tab why?
and why the sixe of text("Inline Text") and clip icon("Paperclip") differs?