1. MARK APTEKAR
  2. PowerBuilder
  3. Friday, 7 January 2022 16:11 PM UTC

Hi, I am using PB 2019 R3 build 2703. Inserting .RTF file created outside of PB into the PB RTE control. That file has a table  Original Table. In PB RTE control table shows as compressed Table in PB RTE . Is anybody know how to fix this problem? Also original .RTF file has header and footer but they does not shows in the PB RTE control even if option HeaderFooter is checked ON in the control settings tab Document.

Thank you for your time and help.

Attachments (2)
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 7 January 2022 16:24 PM UTC
  2. PowerBuilder
  3. # 1

Hi Mark;

  Which TE or TX control version are you using (as set in the Application Painter) for RTE / RT DW support?

Regards ... Chris

Comment
There are no comments made yet.
MARK APTEKAR Accepted Answer Pending Moderation
  1. Friday, 7 January 2022 16:43 PM UTC
  2. PowerBuilder
  3. # 2

Hi, Chris.   

It is not Data Window Rich Text. 

In the window painter I go to menu Insert->Control and selecting RichTextEdid from the list. (it has picture as capital letters blue A and red B). Then clicking on the window painter and resizing control to the needed dimensions.  Also in the Preferences for the control checking ON most of the options on tabs  General and Document.

Hope I answer your question.

Thank you

Comment
  1. Chris Pollach @Appeon
  2. Friday, 7 January 2022 16:54 PM UTC
That was not my question. If you read it carefully - the selection of the RT "engine" in the App Pinter controls the RTF behaviour in both a RTE Control as well as the RT DW. So the question is still ... what is your "RichTect" setting in your Application Object of your PB App?
  1. Helpful 1
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Friday, 7 January 2022 17:30 PM UTC
  2. PowerBuilder
  3. # 3

Hi, Mark -

This thread contains information on how to check which version of the Rich Text control your application is configured to use:

https://community.appeon.com/index.php/qna/q-a/rich-text-edit

I hope you find this info helpful.

Best regards, John

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 7 January 2022 17:49 PM UTC
  2. PowerBuilder
  3. # 4

Hi,

We use the RTE control for exporting Richtext to HTML and store it in the DB in a blob field. Later on, we get that blob, write it to a temporary file and then use the InserDocument() function to import it back into the RTE control.

When we use(d) PB2017 R3 build 1915, we configured the application object to use "Built-in TX Text Control".

When we started using PB2019 R3 build 2703, we though that the "Built-in TX Text Control ActiveX 15.0", would be the same version as the one we use(d) in PB2017. Then we noticed that, when importing our DB blobs that contained a table in the html (<table>), things failed miserably, the formatting was all wrong.

In PB2019 the only version of the control that seems to be working reasonably well is the Built-in TX Text Control ActiveX 28.0, so make sure you are using that one and not any other version.

regards

MiguelL

Comment
There are no comments made yet.
MARK APTEKAR Accepted Answer Pending Moderation
  1. Friday, 14 January 2022 21:10 PM UTC
  2. PowerBuilder
  3. # 5

Hi,  I tried 3 different RichTextEdit settings in the application object (Built-in TX Text Control ActiveX 15.0, Built-in TX Text Control ActiveX 28.0 and Built-in Rich Edit Control (Obsolete)). For all of them table displayed incorrectly in the RTF document and data in the Header/Footer not displayed at all .

Thank you

Comment
  1. Armeen Mazda @Appeon
  2. Friday, 14 January 2022 22:45 PM UTC
Have you tried version 28 of TX TextControl that is in PB 2019 R3 and newer?
  1. Helpful
  1. Miguel Leeuwe
  2. Saturday, 15 January 2022 07:17 AM UTC
Mark,

If you attach the RTF file, I'll give it a shot.

regards
  1. Helpful
There are no comments made yet.
MARK APTEKAR Accepted Answer Pending Moderation
  1. Saturday, 15 January 2022 15:18 PM UTC
  2. PowerBuilder
  3. # 6

Hi,   

Yes, I tried v28.0 ...same result. 

The test file '53_1.TXT' is attached.

Thank you for your time

Attachments (1)
Comment
  1. Armeen Mazda @Appeon
  2. Saturday, 15 January 2022 16:06 PM UTC
Please open a support ticket and provide test case. Thanks.
  1. Helpful
  1. Miguel Leeuwe
  2. Saturday, 15 January 2022 16:50 PM UTC
Hi Mark,

Something is not quit right with your RTF file. If I open it with Wordpad.EXE, it shows a blank document. If I open it with LibreOffice Writer, It shows the table "compressed" like you have experienced in Powerbuilder. If I open it with office 365, it shows correctly. I from office365 I save it with another filename as RTF, and then open it in Libreoffice Writer, it shows the table "almost" correctly. That new file still shows as a blank file in wordpad.exe.

How is this RTF file being created?

regards.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Saturday, 15 January 2022 20:51 PM UTC
Thanks for your help to check. If so many other programs don't display it correctly, then there is some problem with RTF file or it is using some MS Office proprietary features that is not portable to other RTF editors.
  1. Helpful
There are no comments made yet.
MARK APTEKAR Accepted Answer Pending Moderation
  1. Saturday, 15 January 2022 19:50 PM UTC
  2. PowerBuilder
  3. # 7

Hi, 

This is how it works.....

RTF document get created in some .NET application  (not PB .NET) that is using some RTE control. User can manually type or copy any paste any information from some other program(s) into the .NET application. Also document can be created in the Microsoft Word document and than copied into the .NET application. After that .NET application saved RTF formatted text (as {\rtf1\deff0{\fonttbl{\f0 Calibri;}{\f1 Times New Roman;}{\f2 Symbol;}.....) of that document into the database table. My PowerBuilder application retrieves RTF formatted text from the database, placed it into the PB Build-in RTE control, calling function rtename.SaveDocument(abc.PDF, FileTypePDF!)then sending location of the PDF file to some other system. 

May be there is something wrong in the .RTF file I provided but it is a file created on the client site and I do not have control over it. User can see table in that file without any problems in the .NET application and in the Microsoft Word but in PowerBuilder table shows incorrectly and in .PDF file also incorrectly as result of it .

I downloaded a trial version version of the TX Text Control ActiveX 30.0 (recommended by PowerBuilder). I was not able to use it in PowerBuilder without a license key, but I used it as stand-alone program and opened that same RTF file, Table was not shows correctly as well. I tried another free trial TER Control from the company SybSystems and table was shows correctly in that control.

Thank you for you time.

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Sunday, 16 January 2022 08:25 AM UTC
  2. PowerBuilder
  3. # 8

I've made a small application that loads an RTF file from disk and shows it on the v28.0 Richtext edit control.

See the attached zip file. (pb2019 r3). It works fine if I load an RTF made with Word or LibreOffce. It's just your RTF that indeed shows the table in a bad way. When loading your rtf and then reloading another RTF after that, I was told that the display of the rte cannot be displayonly (which it's not) and was even asked for a Password, so definitely something is wrong with it.

Remember I also told you that Wordpad.exe doesn't show any content of you rtf at all.

My best guess is that you'd try to figure out with the .Net service what might be wrong. If that's not possible, there are some tools that convert to RTF format, maybe that could be a last resort solution.

See attached.

regards

Attachments (1)
Comment
There are no comments made yet.
MARK APTEKAR Accepted Answer Pending Moderation
  1. Sunday, 16 January 2022 15:41 PM UTC
  2. PowerBuilder
  3. # 9

Thank you to ALL for the quick responses and willingness to help me !!! 

I will explore another ways convert document to PDF.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.