Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The correct fix depends on the exact iTextSharp package and version in your project. In older iTextSharp builds, SimpleTable is handled in iTextSharp.text.pdf; in iTextSharp.LGPLv2.Core, the source and version 3.4.21 API reference place SimpleTable in iTextSharp.text. If you only need an ordinary PDF table, replacing legacy SimpleTable code with PdfPTable is usually the more maintainable solution.

Do not add random using statements until you have identified the package, resolved version, assembly reference and complete compiler message. The same “type or namespace name could not be found” error can mean a wrong namespace, a missing package, an incompatible version or code copied from a different iText distribution.

What the error actually means

A compiler message such as The type or namespace name 'SimpleTable' could not be found is reported at compile time, before a PDF is generated. C# cannot find a type named SimpleTable in the namespaces and assemblies currently referenced by the project. The word “iTextSharp” is not specific enough to determine the answer: several .NET distributions and branches use similar names but expose different APIs.

The inspected older iTextSharp source places code that handles SimpleTable in iTextSharp.text.pdf. In contrast, the iTextSharp.LGPLv2.Core Table.cs source declares namespace iTextSharp.text; and creates a SimpleTable; the version 3.4.21 API reference also lists the type under iTextSharp.text (API reference). Those are different package/version facts, not contradictory instructions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Fast diagnosis: identify the dependency first

  1. Copy the complete compiler error. Note whether it names the type (SimpleTable) or a namespace, and record the file and line number. A missing type and a missing assembly can look similar but require different fixes.
  2. Check the project file. In an SDK-style project, inspect the PackageReference entry. In Visual Studio, open Project > Manage NuGet Packages, select the Installed tab and record the exact package ID and resolved version. For older projects, also check References and the referenced iTextSharp DLL version.
  3. Confirm the target framework. A package may restore successfully but expose a different assembly or API for your target framework. Record whether the project targets .NET Framework, .NET (Core/5+), or another supported target.
  4. Search the installed package’s source or API reference. Search for class SimpleTable and copy the namespace shown by that exact package and version. Do not infer a C# namespace from a Java example.
  5. Rebuild after correcting the reference. Clean the solution, restore packages, then rebuild. This removes stale binaries and verifies that the project being compiled—not a different startup project—contains the reference.

Namespace choices by package

Situation Namespace or action What to verify
Older iTextSharp codebase Try the namespace documented by that installed build, commonly iTextSharp.text.pdf for code handling SimpleTable. Inspect the actual DLL/source; older releases and forks can differ.
iTextSharp.LGPLv2.Core The inspected source and 3.4.21 API reference place SimpleTable in iTextSharp.text. Confirm your resolved package really is iTextSharp.LGPLv2.Core and that its version exposes the type.
Type absent from your package Install or reference the package/version that contains it, or migrate the code to PdfPTable. Check licensing, target framework and compatibility before changing dependencies.
Java sample copied into C# Translate the API concept; do not copy Java package or import lines. The iText 5 “101 – a very simple table” example uses Java and demonstrates PdfPTable, not C# namespace syntax (example).

Fixing an older iTextSharp project

When your installed assembly exposes the type under iTextSharp.text.pdf, add the namespace only after confirming it in that assembly:

using iTextSharp.text;
using iTextSharp.text.pdf;

If SimpleTable still cannot be resolved, the problem is probably not the import. Verify that the project references the DLL containing the type, that NuGet restored the intended version, and that another project in the solution is not supplying a conflicting assembly.

Fixing iTextSharp.LGPLv2.Core

For the inspected iTextSharp.LGPLv2.Core layout, the relevant namespace is iTextSharp.text. Use the package’s own API reference and source as the authority for your resolved version:

using iTextSharp.text;

If the compiler then reports that SimpleTable is still missing, check the package ID and version rather than adding every iText namespace. A package upgrade, a different target framework asset or a transitive dependency can change which types are available.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use PdfPTable when you need a normal PDF table

SimpleTable is legacy-oriented and may not be present in every distribution. For rows and columns in a regular PDF, PdfPTable is the practical fallback. The following is an illustrative older iTextSharp-style shape; verify method names and overloads against your exact package:

using iTextSharp.text;
using iTextSharp.text.pdf;
using System.IO;

