Writing PDF files in Webmethods

Hi,

I’m trying to convert convert a text file into pdf. However when I open the pdf created by my services it errors out. I’m missing something.

What are the step required to do this?

Thanks-Milind

Hi Milind

What is the error you are encountering? There is also a “PDFCreator” package in the wmusers shareware which could help you out.Just search in the shareware with the above package name.

Krishna

Hi Milind

You can also use FOP to creat pdf from xml (document to xml string). You will have very reach control over formatting and stuff with FOP.

I have done it before and it works great…

You will have to create a java service to conver xml+xslt to to PDF…

This is just another option…

http://xmlgraphics.apache.org/fop/index.html

Cheers,
Ajit

I’ve used the PDFCreator Krishna mentioned (it uses iText internally), FOP, and PDFBox. All work well. FOP provides the richest control but is also the most complex to use. If your needs are simple, the PDFCreator package is the way to go.

Hi,

In one of our interface we have converted the xml document into html format using xslt:transformation service. (we have a xslt file for that xml document). Now our requirement is to email that html content as pdf file. We tried using the PDFCreator services, but haven`t helped.

1.-pdf.generate:beginPDF
2.-pdf.generate:addDocumentElement
3.-pdf.generate:endPDF

html content in bytes format is mapped to addDocumentElement service, which is erroring out.

Can you guys help us out in putting a right sequence of services from PDFCreator package to fulfill our requirement? Or please share me any sample implementation done using PDFCreator.

Follow below order and create folders as “app/webm” in IntegrationServer/packages/PDFCreator/pub/app/webm

ex:IntegrationServer/packages/PDFCreator/pub/app/webm/app/webm

Try this order:

1.-pdf.generate:beginPDF
2.-pdf.generate:addParagraph
3.-pdf.generate:addDocumentElement
4.-pdf.generate:endPDF
5.-pdf.file:convertToFile

Thanks
Ravi

Hi Ajit,
As you said and done with PDF implementation could you please share any sample service to convert IS Document to PDF.

Regards,
Datta