We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Extract Video/Audio Files from PDF document using Aspose.PDF for .NET

Hi, support,
Is there any method to extract audios/videos imbeded in pdf in order?
Thanks for your help!



If files are embedded in a PDF document as attachments, you can extract them using Aspose.PDF by following the instruction given in below article:

In case you still face any issue while achieving your requirements, please share your sample PDF with us. We will test the scenario in our environment and address it accordingly.

Thanks for your reference. But I fail to follow that instruction, would you please show me the demo how to extract all the embedded audios from a pdf?


As shared earlier, could you kindly share a sample PDF document with us. We will test the scenario in our environment and address it accordingly.

please refer to this pdf.
Seasons.pdf (4.8 MB)


Thanks for sharing sample PDF document.

We tried to extract the media files from it using following code snippet but API did not detect any media item.

Document pdfDocument = new Document(dataDir + "Seasons.pdf");
// Get particular embedded file
FileSpecification fileSpecification = pdfDocument.EmbeddedFiles[1];
byte[] fileContent = new byte[fileSpecification.Contents.Length];
fileSpecification.Contents.Read(fileContent, 0, fileContent.Length);

Therefore, we have logged an investigation ticket as PDFNET-47773 in our issue tracking system. We will look into details of the ticket and keep you posted with the status of its resolution. Please be patient and spare us little time.

We are sorry for the inconvenience.