Wow, over a month now and still NO REPLY!?
Is there some other forums for CF on the net that actually have enough active users that a response is likely?
Sorry I do not have an answer for you. I think it is a matter of someone that has done this before seeing your question. While I have not, I suspect it may involve java. The closest I have seen is an entry on majix(convert rtf to xml) and ujac (convert to xml to pdf). It may not be the best way to go. I am just throwing it out as a possibility.
You might also ask over at CF-Talk on houseoffusion.com. If you do get an answer, please post back here. I would be interested to know what you end up doing.
Thanks for replying cfsearching. At least I don't feel like a lone voice.
I will try your suggestions. Two years (or more?) ago, before Adobe got Allaire, Adobe had an application that would run on one's web server and that would do PDF of various documents on the fly. Our department couldn't afford it then. Now, Adobe doesn't seem to have that application available anymore. We were hoping that they would add the PDF concatenating engine to CF now that they own it.
Oh well! I appreciate the feedback.
Well, as Azadi said you can concatenate pdfs easily using cfpdf. Obviously the missing step is getting from rtf to pdf. If you could convert from rtf > html then you could use cfdocument to create the pdfs. But there may be a better way. Now that I think about, you might take a look at LiveCycle. It appears to have this capability http://www.adobe.com/products/livecycle/pdfgenerator/features.html
> way. Now that I think about, you might take a look at LiveCycle. It appears to
> have this capability
yes i would explore this method as iText (which powers a lot of cf's PDF bits)
currently can't read RTF--though somebody's working on it:
or another trick might be to use POI to parse the RTF.
> as iText ... currently can't read RTF--though somebody's
> working on it:
Cool. That would be a nice addition to to iText.
> or another trick might be to use POI to parse the RTF.
I was wondering about that. So what format would POI parse it into? ie From RTF > POI (??) > To iText
> I was wondering about that. So what format would POI parse it into? ie From
> RTF > POI (??) > To iText
i *think* POI will extract just the text. if you need to reproduce the original
formatting you'll need something more heavy-duty which often means commercial.
> i *think* POI will extract just the text.
Interestingly POI appears to extract text and style information. Though the documentation is a little sketchy in some areas. From what I can tell POI does not support rtf, only ms word doc files. I think javax.swing.text.rtf does though.
Unless you have the time to devote to it, a commercial product is probably the way to go for now.
The new release of itext seems to imply that it can now handle rtf, albeit I have not as of yet tried it.
public class RtfWriter2extends DocWriterThe RtfWriter allows the creation of rtf documents via the iText system Version: $Id: RtfWriter2.java 2996 2007-11-20 22:40:36Z hallm $
from this page
> The new release of itext seems to imply that it can now handle rtf, albeit I
> have not as of yet tried it.
> public class RtfWriter2extends DocWriterThe RtfWriter allows the creation of
> rtf documents via the iText system Version: $Id: RtfWriter2.java 2996
> 2007-11-20 22:40:36Z hallm $
it's pretty much *always* been able to *create* RTF files, this problem is about
reading in RTF & writing the text out as a PDF.
In my view you may convert each RTF file to PDF in memory and next next merge PDF documents into single PDF:
1. Convert each RTF to PDF in memory
SautinSoft.PdfMetamorphosis p = new SautinSoft.PdfMetamorphosis();
ArrayList pdfs = new ArrayList();
//1st RTF to PDF
byte pdf = p.RtfToPdfConvertByte(rtfString1);
//2nd RTF to PDF
pdf = p.RtfToPdfConvertByte(rtfString2);
//etc, or you may use loop
2. Merge several PDF to single PDF on fly
//merge to single PDF
byte singlePDF = p.MergePDF(pdfs);
if (singlePDF != null)
Response.Buffer = true;
Response.ContentType = "application/PDF";
Response.AppendHeader("content-disposition", "attachment; filename=single.pdf");
This code uses the .Net component 'PDF Metamorphosis .Net', so it will also work in CF8.