Hi Dave,
Iam trying to convert .rtf files into .pdf files as my current module demands. Iam trying to use the PDFCreator package for this. Every time, it seems i
have found the solution but am not able to map .rtf document content into
a valid .pdf.
Iam fetching the source .rtf document from a FTP site and iam writing
the destination .pdf file in the IS …/packages/PDFCreator/pub location.
We are using WM 6.1
These are the following 2 approaches i have tried -
-
pub.client.ftp:get (to get the .rtf file from remote FTP site)
pub.string:bytesToString (to fetch the content as string)
pdf.generate:beginPDF
pdf.generate:addParagraph (to put the content as a paragraph in .pdf)
pdf.generate:addDocumentElement
pdf.generate:endPDF
pdf.file:convertToFile (giving test1.pdf as fileName)
This is obviously not right approach because once i convert incoming file
into string, lot of formatting information appears as garbage in .pdf file.
-
pub.client.ftp:get (to get the .rtf file from remote FTP site)
pdf.file:bytesToFile (fileName=test1.pdf & creates file in pub folder)
pub.client.ftp:put
In this case, adobe gives following error message when trying to open file-
File does not begin with ‘%PDF-’ OR
Adobe Reader could not open “test1.pdf” because it is either not a
supported file type or because the file has been damaged(for example, it
was sent as a email attachment and wasn’t properly decoded).
Could you list the correct steps to do .rtf to .pdf conversion.
I think if i can use pdf.generate:beginPDF, pdf.file:bytesToFile,
pdf.generate:addDocumentElement and pdf.generate:endPDF, the format
information will be restored correctly to open as .pdf. I wish there was
a service in your samples folder that showed usage of pdf.file:bytesToFile.
Shall await response/solution. Thanks a lot in advance.
-Jagan
#Flow-and-Java-services#Integration-Server-and-ESB#webMethods