Embedding Mp3 files in pdf

Hello,


Is it possible to embedded music files within pdf using this kit.

if yes please let me know …


Thanks,
Deepak

Hi Deepak,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.Pdf.

I am afraid your required feature of embedding Mp3 file to PDF documents is not support at the moment. I have registered this feature as new feature request in our issue tracking system with issue id: PDFNEWNET-31727. Our development team will investigate this feature further and see if it can be support in our future release. We will update you via this forum thread in case of any update against your requested feature.

Sorry for the inconvenience,

Hello,



Thanks for reply. I am waiting for that feature :slight_smile: . i hope you will release it soon.

Thanks One again.


Deepak

Hi Deepak,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Currently, Aspose.Pdf for .NET supports adding MP3 files as attachements in PDF document. Please see the following sample code in this regard:

/* general embedding, using facades */

PdfContentEditor editor = new PdfContentEditor();

editor.BindPdf("pdf.pdf");

editor.AddDocumentAttachment("mp3.mp3", "MP3");

editor.Save("pdf+mp3.pdf");

/* general embedding, using DOM */

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

FileSpecification fs = new FileSpecification("mp3.mp3", "MP3");

doc.EmbeddedFiles.Add(fs);

doc.Save("pdf+mp3.pdf");

/* file attachment annotation, using facades */

PdfContentEditor editor = new PdfContentEditor();

editor.BindPdf("pdf.pdf");

editor.CreateFileAttachment(new System.Drawing.Rectangle(0, 0, 100, 100), "MP3", "mp3.mp3", 1, "Paperclip");

editor.Save("pdf+mp3.pdf");

/* file attachment annotation, using DOM */

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

Page firstPage = doc.Pages[1];

FileSpecification fs = new FileSpecification("mp3.mp3", "MP3");

FileAttachmentAnnotation fileAnnot = new FileAttachmentAnnotation(firstPage, new Rectangle(0, 0, 100, 100), fs);

firstPage.Annotations.Add(fileAnnot);

doc.Save("pdf+mp3.pdf");

Please check the sample code and see if it fits your needs. If you have a different requirement, please provide us some further information and it will be better if you can share a sample PDF document with us to give us better understanding of your requirement.

Thank You & Best Regards,

The issues you have found earlier (filed as 31727) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.