![]() 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) The PDF is inserted into the Word document. Open documentĪ pdfDocument = new (MyDir + "in.pdf") Click the Insert button to close the Browse window and click the OK button to close the Object window. Please read about converting Pdf pages into images from here: 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. Please check last parameter of InsertOleObject method.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |