I have just downloaded your AODL library an am starting to play with it. Do you have any tutorials or simple examples (other than what is on the front page of this website)?
Things I would very much like to see some examples of (roughly in order): -Formatted text -Inserting and placing a picture -Inserting a caption below a picture -Inserting a table
Thanks. It looks like this will be very useful. From ODF I can get to pretty much any format I need using OOo.
Brad
The administrator has disabled public write access.
Also you could do an anonymous CVS checkout. The source contains a folder with a lot of NUNIT tests.
Regards Lars
The administrator has disabled public write access.
Re:Tutorials
Date: 2007/01/26 21:20
By: Brad Campbell
Status: User
Karma: 0  
Junior Boarder
Posts: 9
Thanks. I hadn't actually found that page. I will check it out.
Brad
The administrator has disabled public write access.
Re:Tutorials
Date: 2007/01/27 01:37
By: Brad Campbell
Status: User
Karma: 0  
Junior Boarder
Posts: 9
Lars,
Those code snippets were very helpful. Thanks!
I am able to generate the documents I need. I would like to be able to combine/append several documents to together. I am having some difficulty with this though. Here is what I have tried:
Code:
System.IO.DirectoryInfo di = new System.IO.DirectoryInfo(this.WorkingDir);;
System.IO.FileInfo[] fi = di.GetFiles("*.odt");
TextDocument[] doc = new TextDocument[fi.Length];
TextDocument masterDoc = new TextDocument();
masterDoc.New();
int i = 0;
foreach (System.IO.FileInfo f in fi)
{
doc[i] = new TextDocument();
doc[i].New();
doc[i].Load(f.FullName);
foreach (IContent ic in doc[i].Content)
{
//ic.Document = (IDocument)masterDoc; //<--this didn't work
masterDoc.Content.Add(ic);
}
i++;
}
masterDoc.SaveAS("newfile.odt")
This code crashes on the SaveAs since the ContentCollection in masterDoc all have different contexts (are associated with the doc[i]'s and not masterDoc). Is there some way to do this?
Thanks again,
Brad
The administrator has disabled public write access.
Re:Tutorials
Date: 2007/01/27 01:50
By: Lars B
Status: Admin
Karma: 1  
Admin
Posts: 33
Hi Brad,
the import resp. moving contents between documents isn't implemented, yet. But it is possible with a little programming effort. Internal the content objects holds a xml node which is representing this content and before you can move this node into another document you have to import this node first. Otherwise you will get an exception while the xml nodes document owner is the document from which you get it. So you have first to import the node into the new document. This will change it's owner document. At least you can add it.
Regards Lars
The administrator has disabled public write access.