![]() ![]() 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) You can import some part of text from your PDF file by using the Insert Object tool and paste the text in Word file, but it cannot copy the original formatting. ![]() 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") 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. Turning PDF files into Word documents is the easiest way to edit the original text without having to buy expensive PDF editing software. ![]() This is image presentation of OLE object. Please check last parameter of InsertOleObject method. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |