Insert content of pdf document into word document

Hi,
my customer is using Aspose.Words for Java. They are already inserting word document and images in created word documents using mail merge fields and the Aspose mail merge feature.
Now they want to insert the content of a pdf document into a created Word document.
Is it possible to extract the content of a PDF document (including the formatting) using the Aspose.PDF for Java Suite and then inserting it into the Word document (including the original PDF format)?
If this is possible: Our customer is still using Java 6. Is as Aspose.PDF for Java 6 available?

Thanks in advance.

Best regards.

@SaschaRue,

Currently, InsertOleObject and InsertOleObjectAsIcon are the only methods available in DocumentBuilder class that you can use to embed PDF file in Word document. See the API reference pages, for example:

Moreover, if you extract PDF content using Aspose.PDF, then you need to use your own code to rewrite content in Word file using DocumentBuilder or other DOM classes.There may not be any built-in method/APIs that could transform/typecast Aspose.PDF objects into Aspose.Words objects and vice versa.

Alternatively, you may convert PDF to Word by using Aspose.PDF and then use InsertDocument method of Aspose.Words.

That seems like a viable method to do this. Is there a Java 6 version of Aspose.PDF available as we cant change the Java version.

@SaschaRue,

Yes, release archive of the APIs (Aspose.PDF for Java) does include JDK1.6 jar as well, You may download the API from Downloads/maven repos.

Thank you very much.
If I click on the link for the downloads, I only see one archive (zip) file to download. In this zip there is only 1 jar. Is this really the Java 6 version?
For the Aspose.Words download I was given another special link: Aspose.Words | Java Library to Process Document Formats

@SaschaRue,

You may download it using maven repos. here, there is separate jar for JDK1.6.

1 Like