Author |
Message
|
inder |
Posted: Thu Mar 18, 2010 7:58 pm Post subject: Creating a PDF file from XML input |
|
|
Apprentice
Joined: 24 Mar 2003 Posts: 49 Location: USA
|
Has any one implemented converting a XML message to a PDF using Message Broker? Is it possible.
I am trying to do a POC. Any inputs will be greatly appreciated |
|
Back to top |
|
 |
elvis_gn |
Posted: Thu Mar 18, 2010 8:40 pm Post subject: Re: Creating a PDF file from XML input |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi inder,
inder wrote: |
Has any one implemented converting a XML message to a PDF using Message Broker? Is it possible.
I am trying to do a POC. Any inputs will be greatly appreciated |
Not out of the box.
Perhaps you can look for some free pdf converter packages.
Regards. |
|
Back to top |
|
 |
broker_new |
Posted: Fri Mar 19, 2010 3:16 am Post subject: |
|
|
 Yatiri
Joined: 30 Nov 2006 Posts: 614 Location: Washington DC
|
|
Back to top |
|
 |
inder |
Posted: Fri Mar 19, 2010 8:11 am Post subject: |
|
|
Apprentice
Joined: 24 Mar 2003 Posts: 49 Location: USA
|
Thanks for the replies.
But has any one implemented some thing like this.... |
|
Back to top |
|
 |
Vitor |
Posted: Fri Mar 19, 2010 8:43 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
inder wrote: |
But has any one implemented some thing like this.... |
Apparently not. Which means we'll all be looking forward to hearing how you get on.
(I think it sounds really interesting!).  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Mar 19, 2010 9:07 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
It's entirely possible to do in pure ESQL, I'm sure. PDF is just text, or should be.
It would be an excessive amount of work however.
Using an existing PDF creation library, it should be "as easy as" use a JCN to
- map from the message broker logical tree into native Java data types
- use a PDF java library, perhaps the one pointed to here to construct a new PDF document or load a "template"
- insert the message data
- tell the PDF library to serialize the document into a bitstream
- insert the bitstream into the Java equivalent of OutputRoot.BLOB.BLOB
And then use normal message broker nodes to output the PDF document however you want. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Mar 19, 2010 9:23 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
It's entirely possible to do in pure ESQL, I'm sure. PDF is just text, or should be. |
But to answer the OP's basic question you've not actually done this?
Which in no way diminishes the value of your suggestion as a possible method of doing it. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
broker_new |
Posted: Fri Mar 19, 2010 11:37 am Post subject: |
|
|
 Yatiri
Joined: 30 Nov 2006 Posts: 614 Location: Washington DC
|
do you suggest implementing it in Message Broker?  _________________ IBM ->Let's build a smarter planet |
|
Back to top |
|
 |
inder |
Posted: Fri Mar 19, 2010 11:51 am Post subject: |
|
|
Apprentice
Joined: 24 Mar 2003 Posts: 49 Location: USA
|
mqjeff wrote: |
It's entirely possible to do in pure ESQL, I'm sure. PDF is just text, or should be.
It would be an excessive amount of work however.
Using an existing PDF creation library, it should be "as easy as" use a JCN to
- map from the message broker logical tree into native Java data types
- use a PDF java library, perhaps the one pointed to here to construct a new PDF document or load a "template"
- insert the message data
- tell the PDF library to serialize the document into a bitstream
- insert the bitstream into the Java equivalent of OutputRoot.BLOB.BLOB
And then use normal message broker nodes to output the PDF document however you want. |
Thanks for the Suggestion. I was thinking in the same line too.
Any IBM guys comment on this... can it be done? |
|
Back to top |
|
 |
broker_new |
Posted: Fri Mar 19, 2010 11:57 am Post subject: |
|
|
 Yatiri
Joined: 30 Nov 2006 Posts: 614 Location: Washington DC
|
For proof of concept i have done it broker(WMBv6.0.3),
but haven't load tested it. later we decided to do it in Java(App server) _________________ IBM ->Let's build a smarter planet |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Fri Mar 19, 2010 12:10 pm Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
mqjeff wrote: |
PDF is just text, or should be.
|
I think this is generally true, unless they contain embedded images for example. Just a thought and happy to be corrected. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Mar 19, 2010 1:12 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
WMBDEV1 wrote: |
mqjeff wrote: |
PDF is just text, or should be.
|
I think this is generally true, unless they contain embedded images for example. Just a thought and happy to be corrected. |
Well, PDF is a dialect of PostScript and PostScript should in theory consist only of plain text - in much the same way that an SMTP message should consist of plain text.
I believe PDF has some structures that allow for the embedding of binary content, in a vague analogy to a CDATA structure in an XML Document (except CDATA *does not* let you embed binary content). But I also believe it's better practice to embed it in a transcoded form like base64.
But it's been a long time since I've played with the state of the art of these things, so that could all be decades out of date. |
|
Back to top |
|
 |
|