RTF in clarion report does not show text

The text appears in the normal screen controller but does not appear in the report.
I already use this RFT in the report for years, but this happened with a pasted text.
What I don’t understand is the text being decoded on the screen and not decoded in the report.
Can anyone help me?
Thanks.
Follow images

Follow text in rtf:

{\rtf1\fbidis\ansi\ansicpg1252\deff0\nouicompat\deflang1046{\fonttbl{\f0\fnil\fcharset0 Cambria;}}
{*\generator Riched20 10.0.22000}\viewkind4\uc1
\pard\qc\b\f0\fs24\lang22 ULTRASSOM ABDOMINAL\par
\pard\qj\par
\par
VESI\u769?CULA URINA\u769?RIA- \b0 Vesi\u769?cula urina\u769?ria com replec\u807?a\u771?o adequada, paredes regulares e
normoespessas, medindo (0,09 cm), com conteu\u769?do anecoge\u770?nico. Presen’e7a de estruturas hiperecog’eanicas em topografia
de colo vesical, formadoras de sombreamento ac’fastico, medindo (entre 0,09 cm e 0,15 cm). Considerar a possibilidade de cristais/ microc
'e1lculos. \par
\b\par
}

In the report I use a text controller with the RTF option.
This has never happened, this is the first time.

Thank you

Boa Tarde Jorge Paladino!

Tenho esse mesmo problema, por acaso já conseguiu resolver? Teria como me dar um help.

Hello, I’m going to post in English, so maybe someone can help us…?
I couldn’t, but I managed to find out that they are texts that come from a Mac. It seems that the encoding changes the RTF header, so in the report the RTF text controller is bugged.
As you can see, no one answered me here, the solution was to ask the client, in this case, not to bring it directly from the Mac.
If I find a solution, I’ve already noted your contact, I’ll send it to you, but if you find something, please send it to me too.
Big hug

Now that you have mentioned the doc is coming from a Mac this might explain the differences between Mac RTFD and Windows RTF

So its possible the Clarion RTF window control is handling the Mac differences but not the PDF report extension.

Hello, RchdR thank you very much for your contribution, but it is the report() control that does not handle the code, and consequently it does not appear in the PDF.
Best regards

Hi Jorge

the text you have posted looks to be only the first paragraph. In MS-Word it looks like this:

In WordPad it looks like this:

it appears there is something amiss with the header?

could you please post a text file with the exact bytes used for your original image post. I am curious if it is ANSI or Unicode etc. Does it have a BOM (Byte Order Mark)?

so you need to look at the exact source text to spot what is different in this case. (So please also supply one text file that works fine for comparison). Maybe you can then do some text transformation to get it in a format that displays correctly both on screen and report.

cheers

Geoff R

Thats also my point, there is a difference between the window control and the report.

The source code for writing pdfs is shipped with clarion if you want to take a look at it. Its one way of learning how to build a pdf. C6 is the version the source was shipped in iirc but in later versions pdfs became image files in reports to afford a small degree of privacy from software that can harvest data from pdf’s.

Edit. Just ignore me, I could have sworn your earlier post said printing to PDF but now I cant see it…

Hello good evening,
You always have good solutions, I already appreciate your post!
I think I didn’t express myself well when I mentioned the RTF header.
The problem is exactly what is the image at the beginning of the post.
The user copies a text that apparently came from a Mac.
When pasting the text into the RTF controller of a window, the text is complete.
But when generating a report(), the RTF text controller can’t handle the text.
The texts are copied from several places, the example above is part of a text that a client of mine pasted and there was a problem in the report.
I really only posted one paragraph because it is enough for us to see the problem between the window and report controllers.

Hello friend, please forgive me
I edited the answer, I had actually included the PDF,
but this problem is not in the PDF
it is in the RTF Text controller of report().
in the image at the beginning of the post.

This is an example of the beginning of RTF text that the report controller reads:
{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1046{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}} …

And this is what it doesn’t read…
{*\generator Riched20 10.0.22000}\viewkind4\uc1
\b\f\qc1\fonttbl {\f0\fnil\fcharset0 Cambria;}} …

That’s why I called it a header, and said that this could be a difference.

Hello again Jorge

earlier you had

