OL Learn

Text file Input to Designer


I have a Text file input.
This is a invoice with some markup like spaces and line feeds.
The text is nicely visible in the Datamapper.

I would like to use this text in the desiger, without having to re markup the text in the desinger
(Like it is posisble to use a PDF input as a background.)
The reason for this, is that the customer may change the mark up the text input (and preferabel would not like to touch the designer).

I was wondering how to proceed with this.
Do you have any sugestions?

Thank you,

Not sure what you mean by markup like spaces and line feeds, but if you want it to show as in the Datamapper, here is how you do it:

In the Datamapper:

  • Select the whole first line to its maximum width
  • Right-click and choose Add Repeat
  • Right-click again on your data selection and choose Add Extraction
  • On the Step Properties tab, in the Post function: edit box, add this: replace(/ /g, “ ”);

You now have all your lines in a nested table.

In your Template:

  • Add a Detail table and select the field containing your lines
  • Go on the Source tab of the Canvas and look at the classes added to your <td>, by default you should have <td class=“data Field1”>.
  • In the context_print_style.css, add a style as follow:
    font-family: courier;

That should do it.

I will implement it like you suggested.
Thank you

I have implemented it and it works like a charm.
Thank you.