I had a requirement of merging two inputstreams of word documents with aspose java
for that I am using
d1 = new com.aspose.words.Document(inputStream1);;
d2 = new com.aspose.words.Document(inputStream2);
InputStream in1 = new FileInputStream("E:\\temp\\in1.docx");
InputStream in2 = new FileInputStream("E:\\temp\\in2.docx");
Document doc1 = new Document(in1);
Document doc2 = new Document(in2);
doc1.appendDocument(doc2, ImportFormatMode.KEEP_SOURCE_FORMATTING);
OutputStream out = new FileOutputStream("E:\\temp\\out.docx");
doc1.save(out, SaveFormat.DOCX);
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.