web stats
Problems with HTML to RTF conversion - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 08-04-2011, 01:48 AM
glucoz glucoz is offline
OBX.1 Kenobi
 
Join Date: Jan 2011
Location: Dijon
Posts: 30
glucoz is on a distinguished road
Default Problems with HTML to RTF conversion

Hi Everybody !

For my project, I have to convert an HTML file into a RTF file.
I found that this can be made in a "Document Writer" destination and it works ... partially.
My RTF file is well created in the directory specified but when I open it, I see that all my tag <style> is displayed in plain text on the top of my document.

Have you any idea on how to solve this problem ?

And I think the conversion is quite long (about 2 minutes for a small html). Is it normal ?

Thank you in advance for your answers.

Have a nice day.
Reply With Quote
  #2  
Old 08-04-2011, 11:25 AM
upstart33 upstart33 is offline
Mirth Guru
 
Join Date: Dec 2010
Location: Chicago, IL.
Posts: 459
upstart33 is on a distinguished road
Default

Have you tried the same code, but instead output a PDF file?

Or try changing it from Document Writer to File Writer and see if that helps any.
Reply With Quote
  #3  
Old 08-04-2011, 11:56 PM
glucoz glucoz is offline
OBX.1 Kenobi
 
Join Date: Jan 2011
Location: Dijon
Posts: 30
glucoz is on a distinguished road
Default

I didn't wrote any piece of code for that...
I created a new destination in Mirth and used the "Document Writer" Connector Type.
I filled in the fields "Directory" and "File Name", I checked RTF and in the field "template", I put the "${message.rawData}" variable which contains my HTML.

What I want to know is : How to keep my HTML structure into the RTF File ?

I also tested with PDF and it's worse because I lost my tables. Anyway I don't want to convert in PDF.

Thank you for your time.
Reply With Quote
  #4  
Old 08-10-2011, 12:37 AM
glucoz glucoz is offline
OBX.1 Kenobi
 
Join Date: Jan 2011
Location: Dijon
Posts: 30
glucoz is on a distinguished road
Default

Have you any idea how to solve this problem ?

Thank you for your answers.
Reply With Quote
  #5  
Old 08-10-2011, 07:27 AM
Bostad Bostad is offline
Level 85 Channel Wizard
 
Join Date: Mar 2009
Location: Stratford Ontario
Posts: 712
Bostad is an unknown quantity at this point
Default

This is a stab in the dark as I've never worked with them, but could an HTTP listener help?

From the settings it appears to give you options as to what to break down and parse.

Also, use message.encodedData I think.
__________________
I can be reached through gmail and Google Talk using davidrothbauer at gmail dot com
http://www.linkedin.com/pub/david-rothbauer/5/923/518
codeismydrug.wordpress.com
hl7coders.wordpress.com

Test all my code suggestions prior to implementation
Reply With Quote
Reply

Tags
document, file, html, rtf, style

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 03:51 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation