Paggard.com

web programming technologies

You can Order all of the listed products on-line.

*We live in times of mail-filtering, spam-blocking and black-lists - because of this your possible mail can miss me. The most reliable way is to use my feedback form.

TXT Generator

Create complicated plain text TXT using PHP

 [General Information]   [Full Documentation]   [on-line demo]   [how to order

TXT Generator is a PHP script, the younger member of the "Generators" family. The script is aimed to creation of the plain text files (TXT). Certainly, there is no use to "just create TXT file using PHP" it is simple - so, TXT Generator is powered by additional features in order to make it possible to create complicated layouts using just plain text. Sometimes there is a need to stick to plain text (like creating plain text e-mails) - and here TXT Generator can help you.

The script is using user-friendly input format, which is actually XML template. This template can be generated dynamically (like dynamic php web-pages) and then passed to the TXT Generator (or stored for future use) - and TXT Generator will convert this XML template into TXT file.

TXT Generator has many features which will help you to make your generated TXT files look not as a bunch of lines of text: paragraphs with alignment, custom width, borders and page orientation; ordered and unordered lists; and even tables, with variable width, in-cell text alignment, table orientation on page.

Using the form below you can test the work of the TXT generator. Just create your XML template (or use the given one), insert it into the form and push the "Create" button.

Only mind that XML has certain rules:

  1. All templates must have <?xml version="1.0"?> at the very beginning.
  2. All the document data should be enclosed into <Document> </Document> element
  3. All element tags must be closed like this: <Document> </Document> or like this <Document />
  4. Attributes must always be quoted:
    <Table border="0"> </Table>
    <align hor="center" />
  5. All elements must be properly nested:
    wrong: <tr><td> </row></td>
    correct: <tr><td> </td></tr>
  6. Document can contain comments: <!-- some comment -->

 NOTE! If during generation you will get some "XML ... " error - this means that you made an error in your XML template (did not close some tag or something).

>> show the example template in a separate window



If you will have any questions - you can contact me any time.





© Paggard 2004-2017.