I am trying to attach a file to one of my PDF document (XFA Document created by Adobe Live Cycle Designer), it is not throwing any error but the file is not getting attached to the PDF file. What could be the reason? The following is the code I used to do the same:
HttpPostedFile postedFile;
postedFile = mFile.PostedFile;
string fileName = postedFile.FileName;
if(fileName != string.Empty)
{
if( mFile.PostedFile != null )
{
PdfContentEditor editor = new PdfContentEditor();
System.Drawing.Rectangle rect=new
System.Drawing.Rectangle(50,50,100,100);
editor.BindPdf(destinationPath);
editor.CreateFileAttachment(rect,"Welcome Aspose",fileName,1,"Generic");
editor.Save(destinationPath2);
}
}