Replave an embeded attachment with another document

Hi
I have a PDF document with embedded attached Excel documents.
I want to replace the attachments with other Excel document and still keep the shapes with the links in the PDF document.
What is the way to do this? Can you give an example for that?

Thanks
Tali.

Hi Tali,


Thanks for your inquiry. After initial investigation, we have logged a ticket PDFNEWNET-38039 in our issue tracking system for further investigation of your requirement and its resolution. We will keep you updated about the issue resolution progress.

We are sorry for the inconvenience caused.

Best Regards,

Thanks,
Do you have an estimated date for fixing this issue? can we examine the bug status directly from the web site?

oren@re-sec.com:
Do you have an estimated date for fixing this issue?
Hi Tali,

Thanks for your patience.<o:p></o:p>

As we recently have been able to notice this issue, so development team requires little time to investigate and figure out the reasons of this problem. Nevertheless, I have also intimated the development team to investigate this issue on priority basis. As soon as we have made some definite progress towards its resolution, we would be more than happy to update you with the status of correction.<o:p></o:p>

Our humble request is to please be patient and spare us little time.


oren@re-sec.com:
can we examine the bug status directly from the web site?
I am afraid you might not have access to our bug tracking system as its our internal implementation. However you may request status updates within this forum thread.

Hi
Do you have any progress with this issue?

Thanks.

Hi Tali,


Thanks for your inquiry. I am afraid your reported issue is still not resolved, as product team is busy in resolving other issues, reported earlier. However we have raised the issue priority in our issue tracking system, requested our team to investigate the issue and share an ETA at their earliest. We will notify you as soon as we made some significant progress towards issue resolution.

Thanks for your patience and cooperation.

Best Regards,

Hi Tali,


Thanks for your patience.

We are pleased to share that the issue reported earlier is resolved and its fix will be included in next version of Aspose.Pdf for .NET 10.8.0 which is planned to release in September-2015. Please be patient and wait for the new release.

The issues you have found earlier (filed as PDFNEWNET-38039) have been fixed in Aspose.Pdf for .NET 10.8.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
Hi Tali,

Thanks for your patience.

In order to accomplish your requirement, you should assign File property of FileAtachmentAnnoation class. Please try using following code snippet to accomplish your requirement.

[C#]

Document doc = new Document("38039.pdf");

foreach (Annotation annot in doc.Pages[1].Annotations)

{

if (annot is FileAttachmentAnnotation)

{

FileStream fs = new FileStream("attachment.xls", FileMode.Open, FileAccess.Read);

(annot as FileAttachmentAnnotation).File = new FileSpecification(fs, "updated-attachment");

}

}

doc.Save(“38039-out.pdf”);


Thank you for the response.
I have tested your code and it replaces only attachments that are linked to the document itself. The attachments that are stored in the Attachments section in the PDF and are not linked to the document are not replaced. See attached document.

Hi Tali,


Thanks for sharing the resource file.

Can you please share the input file which you have used to test the scenario and also please confirm if you have used the same code snippet as shared in earlier post because during my testing, I am getting corrupted output. We are sorry for your inconvenience.