PDF to Word and mail merge

I have a binary data (not file path) of pdf file. I need to mail merge it into document.
How can I do it? Please help.

Thanks for your request. It is not quite clear for me what you would like to achieve. Could you please explain more specific? Do you need to convert PDF to Word or to insert PDF document into Word document as OLE embedded object?
Best regards.

Stream dstStream dstStream = new MemoryStream((byte[])dt.Rows[0]["BinaryPDF"]);

Now I need to mailmerge this pdf data into merge field of document. Please help.
Note: we purchased the total package of Aspose but it did not include PDF recognition. I downloaded recognition and used but it shows “Evaluation”.


Thanks for your request. I think you can try using the following code:

// Read PDF to stream
byte[] pdfBytes = File.ReadAllBytes(@"Test080\in.pdf");
MemoryStream pdfStream = new MemoryStream(pdfBytes);
// Create recognizer and open PDF from strem
Aspose.Recognition.PdfRecognizer recognizer = new Aspose.Recognition.PdfRecognizer(Aspose.Recognition.RecognitionMode.Flow);
// Save recognized document into memorystream
MemoryStream docStream = new MemoryStream();
recognizer.Save(docStream, Aspose.Recognition.SaveFormat.Doc);
// Now we can create Aspose.Words.Document from stream and insert it at mergefield.
Document srcDoc = new Document(docStream);
// Open a template and create DocumentBuilder
Document doc = new Document(@"Test080\in.doc");
// Documentbuilder is needed to move cursor to the mergefield
DocumentBuilder builder = new DocumentBuilder(doc);
// Move cursor to mergefield
// Insert Document
InsertDocument(builder.CurrentParagraph, srcDoc);
// Save output document

InsertDocument method you can find here:
I think you should consult with our sales team (in Aspose.Purchase forum) regarding Total license and ask why Aspose.Recognition is not included to Aspose.Total.
Best regards.