var outputPath = "table.pdf";
using (var stream = new FileStream(outputPath, FileMode.Create))
{
    using (var document = new Document())
    {
        PdfWriter.GetInstance(document, stream);
        document.Open();

        var table = new PdfPTable(2);
        table.AddCell("First");
        table.AddCell("Second");
        table.AddCell("Third");
        table.AddCell("Fourth");
        document.Add(table);
    }
}

This code demonstrates the API pattern, not a guarantee that every fork has identical constructors or writer behavior. If it does not compile, inspect the package’s PdfPTable documentation and adjust the writer/document setup to that release.

Common causes and precise fixes

Wrong package installed

You may have installed iTextSharp.LGPLv2.Core while following documentation for an older iTextSharp package, or the reverse. Compare the package ID and version in the project with the namespace shown in that package’s source. Either use the matching namespace or standardize the project on a supported package and update the code deliberately.

Missing assembly reference

An editor may show a namespace in another project, while the compiling project lacks the reference. Add the NuGet package to the project that contains the failing file, restore packages and rebuild. In a non-SDK project, verify the DLL appears under References and that its path is not broken.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Package version does not contain SimpleTable

Some branches expose related table classes differently or omit legacy types. Search the exact installed assembly. If no SimpleTable definition exists, no using statement can create it; migrate to PdfPTable or select a compatible package version after reviewing framework and licensing requirements.

Java namespace copied into C#

Java examples use package declarations and imports that are not C# instructions. The iText 5 simple-table page uses Java and PdfPTable. Translate the class usage and consult C# API documentation for namespace and capitalization.

Stale build artifacts

After changing a package or reference, delete bin and obj if necessary, restore packages, then rebuild the correct solution configuration. A stale assembly can make IntelliSense and the compiler disagree.

Type-name collision

If your project defines another SimpleTable, use a fully qualified name temporarily:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
var table = new iTextSharp.text.SimpleTable();

Change the qualification to iTextSharp.text.pdf.SimpleTable only when that is the namespace exposed by your package.

A repeatable troubleshooting checklist

  • Record the complete error, package ID, resolved version and target framework.
  • Search the exact installed source or API reference for SimpleTable.
  • Check that the failing project, not merely the solution, references the containing assembly.
  • Remove imports copied from Java or another iText distribution.
  • Try a fully qualified type name to expose namespace or collision problems.
  • Clean, restore and rebuild.
  • If the type is absent, switch to the documented PdfPTable API or change package versions intentionally.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your goal is to generate screenshots or PDFs of a web page while documenting or testing your PDF workflow, ScreenshotNeo provides a one-call website screenshot API and MCP server. It accepts cookie and consent banners like a visitor, removes more than 60 known consent platforms, newsletter popups and chat widgets before capture, and bills only clean shots. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and each response reports the result through X-Page-Verdict and X-Billed headers.

For API details, see the ScreenshotNeo documentation. A cURL request is:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

The same request in Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

And in Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

ScreenshotNeo also offers an MCP server with take_screenshot, get_page_info and capture_pdf for Claude, Cursor and other MCP clients. Every feature is included on every plan; the Free plan includes 1,000 screenshots per month without a card, and paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

FAQ

Is SimpleTable deprecated?

Its availability and namespace vary by iTextSharp distribution. Treat it as a package-specific legacy type and verify the API for the version you actually reference.

Can I fix this with an alias?

A C# alias can resolve an ambiguity only after the assembly and type exist. It cannot repair a missing package or a type omitted from the installed version.

Should I switch to iText 7?

That is a separate migration decision involving API changes, licensing and framework compatibility. First establish why the current project cannot resolve SimpleTable.

Frequently Asked Questions

Which using statement should I try first?

Use the namespace documented by your exact package and version: older iTextSharp code commonly uses iTextSharp.text.pdf, while the inspected iTextSharp.LGPLv2.Core 3.4.21 API places SimpleTable in iTextSharp.text.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why does PdfPTable compile when SimpleTable does not?

PdfPTable is a broadly used table API, while SimpleTable is a legacy type whose presence and namespace differ between distributions. Confirm the package before changing imports.

The Bottom Line

Identify the installed package and version, copy the namespace from that package’s own API, and verify the assembly reference. If SimpleTable is unavailable, use the documented PdfPTable API instead of forcing an import from another iText distribution.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.