
Shape shape = builder.InsertOleObject(stream, "AcroExch.Document. MemoryStream stream = new MemoryStream(File.ReadAllBytes(MyDir + "in.pdf")) Image image = Image.FromStream(imageStream) ĭocumentBuilder builder = new DocumentBuilder(doc) JpegDevice.Process(pdfDocument.Pages, imageStream)

Convert a particular page and save the image to stream Create JPEG device with specified attributes (Width, Height, Resolution, Quality)Ī jpegDevice = new (400, 600, resolution, 100) MemoryStream imageStream = new MemoryStream() Ī resolution = new (300) Open documentĪ pdfDocument = new (MyDir + "in.pdf") Click Insert > Object > Create from File. Please read about converting Pdf pages into images from here: Using the Insert Object Feature Open the Word document where you want to insert the PDF file. You can use Aspose.Pdf to convert the Pdf to image and use that image in InsertOleObject method.

If value is null Aspose.Words will use one of the predefined images. This is image presentation of OLE object. The PDF is inserted into the Word document.

Please check last parameter of InsertOleObject method. Click the Insert button to close the Browse window and click the OK button to close the Object window.
