PDF Report

I downloaded and installed the PDF Creator package from WM Users.
Can somebody give me a sample Flow service for generation of PDF File

Regards
Ashish

I created the PDFCreator package, so I assembled this patch that can be installed into the PDFCreator package that will create a samples folder with a few simple samples.

Hope this helps.

Dave
PDFCreator_Samples.zip (31.7 KB)

I get an Error: Target package does not exist, installation fails. error message in

Product webMethods Integration Server Version 6.5 Updates None Build Number 395
Java Version writeTD(“rowdata-l”); 1.4.2_07 (48.0)

Is your PDF package called ‘PDFCreator’ or something like ‘2314PDFCreator’? You may need to change the manifest.v3 or manifest.rel file included in the zip file to reflect the name of your PDFCreator package.

I changed your samples package to manifiest to 2314PDFCreator and zipped it and it installed.

C:\webMethods65\IntegrationServer\packages\2314PDFCreator\PDFCreator_Samples

is created.But in developer i dont get any new service etc.

How do I run your sample

My package is called PDFCreator on my webMethods install and the samples folder exists within that package, actually all the flow services for creating PDF’s along with the samples reside in one package. If you don’t have everything in one package then something is wrong.

To run the samples, just execute pdf.samples:basicParagraphWithChapter for example and a pdf should be created in the pub folder of the package.

Hope that helps.

Hello

I’ve been looking in vain for this PDF creator package.

Where can I find this?

Thanks

Stef

check here [url]wmusers.com

this thread has a post by vilavd with the package as attachment

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 -

  1. 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.

  2. 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

I would like to know if anyone as implemented .rtf to .pdf (or .doc to .pdf)
using the PDFCreator services. I would appreciate any details on such
implementation. Seems like these are the correct services but content in the
target .pdf document is not proper after the transformation.

Properly converting RTF to PDF is not a trivial undertaking. The PDF Creator package provides the low-level tools to create PDF files but does not provide any conversion facilities.

To get the right formatting, one would need to read the RTF data in such a way as to interpret and convert page layout, paragraph, font, etc. information to the PDF equivalent.

I would recommend searching the web for conversion tools. There are a lot of them available.

hi rob, thanks for the reply. Seems i have to start back and search for
some API or java classes on the net. Appreciate your suggestion. - Jagan

there used to be a project from IBM on these lines… I dont know if they have any APIs as such, but search on “IBM FO XSL” and you should find that project on developerWorks.

This was one of IBM’s internal projects which they were using to convert tutorials into pdf/doc/zip formats on the fly. Check it out!!

Hi,

I am running into a Service Exception at the endPDF flow step, when I execute the basicParagraph service given in the samples package. The exception says “com.wm.app.b2b.server.ServiceException: The document is not open”. What does it mean?

Pls help!
Shankar

shankar,

i had the same problem and found out that you MUST use pdf.generate:addDocumentElement inside the flow before you can call endPDF service. Did you disable it?
I had my own testing flow without using this one and was failing on the same error.
But the basicParagraph sample flow ran without any problems, are you sure you have the original version?

//Matt