Problem with extracting embedded PDF from PPT

I tried version 2.6.13.0, I still seem to have the same issue, I noticed that version 2.6.13.0 has the same file size as 2.6.12.0, could you check if the new version is uploaded?

Thanks!

Dear becky_bai,

I found out that this is not a version problem, actually it depends how we insert PDF document inside the PowerPoint presentation.

For example, in the attached archive, you will find two PPT files, one is yours, which does not work but the other is mine which extracts the PDF fine.

I inserted your Hello.pdf document inside my presentation using these steps,

[insert] – > [Object] – > [Object Type Adobe Acrobat 7.0]

I am using PowerPoint 2003. Further, which Adobe Acrobat version you are using. Have you tested other PDF documents? Do they also cause such a problem?

This is my code.

void ExtractPDF()
{
    //This won't work
    //Presentation srcPres = new Presentation("testEmbedded.ppt");
    //But this works fine
    Presentation srcPres = new Presentation("testEmbedded2.ppt");
    Slide fstSlide = srcPres.GetSlideByPosition(1);
    OleObjectFrame oleObjFrm = fstSlide.FindShape("PDFObject") as OleObjectFrame;

    using (BinaryWriter writer = new BinaryWriter(File.Open("PDFDoc.pdf", FileMode.Create)))
    {
        writer.Write(oleObjFrm.ObjectData);
    }
}

Dear becky_bai,

I found out that this is not a version problem, actually it depends how we insert PDF document inside the PowerPoint presentation.

For example, in the attached archive, you will find two PPT files, one is yours, which does not work but the other is mine which extracts the PDF fine.

I inserted your Hello.pdf document inside my presentation using these steps,

[insert] – > [Object] – > [Object Type Adobe Acrobat 7.0]

I am using PowerPoint 2003. Further, which Adobe Acrobat version you are using. Have you tested other PDF documents? Do they also cause such a problem?

This is my code.

void ExtractPDF()
{
    //This won't work
    //Presentation srcPres = new Presentation("testEmbedded.ppt");
    //But this works fine
    Presentation srcPres = new Presentation("testEmbedded2.ppt");
    Slide fstSlide = srcPres.GetSlideByPosition(1);
    OleObjectFrame oleObjFrm = fstSlide.FindShape("PDFObject") as OleObjectFrame;

    using (BinaryWriter writer = new BinaryWriter(File.Open("PDFDoc.pdf", FileMode.Create)))
    {
        writer.Write(oleObjFrm.ObjectData);
    }
}

The ppt you created has the pdf inserted as an image (by the way, how did you do that, I can't seem to do it), I inserted the pdf as an icon and I insert it using Insert->Create from file, then choose an existing file.

I am using Powerpoint 2003 sp2, and Acrobat 6.0 standard.

I tested using the pdf you gave me to insert into a ppt, I can't extract it properly either, so I guess it is not a pdf issue.

I attached another test, the embedded pdf is not created by me. Can you take a look to see whether it works for you?

Or maybe it is the case that if embed pdf as image as you did, extract will work fine, but if embed as icon, it won't?

Thanks for looking into this.

Dear becky,

I will report this problem. If PDF document is in the form of image, it can be extracted but when it is in the form of icon, it gets corrupted during extraction.

Can you tell me, how do you insert PDF document as an icon? Because when I insert, it is inserted as an image.

Here is what I did: Insert -- >Object --> Create from file --> Select a file and then check the "Display as Icon" checkbox.

I will check back the forum daily, whenever you know please let me know the estimated time of this fix.

Thank you!

Is there an estimated date of this fix yet? Thanks!

Dear becky,

The estimated time is either this weekend or the next weekend.

I see there is a new version out, I tried and it fixes the problem.

Thanks! Really impressed by how responsive you guys are!

This is a new question regarding extracted embedded object.

The scenario is: I embed a text file in a PPtdoc, and then I extracted it using Aspose.Slides, then I use text editor to view the extracted text file, it shows the text but with unrecognized characters around it. Is their a way to cleanly extract the text file?

I have attached the Ppt doc and the extracted text file (I gave it extension of "unknown").

The text file embedded: TextFileToEmbed.txt

The Ppt doc: TestSlide.ppt

The extracted file: TestSlide_0.txt

Thanks!