Merging pdf doc into a word doc

Hi,

I would like to merge the contents of an existing pdf on the filesystem into a aspose.word word document I have created in memory and will subsequently save. I would appreciate a code snippet for same,
Note, I intend to save the word document in word and/or pdf format,

thanks,

Brian

Hi

Thanks for your inquiry. Aspose.Words does not work with PDF documents; it works only with MS Word documents. As a variant, you can convert your Word document to PDF and after that merge main PDF document, in this case you should use Aspose.Words to convert documents to PDF and Aspose.Pdf.Kit to concatenate PDFs.
Best regards,

Hi,

thanks for your reply. The proposed solution might be too cumbersome, I have to merge in 0 to 20 pdf files, and at very specific points in the main document. Is it possible to use aspose.pdf to convert the pdf files to word, and then use aspose.word to merge?

thanks,

Brian

Hi Brian,

Thanks for your request. No of Aspose products support PDF to Word converting. But if it is acceptable for you, you can convert PDF document to an image, using Aspose.Pdf.Kit, then insert this image to word document and then convert this document to PDF again.
Best regards,

Hi,

thanks for your reply. Your suggestion might be a viable option. Do you have a code snippet for same?

thanks,

Brian

Hi

Thanks for your inquiry. Please follow this link to see how to convert the PDF document to specified images using Aspose.Pdf.Kit:
https://docs.aspose.com/pdf/net/convert-pdf-to-images-format/
Also please see the following link to learn how to insert an image into the document using Aspose.Words:
https://reference.aspose.com/words/net/aspose.words/documentbuilder/insertimage/
Best regards,

Hi there,
Just incase you haven’t heard, The latest version of Aspose.Pdf now provides direct PDF to DOC conversion which preserves document elements as editable.
Please see the page here for details: https://docs.aspose.com/words/net/convert-a-document-to-pdf/
Thanks,