Load PDF into Aspose.Words' DOM using .NET

Hi, I’m currently evaluating Aspose.Words, and as of now everything worked quite nice but I got a problem with pdfs. While trying to merge two documents into a one (doc to doc works but pdf to doc not), the pdf just fails to load and throws an com.aspose.words.UnsupportedFileFormatException

Hello
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 with main PDF document, in this case you should use Aspose.Words to convert docuemnts to PDF and Aspose.Pdf.Kit to concatenate PDFs.
Best regards,

Ok, thank you, I will try that.

@michael.e

The latest version of Aspose.Words does support import of PDF. Please install the latest version of Aspose.Words for .NET through NuGet and load the PDF as shown below.

Document doc = new Document("input.pdf");