Generating pdf from xml without iterating the xml elements

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v7)  /  Generating pdf from xml without iterating the xml elements

DynamicPDF CoreSuite for .NET (v7) Forum

Hi,

I am evaluating your product DynamicPDF Generator to meet few of my requirements.
I was reading the documenation for generating pdf in c# and was not able to find a way where I can send an xml input directly to an inbuild method of dynamicPDF.
The only link I found was this (SimpleXMLReport)
http://www.dynamicpdf.com/Products/DynamicPDFForNET/Generator/Examples.csp#GSimpleReport
 where the xml elements are iterated and using new Label() the PageElements are created

while( reader.Read())
{
if(reader.NodeType == XmlNodeType.Element && reader.Name == "Products")
 {
 currentPage.Elements.Add( new Label( reader.GetAttribute( "ProductName" ), 2, currentY + 3, 236, 11,Font.TimesRoman, 11 ) );
 }
}

Please let me know if we have a way (method exposed) where we can convert an xml to pdf directly.
Or do we have a specific xml structure which your product can use to generate a pdf.

Thank you.
Posted by a ceTe Software moderator
Hello,

It is not possible to generate PDFs from XML without iterating through the XML elements. You will need to retrieve the contents from the XML and then add it to the PDF as shown in the Simple XML Report example.

Thanks,
ceTe Software Support Team.
Hello,
Thank you for the quick response.
One more query, do we have this facility in some of your other product like
-DynamicPDF Converter for .NET
-DynamicPDF ReportWriter

Thank You.
Posted by a ceTe Software moderator
Hello,

You can convert the XML file type to PDF using our DynamicPDF Converter for .NET but please note that Converter API will convert the XML file as is to PDF without modifying it. Also it is not possible to automatically loop through the nodes of XML to retrieve data and create PDF using Converter API. If you would like to try DynamicPDF Converter API then evaluation edition is available for download on our website here.

It is not possible to directly convert XML to PDF using DynamicPDF ReportWriter for .NET product but you can create PDF report using datasets and list of objects. Please refer to the documentation on using list of objects as a data source here. Also you can find the documentation on using event driven queries with data table as the data source here.

Thanks,
ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 2:30 AM.