{\rtf1\fbidis\ansi\ansicpg1252\deff0\nouicompat\deflang1046{\fonttbl{\f0\fnil\fcharset0 Cambria;}}
{*\generator Riched20 10.0.22000}\viewkind4\uc1

and now

so you are confusing me a little but I notice BOTH have

{*\generator Riched20 10.0.22000}

can you please try adding a slash before the star/asterisk:

{\*\generator Riched20 10.0.22000}

does that make a difference? This is what I was referring to about a header as in the displayed images there is text before ULTRASSOM ABDOMINAL

but when I make that change it now displays the heading correctly in WordPad:

but I have no idea if this will fix your printing problem or not…

if it does you could do a simple replacement. eg with StringTheory

st.replace('{{*\generator', '{{\*\generator')

note that you need to double up the ‘{’ to ‘{{’

cheers

Geoff R

Its an option, it doesnt have to do this. It’s a local option on each report as i recall. From memory, i think theres also 2 engines to choose from.

Thread drift: I dont recall seeing two options in C7, only the image output for a pdf and some complaints online about the new way it worked.

I agree, we’re getting off topic here. Alas at my age I can’t remember Clarion 7, I can only report what is there today;

a) On the global extension you can choose between the “Clarion” engine and the Image2PDF engine.

b) On the local extension is an option “Use Scan Copy Mode”. (When this is on you get a “picture” of the page, not the page itself.)

1 Like

Ill look for it but cant say I ever saw that.

Hello, good morning!
Thank you for your post!
I’m using Clarion 11, and I found the option you mentioned
I’ll try to use it and get back to you with the results
Thank you very much.

Hi vitesse!
Thanks for your post!
But they are different, see:
The one generated by Clarion’s RTF
{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1046{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}}
The one imported by external text, I believe, from a Mac
{\rtf1\fbidis\ansi\ansicpg1252\deff0\nouicompat\deflang1046{\fonttbl{\f0\fnil\fcharset0 Cambria;}}

The difference is
Clarion {\rtf1\ansi\...
external {\rtf1\fbidis\ansi...

But the intriguing thing is that the window controller resolves it, but the report controller does not.

Returning with results:

The same paragraph used at the beginning of the post, but typed directly into Clarion’s RTF windows controller, and the report preview if its RTF controller:

RTF code of the text:
{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1046{\fonttbl{\f0\fnil\fprq1\fcharset0 Cambria;}}
{\colortbl ;\red8\green0\blue0;}
{\*\generator Riched20 10.0.22621}\viewkind4\uc1
\pard\qc\cf1\b\f0\fs24 ULTRASSOM ABDOMINAL - 01\b0\par
\pard\par
\par
\b VES\'cdCULA URIN\'c1RIA\b0 - Vesicula urin\'e1ria com reple\'e7\'e3o adequada, paredes regulares enormoespessas, medindo(0,9cm), com conte\'fado anecog\'eanico. Presente de estruturas hiperecog\'eanicas em topografiade colo vesical, formadoras de sombreamento ac'fasico, medindo(entre 0,09cm e 0,15cm).Considerar a possibilidade de cristais/microc'e1lculos.\par
\par
}

The paragraph used at the beginning of the post but glued in the window RTF controle e your report RTF controler:

RTF code text:
{\rtf1\fbidis\ansi\ansicpg1252\deff0\nouicompat\deflang1046{\fonttbl{\f0\fnil\fcharset0 Cambria;}{\f1\fnil Cambria;}}
{\*\generator Riched20 10.0.22621}\viewkind4\uc1
\pard\qc\b\f0\fs24\lang22 ULTRASSOM ABDOMINAL - 02\par
\pard\qj\par
\par
VESI\u769?CULA URINA\u769?RIA- \b0 Vesi\u769?cula urina\u769?ria com replec\u807?``a\u771?o adequada, paredes regulares enormoespessas, medindo (0,09 cm), com conteu\u769?do anecoge\u770?nico. Presen\f1\rquote\f0 e7a de estruturas hiperecog\f1\rquote\f0 eanicas em topografiade colo vesical, formadoras de sombreamento ac\f1\rquote\f0 fastico, medindo (entre 0,09 cm e 0,15 cm). Considerar a possibilidade de cristais/ microc'e1lculos. \par
\b\par
}
Then…
I made a non-RTF controller to get the clean codes, and edited the text so that the report controller can read the options
\fbidis\
\*\generator
I changed the report to Use Scan Copy Mode?
None of the options helped.
Mystery indeed.

Here I get the cod RTF and I can edit it:

Hugs!

The two codes are different.
But why does the window controller convert the text and the report doesn’t?
It’s our X file

This /fbidis not the problem …