Bulleted list from XML and XSL

This code sample helps getting a bulleted list from XML and XSL.

See PDF output.


<?xml version="1.0" encoding="utf-8" ?>


<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:template match="/">
      <section pagesize="a4" startonnewpage="true">
        <xsl:apply-templates select="countries"/>

  <xsl:template match="country">
    <paragraph type="NumberedItem">
      <numberfragment type="fragment" font="symbol" fontsize="10">&#xb7;</numberfragment>
      <fragment fontsize="10">
        <xsl:value-of select="name"/>



// Load XML
XmlDocument xml = new XmlDocument();

// Load XSL
XslTransform xsl = new XslTransform();

// Transform
XmlReader reader = xsl.Transform(xml, null);

// Write PDF
Document doc = new Document();

using (FileStream file = new FileStream("out.pdf", FileMode.Create, FileAccess.ReadWrite))
Download TallPDF.NET 4.0
We will send you a download link
Why do we ask your email address?
We send tips that speed up your evaluation
We let you know about bug fixes
You can always unsubscribe with one click
We never share your address with a 3rd party
Thank you for your download

We have sent an email with a download link. Alternatively, you may want to use the NuGet package manager to install our library.

Nuget ID

Use the NugetID and start right away, or download the package and install it handmatically