Zip attachments being extracted as Packager Shell Objects

Hi,


I’m trying to extract the attachments out of a pptx file. It has two zip attachments in it. Both are being extracted as Packager Shell Objects. I’m recognizing them with OleObjectFrameEx object and taking the properties out of it.

How do I get the exact zip attachment out of the pptx? I’m attaching the same ppt that I have been using for your reference.

Please let me know.

Thanks,
John.

Hi John,


I have tried to understand the issues shared by you and unfortunately have not been able to completely understand the requirement shared by you. Can you please elaborate them for my reference. However, I have still extracted the presentation using WinRar and have shared the extracted presentation for your kind reference.

Many Thanks,

Hi Mudassir,


I’m using Aspose slides library to open the pptx file and extract its properties, metadata and attachments. For the file that I have previously provided, I should be able to extract the properties, body and as well as the two zip files that the document have as attachments.

I’m able to extract the properties and text out of the file, but the attachments are being extracted and saved as Packager Shell Objects, which is rising further problems with accessing that file in the right way(as zips). It couldn’t save the attachments as zips and even if I give them the ‘.zip’ extensions, the files are unable to be opened.

We are using OleObjectFrameEx to recognize the shape as attachments and further save them at some particular location. From that location we are not able to open/access the file as any other regular file for further analyzing the file.

I’m looking for a way to extract the attachments with out loosing their original structure/kind of file(zip as zips, doc as docs).

Please let me know if need any further clarification.

Appreciate your assistance,
John.

Hi John,


I have worked with the requirements shared by you and have generated the sample project that you may use to extract the zip files attached inside your presentation. I am able to extract the zip file out of presentation successfully. Please share, if I may help you further in this regard.

Many Thanks,

Hey Mudassir,


I’m following exactly the same process as you are for extracting the attachments. Even the attachments that you have provided with your sample are also not being recognized as zip files. I believe once the zip file goes to ppt, the extracted zip is not coming out as the original zip file.

I have attached the screen shot of the error that I’m getting when I try to open this file. When I open the original zips that I used as attachments in pptx, they open fine with Windows Explorer. If I try to open the extracted zip files out of that pptx, it gives the error with Windows Explorer.

This is causing my program to mark these files as unknow files and further not able to extract files out of these zip files. Please let me know what could be a possible solution to not make these zip attachments out of pptx as corrupted files using Aspose. This can be also an error on pptx part, may be making the zips corrupt.

Thanks,
John.

Hi John,


That is strange that you are not even able to open the zip files that I have shared with you in my sample project. I am still able to extract the zip files using WinRar successfully with no issue. For your further kind reference, I have also shared extracted zip files. You can observe them. Have you tried WinRar. Please use WinRar and if you still feel issue then please also share the original zip files that you added in the source presentation. We may then compare them. You can still verify my output as well. Please note that the shared files are actually extracted and then compressed again in RAR format for sharing in forum.

Many Thanks,

Mudassir,


I can open them with WinRar as well. But they are zipped files by windows, so a windows explorer must be able to open them when you double click the file. Try opening the extracted attachments with windows explorer(don’t use WinRar to open the files).

I tested this scenario a bit more. Try zipping a folder through windows, right click -> send to -> compressed. When you double click the folder, a windows explorer window will show all the files in that zip. Then attach them to any ppt. And now try to extract them and open them with windows. This is when I get the error.

I want files to be in its original format as they were while being attached to the pptx. Like, my windows explorer should be able to open in a explorer window showing the contents of the zipped file. This is really a very strange case.

Please let me know, if you need any elaboration.

Thanks,
John.

Hi John,


I have observed the issue that Windows Explorer failed to extract the generated zip files. An issue with ID 32874 has been created in our issue tracking system to further investigate and resolve this issue. This thread has been linked with the issue so that you may be automatically notified once the issue is resolved. Just for sake of assurance and to be on same page, below please find the issue details that I have perceived from our conversation so far.

  • Place files in folder and then zip them using window explorer. (Right clicking folder->Send to-> Compressed Zip
  • Add the compressed files in PPTX and saved that
  • Access presentation using Aspose.Slides for .NET to extract the zip file out of presentation
  • The attachments are read as Ole frame and are extracted successfully
  • The extracted zips from ole frames are saved in files using file streams
  • The newly extracted zip files are successfully extracted using Win Rar
  • The issue is that it you are failing to extract the zip files using Windows explorer

Many Thanks,

Mudassir,


Yes. The issue is correct and since the files are becoming incapable of opening with Windows Explorer, these files are being recognized as non-zip files.

I appreciate your assistance and for creating an issue.

Thanks,
John.