Hi,
1. http://openxmldeveloper.org/forums/thread/1791.aspx
2. The .bin is your PDF file. I don't really know how Word converts the PDF file into a binary file when you insert it in a document. Maybe these links could help you understand (never read it myself) :
http://www.codeproject.com/KB/cs/office2007bin.aspx
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=3642085&SiteID=1
Maybe this could help :
using (WordprocessingDocument test = WordprocessingDocument.Open("C:\\testOleObject.docx",true))
{
MainDocumentPart mainpart = test.MainDocumentPart;
EmbeddedObjectPart embed = mainpart.AddEmbeddedObjectPart("
application/vnd.openxmlformats-officedocument.oleObject");
Stream fileStr = (Stream)File.Open("
C:\\MyPDFFile.pdf", FileMode.Open);
Stream partStream = embed.GetStream();
const int size = 4096;
byte[] bytes = new byte[4096];
int numBytes;
while ((numBytes = fileStr.Read(bytes, 0, size)) > 0)
partStream.Write(bytes, 0, numBytes);
}
Regards