Word .doc and Linux integration or equivilent

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
harmonytech
Posts: 23
Joined: Fri Apr 11, 2008 5:32 am

Word .doc and Linux integration or equivilent

Post by harmonytech »

Hi there,

Another interesting scenario from me here.

My client has been happy with the new server and is enjoying developing his application with AwareIM. Though I had a question come to me a while ago that I've been searching the answer for but haven't had any luck finding about. So I thought I'd ask here.

He has a bunch of Word .doc files he wants to implement with AwareIM. I'm not sure how this works. I have to ask more questions. But seeing as the server runs on Linux, my client has informed me that when AwareIM is on a Linux server, it can't create docs like this. Maybe it can do .rtf files, I'm not sure.

But from my understanding, the docs are created on the client machines that are using AwareIM, not the server itself. So as long as these machines are running Office, I can't see why my client's vague request won't seem to work.

Sorry for the vague question. I'll elaborate more as I get more information.

Cheers
Steve
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

Aware IM automatically resolves references to attributes enclosed in tags: << ... >>

This happens on the server, not on the client! So you must have support for MSWord engine on the server.

The rtf files on Linux is a workaround.
Aware IM Support Team
jclark58
Posts: 192
Joined: Thu Mar 02, 2006 2:36 am
Location: Tasmania, Australia

Post by jclark58 »

Yes I use RTF docs on linux fine.

Save the .doc as a .rtf file.

Import the rtf file as a TEXT file into the report or document

Edit and insert tags - if you do this from a windows machine it will open the rtf in MS Word.

NB when you Save the edited document into AwareiM after an edit you may see strange error messages about invalid tags with strange //{}hj characters embedded in the tags. This is caused by word embedding RTF codes in the tags.

Edit the document, Copy the tag from word,
open a text editor like Notepad,
Paste the tag into notepad,
Highlight and Copy the tag from notepad and paste in back into word.

This process removes the hidden word formatting

save the Word document and switch back to AwareIM

Save again in AWAREIM - repeat until you get a clean save.
/John
harmonytech
Posts: 23
Joined: Fri Apr 11, 2008 5:32 am

Post by harmonytech »

Thank you so much for the step by step instructions. I will attempt this at my next visit with my client.
harmonytech
Posts: 23
Joined: Fri Apr 11, 2008 5:32 am

Post by harmonytech »

jclark58 wrote:Yes I use RTF docs on linux fine.

Save the .doc as a .rtf file.

Import the rtf file as a TEXT file into the report or document

Edit and insert tags - if you do this from a windows machine it will open the rtf in MS Word.

NB when you Save the edited document into AwareiM after an edit you may see strange error messages about invalid tags with strange //{}hj characters embedded in the tags. This is caused by word embedding RTF codes in the tags.

Edit the document, Copy the tag from word,
open a text editor like Notepad,
Paste the tag into notepad,
Highlight and Copy the tag from notepad and paste in back into word.

This process removes the hidden word formatting

save the Word document and switch back to AwareIM

Save again in AWAREIM - repeat until you get a clean save.
Hi there,

This is the first chance I have had to work on the clients server, so I have some questions.

Firstly, I'd like to put your instructions into my own words, so I understand, and you might be able to confirm I'm thinking on the right track.

•So, if I sit there with the existing word .doc open in MS Word, I Save As .rtf
•Import that .rtf file into the report or document. I assume this is a report created in AwareIM? I'm a little vague on this part of how AwareIM works. It's been a learning experience for both myself and my client.
•Edit and Insert tags. Will this be in AwareIM or once a report is created and it is placed on your desktop.

I'm not sure how this works. You mention the invalid tags due to using MS Word. What if the .rtf files are created using another text editor that isn't Microsoft?

I don't understand the last set of instructions. Edit the document and copy the tag from word. Are you referring to the invalid tag it complains about?

And then paste it into the document which I open in Notepad? Then copy and paste it back to the same document open in MS Word. Is that right?

I'm not questioning why or how it works. I'm questioning my own understanding on the steps you have taken.

Cheers
Steve
jclark58
Posts: 192
Joined: Thu Mar 02, 2006 2:36 am
Location: Tasmania, Australia

Post by jclark58 »

Sorry Steve I have a made a few assumptions.

Generation of Documents and Reports in AwareIM can be a number of forms - PDF, Text or documents in MS Word .doc format.

Word format Documents in AwareIM requres that AwareIM interacts with the MS Word application on the same machine. However when AwareIM is running on a Linux machine this is not possible. A workaround is possible by converting the word document to a text format and then treating it as a text document that AwareIM can search for tags and replace.

The Rich Text Format (often abbreviated RTF) is a free document file format developed by Microsoft in 1987 for cross-platform document interchange. Most word processors are able to read and write RTF documents. See [url]http://en.wikipedia.org/wiki/Rich_Text_Format[/url]

The idea is to embed <<AWareIM.tags>> into the word document either before or after it has been converted to RTF. This is always done in a wordprocessor that can load and save RTF because the RTF codes are not very human readable. (If you are developing in AWareIM from a windows machine it will use word to open the rtf document for you.)

The gotcha is that word does not know about the AwareIM tags and I found that it is possible to have a mixture of invisible RTF formatting inside the AwareIM tags - this confuses AwareIM and will cause and error when you try to save the document in AwareIM.

The best way to remove these mixed invisible codes is to open the document in Word or whatever wordprocessor you use. Copy the AwareIM tag and paste it into a plain vanilla text editor that has no provision for hidden codes (this effectively removes the RTF codes) Then copy the now clean text and paste it back into the RTF document.

You may well find that you have multiple instances of these spread throughout the document especially after you have been formatting it so you will either need to work through the document saving each time to find the next error.

(NB You can quickly sanitise a whole document by Select All and paste then copy back from the text editor but you will lose all your formatting.)

I hope this helps

John
/John
harmonytech
Posts: 23
Joined: Fri Apr 11, 2008 5:32 am

Post by harmonytech »

Okay,

Just an update. I went ahead and just opened the current Word .doc and saved it as an .rtf

AwareIM took it and accepted it. When in the configtool.exe, I imported the document and if I want to edit it, it opens it in Word.

All the formatting is fine, the client is happy about that.

My next step is to set up awareim so it can send email.

The document will essentially be a newsletter template, so you can send individual or batch emails with the document attached.

I'll search for that answer in the forums. But if I don't find anything, I'll post a new thread asking about that.

Cheers
Steve
harmonytech
Posts: 23
Joined: Fri Apr 11, 2008 5:32 am

Post by harmonytech »

Oh, interesting issue. But I'm trying to figure out what it means.

When in AwareIM (not the configtool), actually using it from a client pc, my client wanted to select a clients name, and print out a .rtf document that we saved earlier. This is a template. Where the client is selected, the template is said to fill in the blanks and have a "personalised" letter sent to them.

