Sign in Join
Wiki copytemporary

fpvectorial - Text Document Support: what changed

Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11# fpvectorial - Text Document Support
22
33## About
44
55The [[fpvectorial]] library can be used to create formatted text files in a variety of file formats. Current file support includes Open Document XML (odt) and Open Office XML (docx). The files can be opened in a variety of products including Microsoft Office, OpenOffice and LibreOffice.
66
77As the name suggests, the FPVectorial library was originally created solely as a vector based image library. Support for creating documents was added to FPVectorial as the existing architecture already had the concept of a Document containing Pages, and it's architecture was easily extendable. Document support was added beside the existing image handling classes. Vector based images are differentiated from office documents by the type of page added to TvVectorialDocument.\
88
99At this time, two different pages can be added to TvVectorialDocument:
1010
1111- *TvTextPageSequence*: This is used by all Office Document writers.
1212- *TvVectorialPage*: This is used for Vector Image writers, and is currently ignored by the office document writers.
1313
1414Currently there are two Office Document writers.
1515
1616- *TODTVectorialWriter.pas*: for producing .odt files suitable for opening in OpenOffice and LibreOffice
1717- *TDOCXVectorialWriter*: for opening files in Microsoft Office 2007 onwards.
1818
1919Instead of focusing on the requirements of each individual file format, Office Document support inside FPVectorial was added by creating and implementing a Document Class Hierarchy. It is then up to each individual reader and writer to interpret this class hierarchy.\
2020
2121**Alternative Library - fpOdf**\
2222If you want to produce an ODT file by concentrating on the File Format, then the fpOdf library implemented by **dgaspary** and made available on the forums is recommended. This allows fine control when creating an ODT file, including many options not provided by FPVectorial - Document Support. A deeper understanding of the file format specification is required when using fpOdf; this complexity is hidden when using FPVectorial.\
2323**Forum Link:** [Topic: fpOdf - Creating and modifying OpenDocument ODF files with freepascal](http://forum.lazarus.freepascal.org/index.php/topic,21868.msg128463.html#msg128463)\
2424
2525### License
2626
2727[Modified](http://svn.freepascal.org/svn/lazarus/trunk/COPYING.modifiedLGPL.txt) [LGPL](http://svn.freepascal.org/svn/lazarus/trunk/COPYING.LGPL.txt) (same as FPC RTL and Lazarus LCL).\
2828
2929## Download
3030
3131fpvectorial comes in the Lazarus SVN, in the directory components/fpvectorial:
3232
33-`svn co `[`http://svn.freepascal.org/svn/lazarus/trunk/components/fpvectorial`](http://svn.freepascal.org/svn/lazarus/trunk/components/fpvectorial)` fpvectorial`
33+```text
34+svn co http://svn.freepascal.org/svn/lazarus/trunk/components/fpvectorial fpvectorial
35+```
3436
3537See also [[fpvectorial]]\
3638
3739## Hello World Example
3840
3941The following code will produce a "Hello World" document. As no styles are defined, it is entirely up to the program used to open the resulting files (Microsoft Word, LibreOffice Write etc) to determine font and font size...
4042
4143``` pascal
4244Program HelloWorld;
4345
4446{$mode objfpc}{$H+}
4547
4648Uses
4749 fpvectorialpkg, fpvectorial;
4850
4951Var
5052 Document: TvVectorialDocument;
5153 Page: TvTextPageSequence;
5254 Paragraph: TvParagraph;
5355
5456Begin
5557 Document := TvVectorialDocument.Create;
5658 Try
5759 Page := Document.AddTextPageSequence;
5860 Paragraph := Page.AddParagraph;
5961 Paragraph.AddText('Hello World!');
6062
6163 Document.WriteToFile('Hello_World.docx', vfDOCX);
6264 Document.WriteToFile('Hello_World.odt', vfODT);
6365 Finally
6466 Document.Free;
6567 End;
6668End.
6769```
6870
6971== Basic Concepts ==
7072
7173### General
7274
7375- A single FPVectorial Document (TvVectorialDocument) consists of a series of Page Sequences.
7476- Each Page Sequence can have it's own Header and Footer, and it's own Page Setup (size, orientation)
7577- Text, Tables, Images are added to the Page Sequence. In this way the document is built up.
7678- FPVectorial has no concept of how many pages are in a document, only the number of Page Sequences. A large multipage document may only have a single Page Sequence.
7779- A single Page Sequence can have multiple Paragraphs added.
7880- Headers and Footers are built up in an identical manner to a Page Sequence.
7981- TvVectorialDocument is responsible for freeing any entity added using the .AddXXX calls.
8082
8183### Formatted Text
8284
8385- Text is added inside Paragraphs (TvParagraph).
8486- Paragraphs consist of multiple text runs or document fields. A single Paragraph can have a single Paragraph Style. Each text run can have an optional Text Style applied (allowing, for instance, the bolding of individual words in a paragraph).
8587- All Paragraph and Text Styles must be defined before being used.
8688- FP Vectorial supports style inheritance.
8789- Microsoft Office, OpenOffice and LibreOffice allow only partial styles to be defined, though each office implements its own different set of defaults for any missing properties. If it is critical that the document look identical in each of the Office Suites, then the Styles should be fully defined.
8890- A default set of Styles can be added to the FP Vectorial Document by calling AddStandardTextDocumentStyles.
8991- Headings are Paragraph Styles, with additional properties covering Heading Level and numbering
9092
9193### Document Fields
9294
9395- Document Fields are added as TvField to Paragraphs via .AddField(AKind : TvFieldKind) : TvField
9496- Currently 5 simple fields are supported: vfkNumPages, vfkPage, vfkAuthor, vfkDateCreated, vfkDate
9597- fpvectorial holds no concept of current page or page count (only Page Sequences, which are separated by Section Breaks). Best guess values will therefore be added to the document during creation. The values can be updated in Microsoft Word by Selecting All, then pressing F9 (update fields). LibreWriter appears to automatically update the fields to correct values when opening the document.
9698- Numeric Fields can be formatted via TvField.NumberFormat as Decimal, lowercase/uppercase Roman or lowercase/uppercase Alphabetic
9799- Date Fields can be formatted cia TvField.DataFormat. Default value is 'd/MM/yyyy h:mm am/pm'
98100
99101### Tables
100102
101103- Tables are centered around TvTable
102104- A TvTable consists of a collection of rows.
103105- Table rows consist of a collection of cells.
104106- Tables can add optional column information. This must be provided if merged cells are being used.
105107- Any Table Cell can support any document object, including multiple paragraphs, images and even nested Tables.
106108
107109### Lists
108110
109111- Lists are centered around TvList.
110112- Each TvList can either have a TvParagraph added, or a child TvList (which is how we get deeper levels).
111113- Each TvList has both a TvStyle (which determines the default TvParagraph text appearance) and a TvListStyle (which determines the list behaviour).
112114- Each TvListStyle holds a list of TvListLevelStyle.
113115- Each TvListLevelStyle defines how each different level of the list behaves.
114116- Each List can be bulleted, or numbered.
115117- Supported numbering: Decimal, lowercase Roman, uppercase Roman, lowercase Alphabet, uppercase Alphabet.
116118- When dealing with numbered lists: Lists can be prefixed with single identifier (ie 1.) or numeric identifiers for all levels to date (ie 1.1.1.1.). This is handled through a boolean TvListLevelStyle.DisplayLevels.
117119- Two list styles are predefined in AddStandardFormats. StyleBulletList and StyleNumberList. Interestingly, the design for both docx and odt file formats (and consequently for fpvectorial) allow for a mixing of different list definitions within a list. So you can create a list that uses a mixture of the predefined StyleBulletList and StyleNumberList.
118120
119121## Roadmap
120122
121123| Functionality | OpenDocument (ODT) | Office Open XML (DOCX) |
122124|----|----|----|
123125| File Version | ODT 1.2 with extensions | ECMA-376 1st Edition (2006) |
124126| Supported Style Types | Paragraph and Text-Span | Paragraph and Text |
125127| Table Support | Yes | Yes |
126128| List Support | Yes | Yes |
127129| Multiple Headers/Footers | Not yet | Yes |
128130| Tables in Header/Footer | Not yet | Not tested |
129131| Image Support | Not yet | Not yet |
130132| Images in Header/Footer | Not yet | Not yet |
131133| FPVectorial Image Support | Not yet | Not yet |
132134| Tab Stops | Not yet | Not yet |
133135| Document Fields | Yes | Yes |
134136| Meta Data | Partially Implemented | Not yet |
135137| Table of contents | Not planned | Not planned |
136138| Footnotes | Not planned | Not planned |
137139| Review/Revision | Not planned | Not planned |
138140| Bookmarks / Hyperlinks | Not planned | Not planned |
139141| Comments | Not planned | Not planned |
140142| Formulas | Not planned | Not planned |
141143
142144## Code Examples
143145
144146### Styles
145147
146148This example uses both the default styles that can be added to TvVectorialDocument via AddStandardTextDocumentStyles, and a Text-Span style added specifically to TvVectorialDocument. Text-Span styles should not be applied to Paragraphs, only to individual Text Spans within a Paragraph.
147149
148150``` pascal
149151Uses
150152 fpvectorialpkg, fpvectorial;
151153
152154Var
153155 Document: TvVectorialDocument;
154156 Page: TvTextPageSequence;
155157 Paragraph: TvParagraph;
156158 BoldTextStyle: TvStyle;
157159
158160Begin
159161 Document := TvVectorialDocument.Create;
160162 Try
161163 // Adds the defaut Paragraph Styles
162164 // StyleTextBody, StyleHeading1,
163165 // StyleHeading2 & StyleHeading3
164166 Document.AddStandardTextDocumentStyles(vfUnknown);
165167
166168 // Add our own Style
167169 BoldTextStyle := Document.AddStyle();
168170
169171 BoldTextStyle.Kind := vskTextSpan;
170172 BoldTextStyle.Name := 'Bold';
171173 BoldTextStyle.Font.Bold := True;
172174 BoldTextStyle.SetElements := BoldTextStyle.SetElements + [spbfFontBold];
173175
174176 // Create the Document
175177 Page := Document.AddTextPageSequence;
176178 Paragraph := Page.AddParagraph;
177179 Paragraph.Style := Document.StyleTextBody;
178180
179181 // Add Hello World as two text spans within the same paragraph,
180182 // and make 'World' bold
181183 Paragraph.AddText('Hello ');
182184 Paragraph.AddText('World!').Style := BoldTextStyle;
183185
184186 Document.WriteToFile('Hello_World.docx', vfDOCX);
185187 Document.WriteToFile('Hello_World.odt', vfODT);
186188 Finally
187189 Document.Free;
188190 End;
189191End.
190192```
191193
192194![](/wiki-images/4/45/FPVectorial_-_Document_Support_-_Hello_World.png)
193195
194196### Simple Table
195197
196198This example adds a 5 column table to the Document. The first two rows are designated as Header Rows (rows which repeat at the top of each page). These header rows then have a grey background shading applied, and the text is bolded.
197199
198200The very first row contains examples of merging cells. Only 3 cells are added, with the last two cells spanning two columns each (set via .SpannedCols).
199201
200202``` pascal
201203program SimpleTable;
202204
203205{$mode objfpc}{$H+}
204206
205207uses
206208 fpvectorialpkg,
207209 fpvectorial,
208210 fpvutils, // For RGBToFPColor()
209211 SysUtils;
210212
211213var
212214 Document: TvVectorialDocument;
213215 Page: TvTextPageSequence;
214216 Paragraph: TvParagraph;
215217 BoldTextStyle: TvStyle;
216218 CenterStyle: TvStyle;
217219 Table: TvTable;
218220 Row: TvTableRow;
219221 Cell: TvTableCell;
220222 iRow: Integer;
221223 iCol: Integer;
222224
223225const
224226 // Most dimensions in FPVectorial are in mm. If you want to specify
225227 // anything in other units, be ready to do the conversion...
226228 ONE_POINT_IN_MM = 0.35278;
227229
228230begin
229231 Document := TvVectorialDocument.Create;
230232 try
231233 // Adds the defaut Paragraph Styles
232234 // StyleTextBody, StyleHeading1,
233235 // StyleHeading2 & StyleHeading3
234236 Document.AddStandardTextDocumentStyles(vfUnknown);
235237
236238 // Add our own Style for bolded text elements
237239 BoldTextStyle := Document.AddStyle();
238240 BoldTextStyle.Kind := vskTextSpan; // This style will only be applied to selected Text Spans
239241 BoldTextStyle.Name := 'Bold';
240242 BoldTextStyle.Font.Bold := True;
241243 BoldTextStyle.SetElements := BoldTextStyle.SetElements + [spbfFontBold];
242244
243245 // Add our own style for centered paragraphs
244246 CenterStyle := Document.AddStyle();
245247 CenterStyle.Kind := vskTextBody; // This style will be applied to the whole Paragraph
246248 CenterStyle.Name := 'Table Body Centered';
247249 CenterStyle.Font.Name := 'Verdana';
248250 CenterStyle.Font.Size := 8;
249251 CenterStyle.Alignment := vsaCenter;
250252 CenterStyle.MarginTop := 2 * ONE_POINT_IN_MM;
251253 CenterStyle.MarginBottom := 2 * ONE_POINT_IN_MM;
252254 CenterStyle.SetElements :=
253255 [spbfFontSize, spbfFontName, spbfAlignment, sseMarginTop, sseMarginBottom];
254256
255257 // Create the Document, and add a simple Heading
256258 Page := Document.AddTextPageSequence;
257259 Paragraph := Page.AddParagraph;
258260 Paragraph.Style := Document.StyleHeading1;
259261 Paragraph.AddText('Simple Table');
260262
261263 // Add our Table, which will have 5 columns
262264 Table := Page.AddTable;
263265 Table.PreferredWidth := Dimension(100, dimPercent);
264266
265267 // As we will be merging cells, we have to define all the column widths
266268 // so that ODT knows how many columns there will be.
267269 // Getting the width exactly correct is not essential as LibreOffice Writer
268270 // and Microsoft Word each treat this as a PreferredWidth value.
269271 Table.ColWidthsUnits:=dimMillimeter;
270272 Table.AddColWidth(50);
271273 Table.AddColWidth(50);
272274 Table.AddColWidth(50);
273275 Table.AddColWidth(50);
274276 Table.AddColWidth(50);
275277
276278 // Add a single row at the start which will contain merged cells
277279 Row := Table.AddRow;
278280 Row.BackgroundColor := RGBToFPColor(192, 192, 192); // Grey Shading
279281 Row.Header := True; // Tell the table this is a Header Row
280282 // Header Rows repeat at the top of each page
281283
282284 Cell := Row.AddCell;
283285 Paragraph := Cell.AddParagraph;
284286 Paragraph.Style := CenterStyle;
285287 Paragraph.AddText('Category 1').Style := BoldTextStyle;
286288
287289 Cell := Row.AddCell;
288290 Cell.SpannedCols:=2; // Make this cell cover two columns
289291 Paragraph := Cell.AddParagraph;
290292 Paragraph.Style := CenterStyle;
291293 Paragraph.AddText('Category 2').Style := BoldTextStyle;
292294
293295 Cell := Row.AddCell;
294296 Cell.SpannedCols:=2; // Make this cell cover two columns
295297 Paragraph := Cell.AddParagraph;
296298 Paragraph.Style := CenterStyle;
297299 Paragraph.AddText('Category 3').Style := BoldTextStyle;
298300
299301 // Add 21 rows to the Table, with the first being the header row
300302 for iRow := 0 to 20 do
301303 begin
302304 Row := Table.AddRow;
303305
304306 // Header Row
305307 if iRow = 0 then
306308 begin
307309 Row.BackgroundColor := RGBToFPColor(192, 192, 192); // Grey Shading
308310 Row.Header := True; // Tell the table this is a Header Row
309311 // Header Rows repeat at the top of each page
310312 end;
311313
312314 // Add 5 cells to each Row
313315 for iCol := 0 to 4 do
314316 begin
315317 Cell := Row.AddCell;
316318
317319 // Each Cell is a TvRichText, we cad add anything we can add to the main
318320 // body of a Document (for now Paragraphs, Tables or Lists)
319321 Paragraph := Cell.AddParagraph;
320322 Paragraph.Style := CenterStyle;
321323
322324 if iRow = 0 then
323325 Paragraph.AddText(Format('Header Col %d', [iCol])).Style := BoldTextStyle
324326 else
325327 Paragraph.AddText(Format('Cell %d x %d', [iRow, iCol]));
326328 end;
327329 end;
328330
329331 Document.WriteToFile('Simple_Table.docx', vfDOCX);
330332 Document.WriteToFile('Simple_Table.odt', vfODT);
331333 finally
332334 Document.Free;
333335 end;
334336end.
335337```
336338
337339![](/wiki-images/f/fe/FPVectorial_-_Document_Support_-_Simple_Table.png)
338340
339341### Lists
340342
341343Sample code to create a List Style
342344
343345``` pascal
344346Var
345347 lCurListStyle : TvListStyle;
346348 lCurListLevelStyle : TvListLevelStyle;
347349
348350Begin
349351 lCurListStyle := {TvVectorialDocument.}AddListStyle();
350352 lCurListStyle.Name := 'Numbered List Style';
351353 StyleNumberList := lCurListStyle;
352354
353355 for i := 0 To NUM_MAX_LISTSTYLES-1 Do
354356 begin
355357 lCurListLevelStyle := StyleNumberList.AddListLevelStyle;
356358 lCurListLevelStyle.Kind := vlskNumeric; // Other option in vlskBullet
357359 lCurListLevelStyle.NumberFormat:= vnfDecimal; // Other options include: vnfDecimal, vnfLowerLetter,
358360 // vnfLowerRoman, vnfUpperLetter & vnfUpperRoman
359361
360362 lCurListLevelStyle.Level := i;
361363
362364 lCurListLevelStyle.Prefix := '';
363365 lCurListLevelStyle.Suffix := '.';
364366 lCurListLevelStyle.DisplayLevels := True; // 1.1.1.1.
365367 //lCurListLevelStyle.DisplayLevels := False; // 1.
366368 lCurListLevelStyle.LeaderFontName := 'Arial';
367369
368370 // Bullet is positioned at MarginLeft - HangingIndent
369371 lCurListLevelStyle.MarginLeft := 16.35*(i + 1);
370372 lCurListLevelStyle.HangingIndent := 6.35 + 3*i;
371373 end;
372374end;
373375```
374376
375377Sample code to create a List which includes entries at different levels of indentation.
376378
377379``` pascal
378380Var
379381 List : TvList;
380382 SubList: TvList;
381383
382384Begin
383385 //...
384386 // Missing code can be copied from above examples, this is a code snippet to demonstrate lists only
385387 //...
386388
387389 // Add a simple heading
388390 CurParagraph := Page.AddParagraph();
389391 CurParagraph.Style := Vec.StyleHeading2;
390392 CurText := CurParagraph.AddText('Testing Lists');
391393
392394 // Indented numbered List
393395 List := Page.AddList();
394396 List.Style := Vec.StyleTextBody;
395397 List.ListStyle := Vec.StyleNumberList;
396398
397399 // Start the list
398400 List.AddParagraph('Level 1, Item 1');
399401 List.AddParagraph('Level 1, Item 2');
400402 List.AddParagraph('Level 1, Item 3');
401403
402404 // The next three entries are are placed at Level 2
403405 SubList := List.AddList;
404406 SubList.AddParagraph('Level 2, Item 1');
405407 SubList.AddParagraph('Level 2, Item 2');
406408 SubList.AddParagraph('Level 2, Item 3');
407409
408410 // The next three entries are are placed at Level 3
409411 With SubList.AddList Do
410412 begin
411413 AddParagraph('Level 3, Item 1');
412414 AddParagraph('Level 3, Item 2');
413415 AddParagraph('Level 3, Item 3');
414416 end;
415417
416418 // The next three entries are placed at Level 2
417419 // NOTE: We are creating this SubList from the original List
418420 SubList := List.AddList;
419421 SubList.AddParagraph('Level 2, Item 1 (new SubList added to same upper List)');
420422 SubList.AddParagraph('Level 2, Item 2 (new SubList added to same upper List)');
421423 SubList.AddParagraph('Level 2, Item 3 (new SubList added to same upper List)');
422424
423425 // The next three entries are are placed at Level 3
424426 SubList := SubList.AddList;
425427 SubList.AddParagraph('Level 3, Item 1');
426428 SubList.AddParagraph('Level 3, Item 2');
427429 SubList.AddParagraph('Level 3, Item 3');
428430
429431 // Three more entries in the original list
430432 List.AddParagraph('Level 1, Item 1 (Continuing on from same upper list)');
431433 List.AddParagraph('Level 1, Item 2 (Continuing on from same upper list)');
432434 List.AddParagraph('Level 1, Item 3 (Continuing on from same upper list)');
433435
434436 // Mixing the original list with a sublist that utilises a different ListStyle
435437 // In this case, bullets
436438 SubList := List.AddList;
437439 SubList.ListStyle := Vec.StyleBulletList;
438440 SubList.AddParagraph('Bullet Level 2, Item 1 (new SubList added to same upper List)');
439441 SubList.AddParagraph('Bullet Level 2, Item 2 (new SubList added to same upper List)');
440442 SubList.AddParagraph('Bullet Level 2, Item 3 (new SubList added to same upper List)');
441443```
442444
443445Conceptual Output from the above code:
444446
445447
4464481\. Level 1, Item 1
447449
4484502\. Level 1, Item 2
449451
4504523\. Level 1, Item 3
451453
452454
4534553.1. Level 2, Item 1
454456
4554573.2. Level 2, Item 2
456458
4574593.3. Level 2, Item 3
458460
459461
4604623.3.1. Level 3, Item 1
461463
4624643.3.2. Level 3, Item 2
463465
4644663.3.3. Level 3, Item 3
465467
4664683.4. Level 2, Item 1 (new SubList added to same upper List)
467469
4684703.5. Level 2, Item 2 (new SubList added to same upper List)
469471
4704723.6. Level 2, Item 3 (new SubList added to same upper List)
471473
472474
4734753.6.1. Level 3, Item 1
474476
4754773.6.2. Level 3, Item 2
476478
4774793.6.3. Level 3, Item 3
478480
4794814\. Level 1, Item 1 (Continuing on from same upper list)
480482
4814835\. Level 1, Item 2 (Continuing on from same upper list)
482484
4834856\. Level 1, Item 3 (Continuing on from same upper list)
484486
485487
486488• Bullet Level 2, Item 1 (new SubList added to same upper List)
487489
488490• Bullet Level 2, Item 2 (new SubList added to same upper List)
489491
490492• Bullet Level 2, Item 3 (new SubList added to same upper List)
491493
492494### Document Fields
493495
494496The following code snippet shows how Document Fields are added:
495497
496498``` pascal
497499 CurParagraph := Page.AddParagraph();
498500 CurParagraph.Style := Vec.StyleTextBody;
499501 CurParagraph.AddText('Page Count: ');
500502 CurParagraph.AddField(vfkNumPages);
501503
502504 CurParagraph := Page.AddParagraph();
503505 CurParagraph.Style := Vec.StyleTextBody;
504506 CurParagraph.AddText('Page: ');
505507 CurParagraph.AddField(vfkPage);
506508
507509 CurParagraph := Page.AddParagraph();
508510 CurParagraph.Style := Vec.StyleTextBody;
509511 CurParagraph.AddText('Author: ');
510512 CurParagraph.AddField(vfkAuthor);
511513
512514 CurParagraph := Page.AddParagraph();
513515 CurParagraph.Style := Vec.StyleTextBody;
514516 CurParagraph.AddText('Date Created: ');
515517 CurParagraph.AddField(vfkDateCreated);
516518
517519 CurParagraph := Page.AddParagraph();
518520 CurParagraph.Style := Vec.StyleTextBody;
519521 CurParagraph.AddText('Date: ');
520522 CurParagraph.AddField(vfkDate);
521523```
522524
523525Output from above:
524526
525527
526528Page Count: 3
527529
528530Page: 2
529531
530532Author: FPVECTORIAL
531533
532534Date Created: 24/09/2013
533535
534536Date: 24/09/2013 2:08 PM
535537
536538## Known Issues
537539
538540- Table support in ODT writer results in large file sizes. This is due to the fact that a style is created for each individual cell, even if multiple cells are identically formatted. This also applied to row styles and column styles. In order to resolve this, Cell, Row and Column Styles could be normalised. Alternatively, the entire table formatting architecture could be re-written to force the end user to create and apply the styles themselves (in addition to also requiring DOCX table support to be re-written to support the new architecture, specific code will need adding to DOCX writer to interpret the new FP Vectorial Table Styles).
539541- ODT Writer produces files that cannot be opened in Word 2010.
540542- File MIMETYPE in ODTDocument should not be compressed. Currently clNone compression type is ignored by TZipper (possible cause for Word 2010 rejecting existing ODT files). Patch exists, but not yet added to FPC Trunk (See <http://mantis.freepascal.org/view.php?id=24897> & <http://mantis.freepascal.org/view.php?id=23533>).
541543- Double line not supported in ODT Tables. Two locations in ODTVectorialWriter.pas need to changed to enable support:
542544 - LU_BORDERTYPE needs double adding (in CONST at start of unit. currently double is mapped to solid)
543545 - function TvODTVectorialWriter.BordersToString needs to support double (see comment at start of function)
544546
545547## TODO
546548
547549### General
548550
549551- Comprehensive testing, including opening the files in as many word processors and office suites as possible.
550552- DOCX and ODT Readers (volunteers required)
551553- Add PDF reader/writer (current PDF support is for Vector Image support only)
552554- Add HTML reader/writer
553555- Add RTF reader/writer
554556- Produce well documented examples and store in FPVectorial/Examples
555557- Code Documentation for distributing with Lazarus
556558
557559### New Code
558560
559561See Roadmap above...
560562
561563### ODTWriter
562564
563565- Support for Header/Footers and support for Tables within Headers/Footers. This requires a refactoring of ODT writer. Header and Footer content is actually stored in styles.xml, not in content.xml. All current text and table support can only produce content in content.xml.
564566
565567---
566568*From the Free Pascal wiki, page "fpvectorial - Text Document Support", as it stood on 2023-05-22 after a change by Serbod, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
567569Category: Data import and export
568570Category: FPVectorial

Back to history