February 14th, 2007
The first part of the Master Page Styles implementation is done and already checked in into the CVS repository. Now, you can set up the page properties like page orientation and the margins for the different page sides. The following code snippte will show you how to do this.
TextDocument document = new TextDocument();
document.New();
// you can modify the default Master Page Style
TextMasterPage txtMP =
document.DocumentStyles.TextMasterPageCollection.GetDefaultMasterPage();
// or you can query for other existing Master Page Styles
// e.g. document.DocumentStyles.TextMasterPageCollection.GetByStyleName(string styleName);
txtMP.TextPageLayout.MarginLeft = “6cm”;
txtMP.TextPageLayout.MarginRight = “6cm”;
txtMP.TextPageLayout.PageOrientation = “landscape”;
….
…
You can also access the page footer and header, but this part isn’t completed and full usable, up to now. Now, I will work on at this part to make it full usable as soon as possible. At least, I’ve also checked in the first attempt for image and table conversation for the PDF Exporter.
Posted in .net development, AODL and AODC | 3 Comments »
February 8th, 2007
Since I’ve promised you to implement also the page setup handling for the OpenDocument to PDF exporter for AODL I have to make a short stop with the PDF export implementation. I’ve decided to do this, because the OpenDocument master page handling in AODL is up to now very rudimentary, but for generating the PDF layout I will need nearly all of the info stored within the master pages elements of an OpenDocument file. Of course, this will result in a later release date for the PDF exporter, but it has the nice side effect that the next version of AODL will also offer an easy handling for master page styles. Since the different OpenDocument formats needs also different handlings the next AODL version will as a start only offer full support for master page styles in text documents. When this will be done I will went back to the PDF exporter implementation. I hope to finish this task within the next two or three days.
Posted in .net development, AODL and AODC | Comments Off
February 7th, 2007
During the last two days I was able to implement the image support. The images should be positioned well, whether with or no surrounding text parts and keeping possible resize info of embed pictures alive. Therefor I have extended the AODL ODF graphic implementation in this way that the object will also offer all necessary base info e.g. real size, dpi y, dpi x, … needed by a resize recalculating for PDF. This mean if an embed graphic in an OpenDocument file is resized this will be also the case in the PDF document. Additional to that I have also implemented the handling of page breaks und the layout transformation from DTP points to in and cm with regarding the DPI output resultion. Now, the PDF view is very near to the ODF view. Of course only for supported ODF objects. First parts are available through the CVS repsoitory. I hope to do another check in this evening.
Posted in .net development, AODL and AODC | Comments Off
February 4th, 2007
After a lot of coding for the PDF exporter add on for AODL this weekend I have reached the first running state for simple PDF table support. On the way to the simple table support I have also successfully implemented paragraphs, simple text, formated text, whitespaces, headings, fonts, font properties like color, bold, etc., paragraph styles, parent-style fallbacks and a simple support for tabstops. Whereas tabstops only will be simulated within the exporter, because they doesn’t exists in the PDF. Since it’s only a simple simulation without recalculating the real distances the conversation of a “tabstop layouted” area like simulating columns won’t offer an optimal result. However, I still hope to finish a first preview version for public download within this week. Next to the features which are already implemented I will also try to implement page properties like margin and orientation, simple graphic conversation and table layouts. For a demonstration about the possibilties of the PDF exporter I’m going to write a small application which could generate bills in the OpenDocument text and the PDF format. Any feedback is welcome ….
Posted in .net development, AODL and AODC | Comments Off
February 2nd, 2007
Due to the increasing number of questions for a PDF export feature for AODL.
I’ve decided to write a light weight PDF exporter for AODL vers. 1.x and started
last evening. After a few hours of programming a first PDF exporter implementation
was finished. Up to now, it could export all ITextContent (text) objects of an OpenDocument
text document to a PDF file. The PDF exporter will become an own assemblie and the exporter object can
be passed to the now overloaded SaveTo method of a IDocument objects. As you can see in the
following code snippet the usage is as simple as possible.
AODL.ExternalExporter.PDF.PDFExporter pdfExporter =
new AODL.ExternalExporter.PDF.PDFExporter();
AODL.Document.TextDocuments.TextDocument doc =
new AODL.Document.TextDocuments.TextDocument();
doc.Load("E:\MyDocuments\simple_text.odt");
doc.SaveTo("E:\MyDocuments\simple_text.pdf", pdfExporter);
Since it will be available as a seperat dll it don’t have to be deployed within a project
if it isn’t used. Also the possibility to pass an external exporter object to the overloaded
SaveTo method will give you the option to write your own exporter dll. Therefor you only
have to implement the IExporter interface of the AODL main dll. Since the early state
of implementation this dll isn’t available for download or through the CVS repository.
I hope to make a first alpha version available within the next week.
Posted in .net development, AODL and AODC | Comments Off