You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by gummadi krishna <kr...@yahoo.co.in> on 2010/10/28 13:42:15 UTC

Re: Embeed word docs

As an alternative what i tired is to get the content of the other word document as a CTBody object and append it to the new word document using 
addNewBody() method of CTdocument class . As a result when i open the word i see the new contant appended to the old correctly but is getting appended at the end of same page. How can i make sure that new body appended can always be seen on a new page when i open a word ? Currently the new body is getting apended at athe end of the same page .

cheers

--- On Thu, 28/10/10, Nick Burch <ni...@alfresco.com> wrote:

> From: Nick Burch <ni...@alfresco.com>
> Subject: Re: Embeed word docs
> To: "POI Users List" <us...@poi.apache.org>
> Date: Thursday, 28 October, 2010, 2:39 PM
> On Thu, 28 Oct 2010, gummadi krishna
> wrote:
> > Is there a possibility to embeed two word documents in
> to a separate word document using poi ?
> 
> It might be possible, but it'd be a very large amount of
> work...
> 
> What wouldn't be too bad is if you created a template with
> two simple word documents in. You could then use POIFS to
> copy in the details of your real word docs over the top of
> the already setup POIFS subdirectories for the embedded
> files. You might also need to zap the cached image rendering
> of the docs so it gets re-created, deleting the entry from
> the pictures table might do that but I've not tried it
> 
> Nick
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Embeed word docs

Posted by OKA Yoshitake <CB...@nifty.com>.

To append new page,
"body->SectPr"Tag ( CTBody.getSectPr() ) must be moved to
"body->p->pPr->SectPr". ( CTBody.addNewP().addNewPPr().addNewSectPr() )

I attach sample.(but this sample merge two body to one body)

Yoshitake

(2010/10/28 20:42), gummadi krishna wrote:
> As an alternative what i tired is to get the content of the other word document as a CTBody object and append it to the new word document using
> addNewBody() method of CTdocument class . As a result when i open the word i see the new contant appended to the old correctly but is getting appended at the end of same page. How can i make sure that new body appended can always be seen on a new page when i open a word ? Currently the new body is getting apended at athe end of the same page .
>
> cheers
>
> --- On Thu, 28/10/10, Nick Burch<ni...@alfresco.com>  wrote:
>
>> From: Nick Burch<ni...@alfresco.com>
>> Subject: Re: Embeed word docs
>> To: "POI Users List"<us...@poi.apache.org>
>> Date: Thursday, 28 October, 2010, 2:39 PM
>> On Thu, 28 Oct 2010, gummadi krishna
>> wrote:
>>> Is there a possibility to embeed two word documents in
>> to a separate word document using poi ?
>>
>> It might be possible, but it'd be a very large amount of
>> work...
>>
>> What wouldn't be too bad is if you created a template with
>> two simple word documents in. You could then use POIFS to
>> copy in the details of your real word docs over the top of
>> the already setup POIFS subdirectories for the embedded
>> files. You might also need to zap the cached image rendering
>> of the docs so it gets re-created, deleting the entry from
>> the pictures table might do that but I've not tried it
>>
>> Nick
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
>> For additional commands, e-mail: user-help@poi.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>