Sign in Join
Wiki copytemporary

fpvectorial - Text Document Support: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: fpvectorial - Text Document Support

OldNewLine
1+# fpvectorial - Text Document Support
2+
3+## About
4+
5+The [[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.
6+
7+As 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.\
8+
9+At this time, two different pages can be added to TvVectorialDocument:
10+
11+- *TvTextPageSequence*: This is used by all Office Document writers.
12+- *TvVectorialPage*: This is used for Vector Image writers, and is currently ignored by the office document writers.
13+
14+Currently there are two Office Document writers.
15+
16+- *TODTVectorialWriter.pas*: for producing .odt files suitable for opening in OpenOffice and LibreOffice
17+- *TDOCXVectorialWriter*: for opening files in Microsoft Office 2007 onwards.
18+
19+Instead 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.\
20+
21+**Alternative Library - fpOdf**\
22+If 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.\
23+**Forum Link:** [Topic: fpOdf - Creating and modifying OpenDocument ODF files with freepascal](http://forum.lazarus.freepascal.org/index.php/topic,21868.msg128463.html#msg128463)\
24+
25+### License
26+
27+[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).\
28+
29+## Download
30+
31+fpvectorial comes in the Lazarus SVN, in the directory components/fpvectorial:
32+
33+`svn co `[`http://svn.freepascal.org/svn/lazarus/trunk/components/fpvectorial`](http://svn.freepascal.org/svn/lazarus/trunk/components/fpvectorial)` fpvectorial`
34+
35+See also [[fpvectorial]]\
36+
37+## Hello World Example
38+
39+The 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...
40+
41+``` pascal
42+Program HelloWorld;
43+
44+{$mode objfpc}{$H+}
45+
46+Uses
47+ fpvectorialpkg, fpvectorial;
48+
49+Var
50+ Document: TvVectorialDocument;
51+ Page: TvTextPageSequence;
52+ Paragraph: TvParagraph;
53+
54+Begin
55+ Document := TvVectorialDocument.Create;
56+ Try
57+ Page := Document.AddTextPageSequence;
58+ Paragraph := Page.AddParagraph;
59+ Paragraph.AddText('Hello World!');
60+
61+ Document.WriteToFile('Hello_World.docx', vfDOCX);
62+ Document.WriteToFile('Hello_World.odt', vfODT);
63+ Finally
64+ Document.Free;
65+ End;
66+End.
67+```
68+
69+== Basic Concepts ==
70+
71+### General
72+
73+- A single FPVectorial Document (TvVectorialDocument) consists of a series of Page Sequences.
74+- Each Page Sequence can have it's own Header and Footer, and it's own Page Setup (size, orientation)
75+- Text, Tables, Images are added to the Page Sequence. In this way the document is built up.
76+- 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.
77+- A single Page Sequence can have multiple Paragraphs added.
78+- Headers and Footers are built up in an identical manner to a Page Sequence.
79+- TvVectorialDocument is responsible for freeing any entity added using the .AddXXX calls.
80+
81+### Formatted Text
82+
83+- Text is added inside Paragraphs (TvParagraph).
84+- 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).
85+- All Paragraph and Text Styles must be defined before being used.
86+- FP Vectorial supports style inheritance.
87+- 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.
88+- A default set of Styles can be added to the FP Vectorial Document by calling AddStandardTextDocumentStyles.
89+- Headings are Paragraph Styles, with additional properties covering Heading Level and numbering
90+
91+### Document Fields
92+
93+- Document Fields are added as TvField to Paragraphs via .AddField(AKind : TvFieldKind) : TvField
94+- Currently 5 simple fields are supported: vfkNumPages, vfkPage, vfkAuthor, vfkDateCreated, vfkDate
95+- 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.
96+- Numeric Fields can be formatted via TvField.NumberFormat as Decimal, lowercase/uppercase Roman or lowercase/uppercase Alphabetic
97+- Date Fields can be formatted cia TvField.DataFormat. Default value is 'd/MM/yyyy h:mm am/pm'
98+
99+### Tables
100+
101+- Tables are centered around TvTable
102+- A TvTable consists of a collection of rows.
103+- Table rows consist of a collection of cells.
104+- Tables can add optional column information. This must be provided if merged cells are being used.
105+- Any Table Cell can support any document object, including multiple paragraphs, images and even nested Tables.
106+
107+### Lists
108+
109+- Lists are centered around TvList.
110+- Each TvList can either have a TvParagraph added, or a child TvList (which is how we get deeper levels).
111+- Each TvList has both a TvStyle (which determines the default TvParagraph text appearance) and a TvListStyle (which determines the list behaviour).
112+- Each TvListStyle holds a list of TvListLevelStyle.
113+- Each TvListLevelStyle defines how each different level of the list behaves.
114+- Each List can be bulleted, or numbered.
115+- Supported numbering: Decimal, lowercase Roman, uppercase Roman, lowercase Alphabet, uppercase Alphabet.
116+- 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.
117+- 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.
118+
119+## Roadmap
120+
121+| Functionality | OpenDocument (ODT) | Office Open XML (DOCX) |
122+|----|----|----|
123+| File Version | ODT 1.2 with extensions | ECMA-376 1st Edition (2006) |
124+| Supported Style Types | Paragraph and Text-Span | Paragraph and Text |
125+| Table Support | Yes | Yes |
126+| List Support | Yes | Yes |
127+| Multiple Headers/Footers | Not yet | Yes |
128+| Tables in Header/Footer | Not yet | Not tested |
129+| Image Support | Not yet | Not yet |
130+| Images in Header/Footer | Not yet | Not yet |
131+| FPVectorial Image Support | Not yet | Not yet |
132+| Tab Stops | Not yet | Not yet |
133+| Document Fields | Yes | Yes |
134+| Meta Data | Partially Implemented | Not yet |
135+| Table of contents | Not planned | Not planned |
136+| Footnotes | Not planned | Not planned |
137+| Review/Revision | Not planned | Not planned |
138+| Bookmarks / Hyperlinks | Not planned | Not planned |
139+| Comments | Not planned | Not planned |
140+| Formulas | Not planned | Not planned |
141+
142+## Code Examples
143+
144+### Styles
145+
146+This 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.
147+
148+``` pascal
149+Uses
150+ fpvectorialpkg, fpvectorial;
151+
152+Var
153+ Document: TvVectorialDocument;
154+ Page: TvTextPageSequence;
155+ Paragraph: TvParagraph;
156+ BoldTextStyle: TvStyle;
157+
158+Begin
159+ Document := TvVectorialDocument.Create;
160+ Try
161+ // Adds the defaut Paragraph Styles
162+ // StyleTextBody, StyleHeading1,
163+ // StyleHeading2 & StyleHeading3
164+ Document.AddStandardTextDocumentStyles(vfUnknown);
165+
166+ // Add our own Style
167+ BoldTextStyle := Document.AddStyle();
168+
169+ BoldTextStyle.Kind := vskTextSpan;
170+ BoldTextStyle.Name := 'Bold';
171+ BoldTextStyle.Font.Bold := True;
172+ BoldTextStyle.SetElements := BoldTextStyle.SetElements + [spbfFontBold];
173+
174+ // Create the Document
175+ Page := Document.AddTextPageSequence;
176+ Paragraph := Page.AddParagraph;
177+ Paragraph.Style := Document.StyleTextBody;
178+
179+ // Add Hello World as two text spans within the same paragraph,
180+ // and make 'World' bold
181+ Paragraph.AddText('Hello ');
182+ Paragraph.AddText('World!').Style := BoldTextStyle;
183+
184+ Document.WriteToFile('Hello_World.docx', vfDOCX);
185+ Document.WriteToFile('Hello_World.odt', vfODT);
186+ Finally
187+ Document.Free;
188+ End;
189+End.
190+```
191+
192+<img src="FPVectorial_-_Document_Support_-_Hello_World.png" title="Output of extended Hello World! program" width="200" />
193+
194+### Simple Table
195+
196+This 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.
197+
198+The 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).
199+
200+``` pascal
201+program SimpleTable;
202+
203+{$mode objfpc}{$H+}
204+
205+uses
206+ fpvectorialpkg,
207+ fpvectorial,
208+ fpvutils, // For RGBToFPColor()
209+ SysUtils;
210+
211+var
212+ Document: TvVectorialDocument;
213+ Page: TvTextPageSequence;
214+ Paragraph: TvParagraph;
215+ BoldTextStyle: TvStyle;
216+ CenterStyle: TvStyle;
217+ Table: TvTable;
218+ Row: TvTableRow;
219+ Cell: TvTableCell;
220+ iRow: Integer;
221+ iCol: Integer;
222+
223+const
224+ // Most dimensions in FPVectorial are in mm. If you want to specify
225+ // anything in other units, be ready to do the conversion...
226+ ONE_POINT_IN_MM = 0.35278;
227+
228+begin
229+ Document := TvVectorialDocument.Create;
230+ try
231+ // Adds the defaut Paragraph Styles
232+ // StyleTextBody, StyleHeading1,
233+ // StyleHeading2 & StyleHeading3
234+ Document.AddStandardTextDocumentStyles(vfUnknown);
235+
236+ // Add our own Style for bolded text elements
237+ BoldTextStyle := Document.AddStyle();
238+ BoldTextStyle.Kind := vskTextSpan; // This style will only be applied to selected Text Spans
239+ BoldTextStyle.Name := 'Bold';
240+ BoldTextStyle.Font.Bold := True;
241+ BoldTextStyle.SetElements := BoldTextStyle.SetElements + [spbfFontBold];
242+
243+ // Add our own style for centered paragraphs
244+ CenterStyle := Document.AddStyle();
245+ CenterStyle.Kind := vskTextBody; // This style will be applied to the whole Paragraph
246+ CenterStyle.Name := 'Table Body Centered';
247+ CenterStyle.Font.Name := 'Verdana';
248+ CenterStyle.Font.Size := 8;
249+ CenterStyle.Alignment := vsaCenter;
250+ CenterStyle.MarginTop := 2 * ONE_POINT_IN_MM;
251+ CenterStyle.MarginBottom := 2 * ONE_POINT_IN_MM;
252+ CenterStyle.SetElements :=
253+ [spbfFontSize, spbfFontName, spbfAlignment, sseMarginTop, sseMarginBottom];
254+
255+ // Create the Document, and add a simple Heading
256+ Page := Document.AddTextPageSequence;
257+ Paragraph := Page.AddParagraph;
258+ Paragraph.Style := Document.StyleHeading1;
259+ Paragraph.AddText('Simple Table');
260+
261+ // Add our Table, which will have 5 columns
262+ Table := Page.AddTable;
263+ Table.PreferredWidth := Dimension(100, dimPercent);
264+
265+ // As we will be merging cells, we have to define all the column widths
266+ // so that ODT knows how many columns there will be.
267+ // Getting the width exactly correct is not essential as LibreOffice Writer
268+ // and Microsoft Word each treat this as a PreferredWidth value.
269+ Table.ColWidthsUnits:=dimMillimeter;
270+ Table.AddColWidth(50);
271+ Table.AddColWidth(50);
272+ Table.AddColWidth(50);
273+ Table.AddColWidth(50);
274+ Table.AddColWidth(50);
275+
276+ // Add a single row at the start which will contain merged cells
277+ Row := Table.AddRow;
278+ Row.BackgroundColor := RGBToFPColor(192, 192, 192); // Grey Shading
279+ Row.Header := True; // Tell the table this is a Header Row
280+ // Header Rows repeat at the top of each page
281+
282+ Cell := Row.AddCell;
283+ Paragraph := Cell.AddParagraph;
284+ Paragraph.Style := CenterStyle;
285+ Paragraph.AddText('Category 1').Style := BoldTextStyle;
286+
287+ Cell := Row.AddCell;
288+ Cell.SpannedCols:=2; // Make this cell cover two columns
289+ Paragraph := Cell.AddParagraph;
290+ Paragraph.Style := CenterStyle;
291+ Paragraph.AddText('Category 2').Style := BoldTextStyle;
292+
293+ Cell := Row.AddCell;
294+ Cell.SpannedCols:=2; // Make this cell cover two columns
295+ Paragraph := Cell.AddParagraph;
296+ Paragraph.Style := CenterStyle;
297+ Paragraph.AddText('Category 3').Style := BoldTextStyle;
298+
299+ // Add 21 rows to the Table, with the first being the header row
300+ for iRow := 0 to 20 do
301+ begin
302+ Row := Table.AddRow;
303+
304+ // Header Row
305+ if iRow = 0 then
306+ begin
307+ Row.BackgroundColor := RGBToFPColor(192, 192, 192); // Grey Shading
308+ Row.Header := True; // Tell the table this is a Header Row
309+ // Header Rows repeat at the top of each page
310+ end;
311+
312+ // Add 5 cells to each Row
313+ for iCol := 0 to 4 do
314+ begin
315+ Cell := Row.AddCell;
316+
317+ // Each Cell is a TvRichText, we cad add anything we can add to the main
318+ // body of a Document (for now Paragraphs, Tables or Lists)
319+ Paragraph := Cell.AddParagraph;
320+ Paragraph.Style := CenterStyle;
321+
322+ if iRow = 0 then
323+ Paragraph.AddText(Format('Header Col %d', [iCol])).Style := BoldTextStyle
324+ else
325+ Paragraph.AddText(Format('Cell %d x %d', [iRow, iCol]));
326+ end;
327+ end;
328+
329+ Document.WriteToFile('Simple_Table.docx', vfDOCX);
330+ Document.WriteToFile('Simple_Table.odt', vfODT);
331+ finally
332+ Document.Free;
333+ end;
334+end.
335+```
336+
337+<img src="FPVectorial_-_Document_Support_-_Simple_Table.png" title="Output of Simple Table program" width="200" />
338+
339+### Lists
340+
341+Sample code to create a List Style
342+
343+``` pascal
344+Var
345+ lCurListStyle : TvListStyle;
346+ lCurListLevelStyle : TvListLevelStyle;
347+
348+Begin
349+ lCurListStyle := {TvVectorialDocument.}AddListStyle();
350+ lCurListStyle.Name := 'Numbered List Style';
351+ StyleNumberList := lCurListStyle;
352+
353+ for i := 0 To NUM_MAX_LISTSTYLES-1 Do
354+ begin
355+ lCurListLevelStyle := StyleNumberList.AddListLevelStyle;
356+ lCurListLevelStyle.Kind := vlskNumeric; // Other option in vlskBullet
357+ lCurListLevelStyle.NumberFormat:= vnfDecimal; // Other options include: vnfDecimal, vnfLowerLetter,
358+ // vnfLowerRoman, vnfUpperLetter & vnfUpperRoman
359+
360+ lCurListLevelStyle.Level := i;
361+
362+ lCurListLevelStyle.Prefix := '';
363+ lCurListLevelStyle.Suffix := '.';
364+ lCurListLevelStyle.DisplayLevels := True; // 1.1.1.1.
365+ //lCurListLevelStyle.DisplayLevels := False; // 1.
366+ lCurListLevelStyle.LeaderFontName := 'Arial';
367+
368+ // Bullet is positioned at MarginLeft - HangingIndent
369+ lCurListLevelStyle.MarginLeft := 16.35*(i + 1);
370+ lCurListLevelStyle.HangingIndent := 6.35 + 3*i;
371+ end;
372+end;
373+```
374+
375+Sample code to create a List which includes entries at different levels of indentation.
376+
377+``` pascal
378+Var
379+ List : TvList;
380+ SubList: TvList;
381+
382+Begin
383+ //...
384+ // Missing code can be copied from above examples, this is a code snippet to demonstrate lists only
385+ //...
386+
387+ // Add a simple heading
388+ CurParagraph := Page.AddParagraph();
389+ CurParagraph.Style := Vec.StyleHeading2;
390+ CurText := CurParagraph.AddText('Testing Lists');
391+
392+ // Indented numbered List
393+ List := Page.AddList();
394+ List.Style := Vec.StyleTextBody;
395+ List.ListStyle := Vec.StyleNumberList;
396+
397+ // Start the list
398+ List.AddParagraph('Level 1, Item 1');
399+ List.AddParagraph('Level 1, Item 2');
400+ List.AddParagraph('Level 1, Item 3');
401+
402+ // The next three entries are are placed at Level 2
403+ SubList := List.AddList;
404+ SubList.AddParagraph('Level 2, Item 1');
405+ SubList.AddParagraph('Level 2, Item 2');
406+ SubList.AddParagraph('Level 2, Item 3');
407+
408+ // The next three entries are are placed at Level 3
409+ With SubList.AddList Do
410+ begin
411+ AddParagraph('Level 3, Item 1');
412+ AddParagraph('Level 3, Item 2');
413+ AddParagraph('Level 3, Item 3');
414+ end;
415+
416+ // The next three entries are placed at Level 2
417+ // NOTE: We are creating this SubList from the original List
418+ SubList := List.AddList;
419+ SubList.AddParagraph('Level 2, Item 1 (new SubList added to same upper List)');
420+ SubList.AddParagraph('Level 2, Item 2 (new SubList added to same upper List)');
421+ SubList.AddParagraph('Level 2, Item 3 (new SubList added to same upper List)');
422+
423+ // The next three entries are are placed at Level 3
424+ SubList := SubList.AddList;
425+ SubList.AddParagraph('Level 3, Item 1');
426+ SubList.AddParagraph('Level 3, Item 2');
427+ SubList.AddParagraph('Level 3, Item 3');
428+
429+ // Three more entries in the original list
430+ List.AddParagraph('Level 1, Item 1 (Continuing on from same upper list)');
431+ List.AddParagraph('Level 1, Item 2 (Continuing on from same upper list)');
432+ List.AddParagraph('Level 1, Item 3 (Continuing on from same upper list)');
433+
434+ // Mixing the original list with a sublist that utilises a different ListStyle
435+ // In this case, bullets
436+ SubList := List.AddList;
437+ SubList.ListStyle := Vec.StyleBulletList;
438+ SubList.AddParagraph('Bullet Level 2, Item 1 (new SubList added to same upper List)');
439+ SubList.AddParagraph('Bullet Level 2, Item 2 (new SubList added to same upper List)');
440+ SubList.AddParagraph('Bullet Level 2, Item 3 (new SubList added to same upper List)');
441+```
442+
443+Conceptual Output from the above code:
444+
445+
446+1\. Level 1, Item 1
447+
448+2\. Level 1, Item 2
449+
450+3\. Level 1, Item 3
451+
452+
453+3.1. Level 2, Item 1
454+
455+3.2. Level 2, Item 2
456+
457+3.3. Level 2, Item 3
458+
459+
460+3.3.1. Level 3, Item 1
461+
462+3.3.2. Level 3, Item 2
463+
464+3.3.3. Level 3, Item 3
465+
466+3.4. Level 2, Item 1 (new SubList added to same upper List)
467+
468+3.5. Level 2, Item 2 (new SubList added to same upper List)
469+
470+3.6. Level 2, Item 3 (new SubList added to same upper List)
471+
472+
473+3.6.1. Level 3, Item 1
474+
475+3.6.2. Level 3, Item 2
476+
477+3.6.3. Level 3, Item 3
478+
479+4\. Level 1, Item 1 (Continuing on from same upper list)
480+
481+5\. Level 1, Item 2 (Continuing on from same upper list)
482+
483+6\. Level 1, Item 3 (Continuing on from same upper list)
484+
485+
486+• Bullet Level 2, Item 1 (new SubList added to same upper List)
487+
488+• Bullet Level 2, Item 2 (new SubList added to same upper List)
489+
490+• Bullet Level 2, Item 3 (new SubList added to same upper List)
491+
492+### Document Fields
493+
494+The following code snippet shows how Document Fields are added:
495+
496+``` pascal
497+ CurParagraph := Page.AddParagraph();
498+ CurParagraph.Style := Vec.StyleTextBody;
499+ CurParagraph.AddText('Page Count: ');
500+ CurParagraph.AddField(vfkNumPages);
501+
502+ CurParagraph := Page.AddParagraph();
503+ CurParagraph.Style := Vec.StyleTextBody;
504+ CurParagraph.AddText('Page: ');
505+ CurParagraph.AddField(vfkPage);
506+
507+ CurParagraph := Page.AddParagraph();
508+ CurParagraph.Style := Vec.StyleTextBody;
509+ CurParagraph.AddText('Author: ');
510+ CurParagraph.AddField(vfkAuthor);
511+
512+ CurParagraph := Page.AddParagraph();
513+ CurParagraph.Style := Vec.StyleTextBody;
514+ CurParagraph.AddText('Date Created: ');
515+ CurParagraph.AddField(vfkDateCreated);
516+
517+ CurParagraph := Page.AddParagraph();
518+ CurParagraph.Style := Vec.StyleTextBody;
519+ CurParagraph.AddText('Date: ');
520+ CurParagraph.AddField(vfkDate);
521+```
522+
523+Output from above:
524+
525+
526+Page Count: 3
527+
528+Page: 2
529+
530+Author: FPVECTORIAL
531+
532+Date Created: 24/09/2013
533+
534+Date: 24/09/2013 2:08 PM
535+
536+## Known Issues
537+
538+- 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).
539+- ODT Writer produces files that cannot be opened in Word 2010.
540+- 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>).
541+- Double line not supported in ODT Tables. Two locations in ODTVectorialWriter.pas need to changed to enable support:
542+ - LU_BORDERTYPE needs double adding (in CONST at start of unit. currently double is mapped to solid)
543+ - function TvODTVectorialWriter.BordersToString needs to support double (see comment at start of function)
544+
545+## TODO
546+
547+### General
548+
549+- Comprehensive testing, including opening the files in as many word processors and office suites as possible.
550+- DOCX and ODT Readers (volunteers required)
551+- Add PDF reader/writer (current PDF support is for Vector Image support only)
552+- Add HTML reader/writer
553+- Add RTF reader/writer
554+- Produce well documented examples and store in FPVectorial/Examples
555+- Code Documentation for distributing with Lazarus
556+
557+### New Code
558+
559+See Roadmap above...
560+
561+### ODTWriter
562+
563+- 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.
564+
565+---
566+*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).*
567+Category: Data import and export
568+Category: FPVectorial

Back to history