ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Creating a PDF file from XML input

Post new topic  Reply to topic
 Creating a PDF file from XML input « View previous topic :: View next topic » 
Author Message
inder
PostPosted: Thu Mar 18, 2010 7:58 pm    Post subject: Creating a PDF file from XML input Reply with quote

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
View user's profile Send private message
elvis_gn
PostPosted: Thu Mar 18, 2010 8:40 pm    Post subject: Re: Creating a PDF file from XML input Reply with quote

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
View user's profile Send private message Send e-mail
broker_new
PostPosted: Fri Mar 19, 2010 3:16 am    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

http://api.itextpdf.com/
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
inder
PostPosted: Fri Mar 19, 2010 8:11 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Mar 19, 2010 8:43 am    Post subject: Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Fri Mar 19, 2010 9:07 am    Post subject: Reply with quote

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
  1. map from the message broker logical tree into native Java data types
  2. use a PDF java library, perhaps the one pointed to here to construct a new PDF document or load a "template"
  3. insert the message data
  4. tell the PDF library to serialize the document into a bitstream
  5. 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
View user's profile Send private message
Vitor
PostPosted: Fri Mar 19, 2010 9:23 am    Post subject: Reply with quote

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
View user's profile Send private message
broker_new
PostPosted: Fri Mar 19, 2010 11:37 am    Post subject: Reply with quote

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
View user's profile Send private message
inder
PostPosted: Fri Mar 19, 2010 11:51 am    Post subject: Reply with quote

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
  1. map from the message broker logical tree into native Java data types
  2. use a PDF java library, perhaps the one pointed to here to construct a new PDF document or load a "template"
  3. insert the message data
  4. tell the PDF library to serialize the document into a bitstream
  5. 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
View user's profile Send private message
broker_new
PostPosted: Fri Mar 19, 2010 11:57 am    Post subject: Reply with quote

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
View user's profile Send private message
WMBDEV1
PostPosted: Fri Mar 19, 2010 12:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Fri Mar 19, 2010 1:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Creating a PDF file from XML input
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.