Posted by: Benoit Dubuc | 2011/03/30

Help needed on a very old issue: Rich Text data to PDF (or HTML)

I know, this topic has been discussed a lot. I have done a lot of research on the subject and took many different approaches to this problem, but nothing conclusive yet.

Here is the issue: Domino 6.5 server, meaning only Java 1.3 SDK available. Goal is to take a Notes document and send it to a different system in either HTML of PDF format. These files are then integrated to other stuff and will eventually end up on a Blackberry.

Images might be embedded in the Notes document and we need them. No third party tool can be involved as that company is phasing out Notes and the application that I work on has a very limited life (1-2 years top).

Now iText is almost out of question as I have to use some pretty old versions and the ones with HTML and RTF support are not giving good results.

I also tried exporting the document as DXL but the issue I have with this approach is that all the 6.5 examples about using XSLT to convert DXL to a standard HTML page are in the Sandbox, and of course, I don’t have a copy of the sandbox (deleted my replica thinking it would NEVER go offline… bummer). Edit: I now have a link to the Sandbox but didn’find anything helpful…

I also used Julian Robichaux’s RT2HTML ( http://www.nsftools.com/tips/NotesTips.htm#richtexttohtml ) , which works wonders, but I have no clue what to do to convert the MIME/HTML that is generated by this app: it is basically the content of the email that would be sent. I need an HTML page with related images created for this approach to work. I have to admit, I know zip about MIME.

I also tried converting to RTF but the rendering has some issues that make this solution unusable.

If you have any hints or help for one of the above approaches, please let me know. I don’t need info on third party products, or know that the Notes document could be opened through the browser, just focus on what I have described here. There are lots of missing small details, but the essential parts are there.

Remember that the output I need is a PDF or and HTML representation of Notes document that contains rich text fields. All that has to be done on a Domino 6.5 server.

If you need more info, you can drop me a note at dubuc_benoit at hotmail.com

Your help is greatly appreciated.

Thanks a lot,
Ben

About these ads

Responses

  1. if you want a cheap solution then you could probably create a print form and send all documents to a PDF Printer. If you have embedded attachments you would need additional code that handles attachments (and they will appear as icons icons in the pdf). It is a bit sad reading that so many companies are phasing out Notes.

  2. look at http://www.geniisoft.com product Midas. It works on your platform, in LotusScript, and has very active support.

  3. Unfortunately I think Midas will fall into the “No third party tool can be involved” trap.

  4. Well, then you will just have to rewrite the iText java library from scratch.

    My personal opinion: People are way to frugal concerning using the proper tools. This hurts more than most managers seem to be aware of.

  5. Thanks for your input, guys.

    One thing I forgot to mention is that we need to automate the print process, as we need to save the file with a specific name and in a specific folder. Installing a PDF Printer is not the optimal solution as it is quite hard to control the print dialog in Notes. Mind you, I found “CutePDF:, that has a custom PDF Writer with programmatic access but that is still a third party product. It looks pretty interresting, though the code examples are in .Net but surely easy to adapt to Lotuscript. But the question remains: would I be able to control the Notes print dialog.

    I already looked at SWING Software’s PDF solution, installed the demo and made things work in about 10 minutes, including download time! That was last week. They are still debating on what to do: convert to RTF then to PDF somewhere else, controlling the print dialog so we can specify the folder the file is saved to, and so on. Being a consultant, I think I will end up costingmore than the Swing solution while they still talkabout the issue. But hey, they are the client. I made my recommendation and in the end, it’s up to them to decide.

    Lars, I agree: this is getting a bit ridiculous as while they talk, I bill consulting hours and I’m sure it’ll end up that days I spent searching for possible solutions will add up to more than the cost of the product. Sometimes business decisions are just plain weird and that’s the way it is. I will go look at Genii’s Midas as I didn’t yet. Who knows…

    Again, thanks for the comments and ideas.

  6. Run a current JVM on your server and then use a Java app (independent from Notes) running on the server that uses the Apache HTTP client to collect the HTML from the Domino HTTP task.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: