Answered by:
Generating PDF Report from XML using BizTalk

Question
-
Hi ,
I have a following requirement to implement using BizTalk
- Pool the data from SQL DB.
- After that Generate PDF Report(I.e. Specific Format Layout) using pooled data
- Send the PDF to End User using SMTP
Could you please suggest ,How to Generate PDF Report from XML data using BizTalk.
Tuesday, January 3, 2017 3:14 AM
Answers
-
Hi,
Yes, ItextSharp is your best bet for such requirement where you need to generate a PDF file containing a table where some of the cells included images.
Refer: https://weblogs.asp.net/ricardoperes/generating-pdf-files-with-itextsharpYou can google and get more references around ItextSharp which meets your requirement.
Also refer to Mahesh's reply here: https://social.msdn.microsoft.com/Forums/en-US/e8196919-1b96-416d-9244-a4c084bbc548/generate-a-text-or-pdf-file-from-a-xml-input-file?forum=biztalkgeneral
Rachit Sikroria (Microsoft Azure MVP)
- Edited by Rachit SikroriaModerator Tuesday, January 3, 2017 3:50 AM
- Proposed as answer by Rachit SikroriaModerator Wednesday, January 11, 2017 1:15 AM
- Marked as answer by Rachit SikroriaModerator Wednesday, January 11, 2017 1:15 AM
Tuesday, January 3, 2017 3:46 AMModerator -
Hi ,
You can refer the code at MSDN Gallery for Pdf writer pipelinecomponent for BizTalk .
You can use xslt to format your message
https://code.msdn.microsoft.com/Pdf-writer-pipelinecomponen-673843f9
Thanks
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply
- Proposed as answer by Rachit SikroriaModerator Wednesday, January 11, 2017 1:15 AM
- Marked as answer by Rachit SikroriaModerator Wednesday, January 11, 2017 1:15 AM
Tuesday, January 3, 2017 4:04 AM
All replies
-
Hi,
There is no out of box tool or technique to convert XML to PDF because XML has a totally different way of representing data, however in PDF you may be interested in tabular, graphical or any other representation.
Therefore there are two options-
1) Is to use components written by others.
2) Write a pipeline component or C# library of your own.
http://www.codeproject.com/Articles/18119/Creating-PDF-Tables-using-C-NET-and-iTextSharp
http://sourceforge.net/projects/itextsharp/
Rachit Sikroria (Microsoft Azure MVP)
- Edited by Rachit SikroriaModerator Tuesday, January 3, 2017 3:28 AM
Tuesday, January 3, 2017 3:25 AMModerator -
Hi BizQ
You will have to rely on 3rd party .NET components that can generate the PDF file for you.
So, after polling from XML, apply a map/XSLT that will be the input to the PDF generation component. You can use this custom 3rd party component either in a Send pipeline or in an orchestration.
There are quite a few options, please refer-
https://www.codeproject.com/articles/595650/creating-pdf-documents-from-xml
http://stackoverflow.com/questions/6287880/pdf-to-xml-conversion-using-net
https://code.msdn.microsoft.com/windowsapps/Convert-PDF-file-to-XML-f5dd02ed
Thanks Arindam
Tuesday, January 3, 2017 3:34 AMModerator -
Thanks For Response
The Report should have some predefined template like Header having Comp any Logo with Border line and similarly Footer and Data contain Multiple rows.
More we are looking for free library.
Itextsharp will meet above requirement?
Tuesday, January 3, 2017 3:38 AM -
Hi,
Yes, ItextSharp is your best bet for such requirement where you need to generate a PDF file containing a table where some of the cells included images.
Refer: https://weblogs.asp.net/ricardoperes/generating-pdf-files-with-itextsharpYou can google and get more references around ItextSharp which meets your requirement.
Also refer to Mahesh's reply here: https://social.msdn.microsoft.com/Forums/en-US/e8196919-1b96-416d-9244-a4c084bbc548/generate-a-text-or-pdf-file-from-a-xml-input-file?forum=biztalkgeneral
Rachit Sikroria (Microsoft Azure MVP)
- Edited by Rachit SikroriaModerator Tuesday, January 3, 2017 3:50 AM
- Proposed as answer by Rachit SikroriaModerator Wednesday, January 11, 2017 1:15 AM
- Marked as answer by Rachit SikroriaModerator Wednesday, January 11, 2017 1:15 AM
Tuesday, January 3, 2017 3:46 AMModerator -
Hi ,
You can refer the code at MSDN Gallery for Pdf writer pipelinecomponent for BizTalk .
You can use xslt to format your message
https://code.msdn.microsoft.com/Pdf-writer-pipelinecomponen-673843f9
Thanks
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply
- Proposed as answer by Rachit SikroriaModerator Wednesday, January 11, 2017 1:15 AM
- Marked as answer by Rachit SikroriaModerator Wednesday, January 11, 2017 1:15 AM
Tuesday, January 3, 2017 4:04 AM