Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6710865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:04:19+00:00 2026-05-26T08:04:19+00:00

I am interested in creating tables in a PDF document with XML using iTextSharp.

  • 0

I am interested in creating tables in a PDF document with XML using iTextSharp. I cannot afford the book, and i cant find any examples on the web. I also need to be able to make cellspanning and avoid page breaks in the middle of a table. I would rather prefer the table being sent to the next page.

This is the example ive been follwing: http://www.codeproject.com/Articles/66948/Rendering-PDF-views-in-ASP-MVC-using-iTextSharp.aspx

Does anyone know how to accomplish this or can direct me to some tutorials?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:04:20+00:00Added an answer on May 26, 2026 at 8:04 am

    If you’re using iTextSharp 4.x then you can continue using ITextHandler to parse iText-specific XML. To the best of my knowledge this feature has been removed from the 5.x versions so unfortunately you’re going to have a hard time find support for it. Below is the DTD for the iText XML, hopefully this will help.

    I can’t say why it was removed but I can guess that it had something to do with the fact that if you can write XML you might as well just write regular code. Also, building and maintaining a PDF library while also maintaining a meta-language (XML) for your library is a lot of hassle. So know this, I would personally recommend skipping the XML and just working with the native iTextSharp library.

    <!--
        This DTD can be used to validate the output of XmlWriter.
        XmlWriter is part of the iText library by lowagie.com
    
        For further information, see: http://www.lowagie.com/iText/
    
        Copyright 2001 by Bruno Lowagie
        All Rights Reserved.
    -->
    
    <!ENTITY % chunk.content "#PCDATA | newline | newpage | entity | ignore">
    <!ENTITY % phrase.content "chunk | anchor | phrase | list | table | annotation">
    
    <!ENTITY % color.attributes
    "red      CDATA   #IMPLIED
     green    CDATA   #IMPLIED
     blue     CDATA   #IMPLIED"
    >
    <!ENTITY % font.attributes
    "font     CDATA   #IMPLIED
     size     CDATA   #IMPLIED
     style    CDATA   #IMPLIED
     color    CDATA   #IMPLIED
     %color.attributes;"
    >
    <!ENTITY % phrase.attributes
    "leading  CDATA   #IMPLIED"
    >
    <!ENTITY % paragraph.attributes
    "align    CDATA   #IMPLIED"
    >
    <!ENTITY % indentation.attributes
    "indentationleft    CDATA   #IMPLIED
     indentationright   CDATA   #IMPLIED"
    >
    <!ENTITY % section.attributes
    "depth              CDATA   #IMPLIED
     numberdepth        CDATA   #IMPLIED
     indent             CDATA   #IMPLIED"
    >
    <!ENTITY % rectangle.attributes
    "bgred              CDATA   #IMPLIED
     bggreen            CDATA   #IMPLIED
     bgblue             CDATA   #IMPLIED
     width              CDATA   #IMPLIED
     bordercolor        CDATA   #IMPLIED
     backgroundcolor    CDATA   #IMPLIED
     left               CDATA   #IMPLIED
     right              CDATA   #IMPLIED
     top                CDATA   #IMPLIED
     bottom             CDATA   #IMPLIED
     borderwidth        CDATA   #IMPLIED
     grayfill           CDATA   #IMPLIED"
    >
    
    <!ELEMENT itext (%chunk.content; | %phrase.content; | chapter | paragraph)*>
    <!ATTLIST itext
        title       CDATA   #IMPLIED
        subject     CDATA   #IMPLIED
        keywords    CDATA   #IMPLIED
        author      CDATA   #IMPLIED
    >
    
    <!ELEMENT symbol EMPTY>
    <!ATTLIST symbol
        id      CDATA #REQUIRED
    >
    
    <!ELEMENT chunk (%chunk.content;)*> 
    <!ATTLIST chunk
        %font.attributes;
        subsupscript        CDATA   #IMPLIED
        localgoto           CDATA   #IMPLIED
        localdestination    CDATA   #IMPLIED
        generictag          CDATA   #IMPLIED
    >
    
    <!ELEMENT phrase (%chunk.content; | %phrase.content;)*> 
    <!ATTLIST phrase
        %font.attributes;
        %phrase.attributes;
    >
    
    <!ELEMENT anchor (%chunk.content; | %phrase.content;)*> 
    <!ATTLIST anchor
    %font.attributes;
        %phrase.attributes;
        name       CDATA   #IMPLIED
        reference  CDATA   #IMPLIED
    >
    
    <!ELEMENT paragraph (%chunk.content; | %phrase.content; | image)*> 
    <!ATTLIST paragraph
        %font.attributes;
        %phrase.attributes;
        %indentation.attributes;
        %paragraph.attributes;
    >
    
    <!ELEMENT list (listitem | ignore)*> 
    <!ATTLIST list
        %font.attributes;
        %indentation.attributes;
        numbered       CDATA   #IMPLIED
        symbolindent   CDATA   #IMPLIED
        first          CDATA   #IMPLIED
        listsymbol     CDATA   #IMPLIED
    >
    
    <!ELEMENT listitem (%chunk.content; | %phrase.content; | image)*> 
    <!ATTLIST listitem
        %font.attributes;
        %phrase.attributes;
        %indentation.attributes;
        %paragraph.attributes;
    >
    
    <!ELEMENT chapter (title?, sectioncontent) >
    <!ATTLIST chapter
        %section.attributes;
        %indentation.attributes;
    >
    
    <!ELEMENT section (title?, sectioncontent) >
    <!ATTLIST section
        %section.attributes;
        %indentation.attributes;
    >
    
    <!ELEMENT title (%chunk.content; | phrase | chunk | annotation)*> 
    <!ATTLIST title
        %font.attributes;
        %phrase.attributes;
        %indentation.attributes;
        %paragraph.attributes;
    >
    
    <!ELEMENT sectioncontent (%chunk.content; | %phrase.content; | section | paragraph | image)*>
    
    <!ELEMENT table (cell*)>
    <!ATTLIST table
        %color.attributes;
        %paragraph.attributes;
        %rectangle.attributes;
        columns        CDATA   #IMPLIED
        lastHeaderRow  CDATA   #IMPLIED
        cellpadding    CDATA   #IMPLIED
        cellspacing    CDATA   #IMPLIED
        widths         CDATA   #IMPLIED
    >
    
    <!ELEMENT row (cell*)>
    <!ELEMENT cell (%chunk.content; | %phrase.content; | paragraph | image)*>
    <!ATTLIST cell
        %color.attributes;
        %phrase.attributes;
        %indentation.attributes;
        %rectangle.attributes;
        colspan    CDATA   #IMPLIED
        rowspan    CDATA   #IMPLIED
        header     CDATA   #IMPLIED
        nowrap     CDATA   #IMPLIED
    >
    
    <!ELEMENT image EMPTY>
    <!ATTLIST image
        url             CDATA   #REQUIRED
        align           CDATA   #IMPLIED
        underlying      CDATA   #IMPLIED
        textwrap        CDATA   #IMPLIED
        alt             CDATA   #IMPLIED
        absolutex       CDATA   #IMPLIED
        absolutey       CDATA   #IMPLIED
        plainwidth      CDATA   #IMPLIED
        plainheight     CDATA   #IMPLIED
        rotation        CDATA   #IMPLIED
    >
    
    <!ELEMENT annotation EMPTY>
    <!ATTLIST annotation
        title       CDATA   #IMPLIED
        content     CDATA   #IMPLIED
    >
    
    <!ELEMENT newpage EMPTY>
    <!ELEMENT newline EMPTY>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For a while, I've been interested in creating a proof-of-concept chat program using C++.
I'm interested to find which way of creating box shadows with css is most
I am interested in creating a heat map of the stock market using internal
I am interested in creating various kinds and types of javascript animations using traditional
I'm interested in creating a game that uses fractal maps for more realistic geography.
I am interested in creating a website entirely in silverlight (personal reasons) but I
I'm interested in creating a sort of hand-off authentication method, where there's a client
I'm interested in creating a plugin that does this simple task: Steps 1. User
I am interested in creating a web app that uses JSP , Servlets and
I am interested in creating a simple web application that will take in user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.