tabadx.blogg.se

Insert pdf into word document as image
Insert pdf into word document as image








insert pdf into word document as image

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")

insert pdf into word document as image

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.










Insert pdf into word document as image