Eventually we will want this to be able to email (another area of AwareIM I have no clue about yet - but we'll cross that bridge when we get to it).

When in AwareIM and we go through the motions of creating this personalised document to print, we get an error at the bottom of the browser (but within the AwareIM interface) that states, "Internal Error".

Now, I'm putting this down to the fact that the AwareIM server has no idea about the printer that is on the network. I assume this will work once there's a printer to print to.

Am I right in thinking this?

Cheers
Steve
jclark58
Posts: 192
Joined: Thu Mar 02, 2006 2:36 am
Location: Tasmania, Australia

Post by jclark58 »

Steve

Any association with a printer is entirely local.

All that will happen when you open the document is that it will be downloaded from the AwareIM server to your computer. If you have an application such as word configured to open that type of document then it will open on your machine. You then print from that application.

AwareIM does not interface with any local or network printer. You use a local application to do that.

You will need to be more explicit aboit the actions you take leading up to the Internal Error.

Also look in the AwareIM logs for any more detailed error messages.
/John
harmonytech
Posts: 23
Joined: Fri Apr 11, 2008 5:32 am

Post by harmonytech »

Ah, so the lack of printer at this stage has nothing to do with it.

I guess the internal error is the rtf formatting that you talked about in your post above. I'll have to go back and look for the tags.

Though, when in the configtool, I can edit the document after it has been uploaded. It opens in Word on the client PC. But it won't when it's opened though AwareIM's user interface thought the browser.

Cheers
Steve
jclark58
Posts: 192
Joined: Thu Mar 02, 2006 2:36 am
Location: Tasmania, Australia

Post by jclark58 »

Steve

The tag error I spoke about usually occurs in the config tool when you ave the document (either from word or when you Save the Document Template _ I dont recall offhand)

I suggest you check the AWareIM log immediately after the error presents.
/John
harmonytech
Posts: 23
Joined: Fri Apr 11, 2008 5:32 am

Post by harmonytech »

Ah okay. I will be seeing the client again in a few days,

I'll post the error in the log as soon as it occurs.

Cheers
Steve
harmonytech
Posts: 23
Joined: Fri Apr 11, 2008 5:32 am

Post by harmonytech »

I had an opportunity to check the logs today. There were no errors in the error log.

I'm still trying to get this printer going on this linux box though. As the client believes that when they evaluated AwareIM on their laptop (Windows), they just selected the client in their database, selected the template to print, and it came out the printer.

It didn't open in Word. That's when you're in the configtool. Not the web interface actually using the application.

I'll be seeing them again in a few days after more reading.
harmonytech
Posts: 23
Joined: Fri Apr 11, 2008 5:32 am

Post by harmonytech »

Hi there. Been a while. I'm back at my clients and we did some further testing.

Turns out the original printer we had connected to the network has ZERO Linux support. Which sucks, but we have a second printer on the side that is fully supported by CUPS, so printing now works.

That's the good news. The bad news is, this didn't change the highly descript "Internal Error" that appears in red at the bottom of the screen when my client goes to print a form within AwareIM.

I checked the error logs, low and behold, the error appears. But I'm not sure where to go from here. I have pasted the logs leading up to the error too.

Here is the error-log;
2008-06-16 12:45:05,837 ACTION_EXECUTION CustomerManagement#nick -15 Executing action FIND Customer WHERE Application.CustomerParent=Customer
2008-06-16 12:45:05,843 ACTION_EXECUTION CustomerManagement#nick -33 Found 1 objects
2008-06-16 12:45:05,843 ACTION_EXECUTION CustomerManagement#nick -16 Finished executing action FIND Customer WHERE Application.CustomerParent=Customer
2008-06-16 12:45:05,843 RULE_EVALUATION CustomerManagement#nick -29 Started evaluation of rules
2008-06-16 12:45:05,844 RULE_EVALUATION CustomerManagement#nick -22 Evaluating rule 'StatusSheetProcess' DISPLAY DOCUMENT StatusSheet
2008-06-16 12:45:05,844 RULE_EVALUATION CustomerManagement#nick -2 Adding action DISPLAY DOCUMENT StatusSheet to the agenda
2008-06-16 12:45:05,844 RULE_EVALUATION CustomerManagement#nick -16 Finished rule evaluation
2008-06-16 12:45:05,844 RULE_EVALUATION CustomerManagement#nick -16 Finished evaluation of rules
2008-06-16 12:45:05,844 ACTION_EXECUTION CustomerManagement#nick -15 Executing action DISPLAY DOCUMENT StatusSheet
2008-06-16 12:45:05,850 ACTION_EXECUTION CustomerManagement#nick -16 Finished executing action DISPLAY DOCUMENT StatusSheet
2008-06-16 12:45:05,850 GENERIC CustomerManagement#nick -18 Process GenerateStatusSheet has failed
The status sheet was created within AwareIM, so there is no Word Doc incompatibility issues being hosted on a Linux server.

My client and I came up with a good point when we tried to use the "print screen" button where we would both prefer to have the document "export" or "DISPLAY" the file as PDF.

I assume this would mean that the Linux server would need a PDF writer to accomplish? We both agree this is a better option anyway, rather than printing.

What are your thoughts?

Thanks and best wishes
Steve
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

As far as the error is concerned, please attach the output of the Aware IM Server.

PDF writing should be supported on Linux out-of-the-box.
Aware IM Support Team
Post Reply