I’ve been struggling along with trying to insert a PDF file into the PPT for some time (in any form, embedded icon and click through to Acrobat is fine) and it’s now become a critical issue for us, so I decided to investigate more thoroughly…
It seems that if I load a presentation containing a manually embedded PDF file, I can locate the OleObjectFrame, call getObjectData() on it and create a new presentation containing the same PDF by using that byte array. All works fine.
So, this lead me to wonder why I couldn’t add my own PDF files to a presentation when Word, Excel and pictures all work fine. So, I tried dumping out the byte array to disk and comparing it to the PDF that had been embedded.
To me, it looks like the byte array has some kind of OLE header that’s 4k long (including a copy of the objectName, objectClassName etc) and some padding at the end (to make it’s length a multiple of 256/512/1024/2048/4096?)
Is this OLE header something that Aspose PPT already processes? Shouldn’t setObjectData automatically wrap a bytestream in the appropriate header? Do you have any links that describe the format of this header?
I also found this link which suggests that it might be an internal-to-powerpoint object serialisation header:
http://groundside.com/blog/DuncanMills.php?m=200408