Page 1 of 1

database

PostPosted: Tue Mar 29, 2011 4:39 pm
by suman
Hi Jason,
Is it possible to store the template file as a blob/clob so that i can retrieve the file from the db and replace the retrieved template file's place holders with dynamic text values.(Headers also included in this approach).Does wordProcessingMl support this functionality.Can you please let me know if this is possible.
thanks in advance.
suman..

Re: database

PostPosted: Wed Mar 30, 2011 12:45 am
by jason
I've split this into a new topic - please create new topics when you start a new subject. Also, did you solve your problem in the other thread? If so, I'd appreciate it if you updated the other
thread to let us know. Thanks.

suman wrote:s it possible to store the template file as a blob/clob so that i can retrieve the file from the db


You can load a docx into docx4j from an input stream (no need to save a temp file in the file system first in order to do this).

suman wrote:replace the retrieved template file's place holders with dynamic text values.(Headers also included in this approach).Does wordProcessingMl support this functionality.


WordML faciliates this via legacy form fields, content control custom xml databinding (recommended), or low tech search/replace.

You can use any of these 3 approaches via docx4j, but all other things being equal, i'd recommend content control custom xml databinding (see the subforum on this topic).

cheers .. Jason

Re: database

PostPosted: Thu Mar 31, 2011 4:37 am
by suman
Hi Jason,
Can you please explain it in simple words.
I can understand that we can load a the template document as a blob. but i am not able to save the template as a blob object in the database.It says xmls not found. Do i need to load the xmls also.I am not able to get pointers for this.
Im sorry if my doubt is very simple.Can you please tell me how to save the template as a blog.

thanks

Re: database

PostPosted: Thu Mar 31, 2011 8:38 am
by jason
SaveToZipFile.save takes an OutputStream as an argument.

How do you interact with your database? What is it, by the way?

Re: database

PostPosted: Thu Mar 31, 2011 3:56 pm
by suman
Hi Jason,
Our requirement is not to store the template in the file system. It has to be store in the database so that given the id we can what template we want and work on it(edit). need not store the edited one back again in the db.trying to store it as a blob but not sure how to do this.

thanks

Re: database

PostPosted: Thu Mar 31, 2011 3:58 pm
by suman
Sorry missed this point in the previous post. It thro hibernate we interact with the database.