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

  • Home
  • SEARCH
  • 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 333595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:58:33+00:00 2026-05-12T09:58:33+00:00

for this line: c.WidthPercentage = 100F i am getting this error: Error 1 ‘WidthPercentage’

  • 0

for this line:

 c.WidthPercentage = 100F

i am getting this error:

Error 1 ‘WidthPercentage’ is not a member of ‘iTextSharp.text.Table’.

here’s the entire code. it’s taken directly from the tutorial

Imports System
Imports System.Drawing
Imports System.IO
Imports iTextSharp.text
Imports iTextSharp.text.pdf
Namespace iTextSharp.tutorial.Chap05

Public Class Chap0514

    Public Sub New()
        Console.WriteLine("Chapter 5 example 14: nested tables")
        Dim document As Document = New Document
        Try
            PdfWriter.GetInstance(document, New FileStream("Chap0514.pdf", FileMode.Create))
            document.Open
            Dim secondTable As Table = New Table(2)
            secondTable.AddCell("2nd table 0.0")
            secondTable.AddCell("2nd table 0.1")
            secondTable.AddCell("2nd table 1.0")
            secondTable.AddCell("2nd table 1.1")
            Dim aTable As Table = New Table(4, 4)
            aTable.AutoFillEmptyCells = True
            aTable.AddCell("2.2", New Point(2, 2))
            aTable.AddCell("3.3", New Point(3, 3))
            aTable.AddCell("2.1", New Point(2, 1))
            aTable.InsertTable(secondTable, New Point(1, 3))
            document.Add(aTable)
            Dim thirdTable As Table = New Table(2)
            thirdTable.AddCell("3rd table 0.0")
            thirdTable.AddCell("3rd table 0.1")
            thirdTable.AddCell("3rd table 1.0")
            thirdTable.AddCell("3rd table 1.1")
            aTable = New Table(5, 5)
            aTable.AutoFillEmptyCells = True
            aTable.AddCell("2.2", New Point(2, 2))
            aTable.AddCell("3.3", New Point(3, 3))
            aTable.AddCell("2.1", New Point(2, 1))
            aTable.InsertTable(secondTable, New Point(1, 3))
            aTable.InsertTable(thirdTable, New Point(6, 2))
            document.Add(aTable)
            Dim a As Table = New Table(2)
            a.Widths = New Single() {85, 15}
            a.AddCell("a-1")
            a.AddCell("a-2")
            Dim b As Table = New Table(5)
            b.Widths = New Single() {15, 7, 7, 7, 7}
            b.AddCell("b-1")
            b.AddCell("b-2")
            b.AddCell("b-3")
            b.AddCell("b-4")
            b.AddCell("b-5")
            Dim c As Table = New Table(3, 1)
            c.WidthPercentage = 100F
            c.Widths = New Single() {20, 2, 78}
            c.InsertTable(a, New Point(0, 0))
            c.InsertTable(b, New Point(0, 2))
            document.Add(c)
            Dim t1 As Table = New Table(3)
            t1.AddCell("1.1")
            t1.AddCell("1.2")
            t1.AddCell("1.3")
            Dim t2 As Table = New Table(2)
            t2.AddCell("2.1")
            t2.AddCell("2.2")
            t1.InsertTable(t2)
            t1.AddCell("new cell")
            document.Add(t1)
            t1 = New Table(2, 2)
            Dim i As Integer = 0
            While i < 4
                t1.AddCell("t1")
                System.Math.Min(System.Threading.Interlocked.Increment(i),i-1)
            End While
            t2 = New Table(3, 3)
            i= 0
            While i < 9
                If i = 4 Then
                    t2.InsertTable(t1)
                Else
                    t2.AddCell("t2")
                End If
                System.Math.Min(System.Threading.Interlocked.Increment(i),i-1)
            End While
            Dim t3 As Table = New Table(4, 4)
            i= 0
            While i < 16
                If i = 10 Then
                    t3.InsertTable(t2)
                Else
                    t3.AddCell("t3")
                End If
                System.Math.Min(System.Threading.Interlocked.Increment(i),i-1)
            End While
            document.Add(t3)
        Catch de As DocumentException
            Console.Error.WriteLine(de.Message)
        Catch ioe As IOException
            Console.Error.WriteLine(ioe.Message)
        End Try
        document.Close
    End Sub
End Class 

End Namespace

  • 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-12T09:58:33+00:00Added an answer on May 12, 2026 at 9:58 am

    It appears that you are using a version of iTextSharp that is more recent than the version used in the tutorial. This should work:

    c.Width = 100F
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 359k
  • Answers 359k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The salt helps protect against an attacker using a precomputation… May 14, 2026 at 2:27 pm
  • Editorial Team
    Editorial Team added an answer I think that your problem is the Redirect at the… May 14, 2026 at 2:27 pm
  • Editorial Team
    Editorial Team added an answer You need to store a reference to the tab bar… May 14, 2026 at 2:27 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.