I have a text file that contains multiple boxes with borders designed with letters and I need to replace them with lines and pipes, but when I do it in workflow it doesn’t work, can I do it directly in datamapper?
for example:
abbbbbbbbbbbbbbbbc
f g
f g
deeeeeeeeeeeeeeeee
It should be feasible in Workflow via a script using Regex.
You can’t just do a characters search and replace unless all the characters that are truly text are uppercase and the ones used as table borders are lowercase.
So you would have to use Regex to search for multiple instance of specific characters like, in your example:
more than 1 b
a g in between more than 1 b
more than 1 k
a m in between more than 1 k
etc…
That is assuming that the rest of your file and any other files coming in are following the same logic.
That is possibly the strangest question I have ever seen on this forum!
Why do you need to replace those characters? Do you intend to print the file as-is?
Also, when you say it doesn’t work in Workflow, what have you actually tried and do you get any errors?
Don’t get me wrong, this can be achieved easily with 2 instances of the Advanced Search and Replace task (the first one uses the b|d|e|k|m regular expression and replaces it with _, while the second one uses the a|c|f|g|h|i|j|n|f regex and replaces it with |).
But still, I’d like to understand the request a little better…
Thanks jchamel and Phil, My problem is that the number of tables for each document is variable. Please look at the input file.
In workflow, I go through datamapper, then do the replace (with serach and replace) and then continue with template, job and output but I get the same input format.
I have designed two sections, one with the cover and another for the content of the second page onwards, the idea of this content is to print it as it is, only changing some of the format in the titles
I made the replacements in workflow but when going to datamapper, it doesnt delete the first row of the file, even though in the datamapper configuration I have selected the option to remove one line:
I see that the Selection/Text is based on bytes (La selección/el texto se basa en bytes) option is ticked.
You probably do not want that option to be selected (unless your data contains double-byte characters)
Also, I have created a sample data mapping configuration with the same type of text, and with the same options, and the first line is removed both in the Designer and in Workflow.
Could you upload your data mapping configuration so we can take a look at it? (make sure that no private data is included in the sample files).
Now I have another problem, I have already managed to get everything working fine, but the %%XGF PAGEBRK text that I use for pagination comes out as the content of the PDF, do you have any suggestions to solve this?