{"id":3434,"date":"2026-02-02T21:26:58","date_gmt":"2026-02-02T21:26:58","guid":{"rendered":"https:\/\/xceed.com\/?p=3434"},"modified":"2026-02-02T21:27:14","modified_gmt":"2026-02-02T21:27:14","slug":"how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net","status":"publish","type":"post","link":"https:\/\/xceed.com\/es\/blog\/all\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\/","title":{"rendered":"How to Extract Content from a PDF in C# with Xceed PdfLibrary for .NET"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"3434\" class=\"elementor elementor-3434\" data-elementor-post-type=\"post\">\n\t\t\t\t<div class=\"elementor-element elementor-element-16737b4 e-flex e-con-boxed e-con e-parent\" data-id=\"16737b4\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-c4856b4 elementor-widget elementor-widget-text-editor\" data-id=\"c4856b4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><style><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_start\">\ufeff<\/span><br \/>  .cta-box {<br \/>    background: linear-gradient(145deg, #ff8441 0%, #ff772e 40%, #ff7429 100%);<br \/>    color: #fff;<br \/>    border-radius: 12px;<br \/>    padding: 1.5rem 1.75rem;<br \/>    margin: 2rem 0;<br \/>    box-sizing: border-box;<br \/>    box-shadow:<br \/>      0 8px 24px rgba(0, 0, 0, 0.08),<br \/>      0 4px 10px rgba(168, 63, 8, 0.15),<br \/>      inset 0 1px 0 rgba(255, 255, 255, 0.12);<br \/>  }<\/p>\n<p>  .cta-box h3 {<br \/>    margin: 0 0 0.5rem 0;<br \/>    font-size: 1.25rem;<br \/>    font-weight: 700;<br \/>    color: #fff;<br \/>  }<\/p>\n<p>  .cta-box p {<br \/>    margin: 0 0 1rem 0;<br \/>    font-size: 1rem;<br \/>    line-height: 1.5;<br \/>    color: #fff;<br \/>    opacity: 0.98;<br \/>  }<\/p>\n<p>  .cta-box a.cta-link {<br \/>    display: inline-block;<br \/>    background: #fff;<br \/>    color: #ff671b;<br \/>    text-decoration: none;<br \/>    font-weight: 600;<br \/>    padding: 0.5rem 1rem;<br \/>    border-radius: 8px;<br \/>    margin-right: 0.75rem;<br \/>    margin-top: 0.25rem;<br \/>    font-size: 0.9375rem;<br \/>  }<\/p>\n<p>  .cta-box a.cta-link:hover {<br \/>    background: #f5f5f5;<br \/>  }<\/p>\n<p>  article pre {<br \/>    margin: 2rem 0;<br \/>    padding: 1rem 1.25rem;<br \/>    overflow-x: auto;<br \/>    font-size: 0.9rem;<br \/>    line-height: 1.5;<br \/>    border-radius: 10px;<br \/>    background: #1e1e1e;<br \/>    border: 1px solid #333;<br \/>  }<\/p>\n<p>  article pre[class*=\"language-\"] {<br \/>    margin: 2rem 0;<br \/>  }<\/p>\n<p>  article pre code {<br \/>    background: none;<br \/>    padding: 0;<br \/>    color: #d4d4d4;<br \/>  }<br \/><\/style><\/p><article><header><h1>How to Extract Content from a PDF in C# with Xceed PdfLibrary for .NET<\/h1><\/header><section>Extracting content from a PDF means reading both the visible text on each page and the values inside form controls (text boxes, checkboxes, and so on). Such extraction is useful for search indexing, compliance, migrating data, or processing filled forms. Doing it in code gives you structured access without manual copy-paste or external tools.This guide shows how to extract content from a PDF in C# step by step: you&#8217;ll get all text from a document page by page, read text from a specific area, and read form field values using <a href=\"https:\/\/xceed.com\/products\/net\/pdf-library-for-net\/#download\">Xceed PdfLibrary for .NET<\/a>. The setup (NuGet, license) is the same as in our <a href=\"https:\/\/xceed.com\/blog\/all\/how-to-create-a-pdf-in-c-with-xceed-pdflibrary-for-net\/\">how to create a PDF in C#<\/a> post.If you&#8217;re new to the product, check out our first guide: <a href=\"https:\/\/xceed.com\/blog\/all\/how-to-create-a-pdf-in-c-with-xceed-pdflibrary-for-net\/\">How to Create a PDF in C#<\/a>.<\/section><section><h2>What you need<\/h2><ul><li>.NET 5 through .NET 10<\/li><li>Xceed PdfLibrary for .NET (trial or license). Add it via <a href=\"https:\/\/www.nuget.org\/packages\/Xceed.PdfLibrary.NET\">NuGet<\/a> or reference the DLL.<\/li><li>A PDF to read from (or create one in code using the create-PDF or split-PDF snippets from the other posts)<\/li><\/ul><\/section><section><h2>Set up the project and license<\/h2><p>Create a console or web project and add the library. From the command line (<strong>.NET CLI<\/strong>):<\/p><pre class=\"language-bash\" tabindex=\"0\"><code class=\"language-bash\">dotnet add package Xceed.PdfLibrary.NET<\/code><\/pre><p><strong>Licensing:<\/strong> Set your license key once at startup, before any <strong>PdfDocument<\/strong> calls. Get a <a href=\"https:\/\/trial.xceed.com\">free trial key<\/a> or a full license from the <a href=\"https:\/\/xceed.com\/products\/net\/pdf-library-for-net\/#download\">product page<\/a>. See the <a href=\"https:\/\/xceed.com\/blog\/all\/how-to-create-a-pdf-in-c-with-xceed-pdflibrary-for-net\/\">create a PDF in C#<\/a> post for a full setup snippet.<\/p><\/section><section><h2>Extract text from each page<\/h2><p>To extract content from a PDF in C#, start with the text on each page. Load the document with <strong>PdfDocument.Load(path)<\/strong> (or a <strong>Stream<\/strong>), then loop over <strong>doc.Pages<\/strong> and use the <strong>Text<\/strong> property on each page. In the PDF&#8217;s native order, that property returns the page text with spacing preserved.<\/p><pre class=\"language-csharp\" tabindex=\"0\"><code class=\"language-csharp\"><span class=\"token keyword\">using<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token class-name\"><span class=\"token keyword\">var<\/span><\/span> doc <span class=\"token operator\">=<\/span> PdfDocument<span class=\"token punctuation\">.<\/span><span class=\"token function\">Load<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">\"document.pdf\"<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span>\n<span class=\"token punctuation\">{<\/span>\n    <span class=\"token keyword\">for<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token class-name\"><span class=\"token keyword\">int<\/span><\/span> i <span class=\"token operator\">=<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span> i <span class=\"token operator\">&lt;<\/span> doc<span class=\"token punctuation\">.<\/span>Pages<span class=\"token punctuation\">.<\/span>Count<span class=\"token punctuation\">;<\/span> i<span class=\"token operator\">++<\/span><span class=\"token punctuation\">)<\/span>\n    <span class=\"token punctuation\">{<\/span>\n        <span class=\"token class-name\"><span class=\"token keyword\">string<\/span><\/span> text <span class=\"token operator\">=<\/span> doc<span class=\"token punctuation\">.<\/span>Pages<span class=\"token punctuation\">[<\/span>i<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>Text<span class=\"token punctuation\">;<\/span>\n        Console<span class=\"token punctuation\">.<\/span><span class=\"token function\">WriteLine<\/span><span class=\"token punctuation\">(<\/span><span class=\"token interpolation-string\"><span class=\"token string\">$\"--- Page <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span><span class=\"token expression language-csharp\">i <span class=\"token operator\">+<\/span> <span class=\"token number\">1<\/span><\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\"> ---\"<\/span><\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\n        Console<span class=\"token punctuation\">.<\/span><span class=\"token function\">WriteLine<\/span><span class=\"token punctuation\">(<\/span>text<span class=\"token punctuation\">?.<\/span><span class=\"token function\">Trim<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">??<\/span> <span class=\"token string\">\"\"<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\n    <span class=\"token punctuation\">}<\/span>\n<span class=\"token punctuation\">}<\/span><\/code><\/pre><p>On empty pages or those with no extractable text, <strong>Text<\/strong> may be null or an empty string. Trimming and null-checking (as above) keeps output clean. This approach is ideal for building a full-text index, dumping content to a <code>.txt<\/code> file, or feeding text into another process.<\/p><\/section><section><h2>Extract text from a specific area<\/h2><p>Sometimes you only need the text inside a given rectangle (e.g. one column of a multi-column layout, a header strip, or a form-like zone). In that case, call <strong>GetTextFromArea(rectangle)<\/strong> on the page. Pass (x, y, width, height) in page coordinates (origin top-left, Y downward) to the <strong>Rectangle<\/strong> constructor.<\/p><pre class=\"language-csharp\" tabindex=\"0\"><code class=\"language-csharp\"><span class=\"token keyword\">using<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token class-name\"><span class=\"token keyword\">var<\/span><\/span> doc <span class=\"token operator\">=<\/span> PdfDocument<span class=\"token punctuation\">.<\/span><span class=\"token function\">Load<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">\"document.pdf\"<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span>\n<span class=\"token punctuation\">{<\/span>\n    <span class=\"token class-name\"><span class=\"token keyword\">var<\/span><\/span> page <span class=\"token operator\">=<\/span> doc<span class=\"token punctuation\">.<\/span>Pages<span class=\"token punctuation\">[<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span>\n    <span class=\"token class-name\"><span class=\"token keyword\">var<\/span><\/span> area <span class=\"token operator\">=<\/span> <span class=\"token keyword\">new<\/span> <span class=\"token constructor-invocation class-name\">Rectangle<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">50<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">100<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">400<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">200<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ left, top, width, height<\/span>\n    <span class=\"token class-name\"><span class=\"token keyword\">string<\/span><\/span> textInArea <span class=\"token operator\">=<\/span> page<span class=\"token punctuation\">.<\/span><span class=\"token function\">GetTextFromArea<\/span><span class=\"token punctuation\">(<\/span>area<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\n    Console<span class=\"token punctuation\">.<\/span><span class=\"token function\">WriteLine<\/span><span class=\"token punctuation\">(<\/span>textInArea <span class=\"token operator\">??<\/span> <span class=\"token string\">\"\"<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\n<span class=\"token punctuation\">}<\/span><\/code><\/pre><p>This is useful for template-based PDFs where you know the approximate position of the content you care about, or when you want to ignore headers and footers by only extracting the main body rectangle.<\/p><\/section><section><h2>Words and reading order<\/h2><p><strong>Text<\/strong> returns a single string per page in the order it appears in the PDF. If you need word boundaries or a reading-order view, the library also exposes <strong>Words<\/strong> (a collection of <strong>Word<\/strong> objects with bounds and text) and <strong>OrderedText<\/strong> (text in top-left to bottom-right order). For many use cases (search, logging, or simple export), <strong>Text<\/strong> is enough.<\/p><\/section><section><h2>Extract form field values (form control extraction)<\/h2><p>When a PDF contains form controls (AcroForm fields), you can extract their values programmatically. After loading the document, <strong>doc.FormFields<\/strong> gives you all form fields in the document; <strong>page.FormFields<\/strong> limits the result to a given page. Each field has a <strong>Name<\/strong>, and its type determines how to read the value.<\/p><p><strong>Text box fields:<\/strong> Cast to <strong>TextBoxFormField<\/strong> and use the <strong>Text<\/strong> property. <strong>Checkbox fields:<\/strong> Cast to <strong>CheckBoxFormField<\/strong> and use the <strong>IsChecked<\/strong> property. You can handle both in one loop:<\/p><pre class=\"language-csharp\" tabindex=\"0\"><code class=\"language-csharp\"><span class=\"token keyword\">using<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token class-name\"><span class=\"token keyword\">var<\/span><\/span> doc <span class=\"token operator\">=<\/span> PdfDocument<span class=\"token punctuation\">.<\/span><span class=\"token function\">Load<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">\"form.pdf\"<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span>\n<span class=\"token punctuation\">{<\/span>\n    <span class=\"token keyword\">foreach<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token class-name\"><span class=\"token keyword\">var<\/span><\/span> field <span class=\"token keyword\">in<\/span> doc<span class=\"token punctuation\">.<\/span>FormFields<span class=\"token punctuation\">)<\/span>\n    <span class=\"token punctuation\">{<\/span>\n        <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>field <span class=\"token keyword\">is<\/span> <span class=\"token class-name\">TextBoxFormField<\/span> textBox<span class=\"token punctuation\">)<\/span>\n            Console<span class=\"token punctuation\">.<\/span><span class=\"token function\">WriteLine<\/span><span class=\"token punctuation\">(<\/span><span class=\"token interpolation-string\"><span class=\"token string\">$\"<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span><span class=\"token expression language-csharp\">textBox<span class=\"token punctuation\">.<\/span>Name<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">: <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span><span class=\"token expression language-csharp\">textBox<span class=\"token punctuation\">.<\/span>Text<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">\"<\/span><\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\n        <span class=\"token keyword\">else<\/span> <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>field <span class=\"token keyword\">is<\/span> <span class=\"token class-name\">CheckBoxFormField<\/span> checkBox<span class=\"token punctuation\">)<\/span>\n            Console<span class=\"token punctuation\">.<\/span><span class=\"token function\">WriteLine<\/span><span class=\"token punctuation\">(<\/span><span class=\"token interpolation-string\"><span class=\"token string\">$\"<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span><span class=\"token expression language-csharp\">checkBox<span class=\"token punctuation\">.<\/span>Name<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">: <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span><span class=\"token expression language-csharp\"><span class=\"token punctuation\">(<\/span>checkBox<span class=\"token punctuation\">.<\/span>IsChecked <span class=\"token punctuation\">?<\/span> <span class=\"token string\">\"checked\"<\/span> <span class=\"token punctuation\">:<\/span> <span class=\"token string\">\"unchecked\"<\/span><span class=\"token punctuation\">)<\/span><\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">\"<\/span><\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\n    <span class=\"token punctuation\">}<\/span>\n<span class=\"token punctuation\">}<\/span><\/code><\/pre><p><strong>Other control types:<\/strong> The library supports other form field types (e.g. <strong>ComboBoxFormField<\/strong>, <strong>ListBoxFormField<\/strong>, <strong>RadioButtonGroupFormField<\/strong>). Similarly, iterate <strong>doc.FormFields<\/strong> or <strong>page.FormFields<\/strong>, check the type, and read the appropriate property. For full details and properties per type, see the <a href=\"https:\/\/xceed.com\/documentation\/xceed-pdf-for-net\/\">Xceed PdfLibrary for .NET documentation<\/a>.<\/p><\/section><section><h2>Combining text and form extraction<\/h2><p>You can extract content from a PDF in C# by combining text and form extraction in one pass. Load the document once, then loop pages for <strong>Text<\/strong> (or <strong>GetTextFromArea<\/strong> where needed) and loop <strong>doc.FormFields<\/strong> for form values. As a result, you get both the visible text and the form data for indexing, validation, or export.<\/p><\/section><section><h2>Run the code<\/h2><p>Paste the snippets above into a console or web project, set your license key, and ensure you have a PDF at the path you pass to <strong>PdfDocument.Load<\/strong> (e.g. <strong>document.pdf<\/strong> or <strong>form.pdf<\/strong>).<\/p><p>From Visual Studio the current directory is usually the project folder; from the command line it is the folder from which you invoked the app.<\/p><p>If you don&#8217;t have a PDF yet, use the <a href=\"https:\/\/xceed.com\/blog\/all\/how-to-create-a-pdf-in-c-with-xceed-pdflibrary-for-net\/\">create a PDF in C#<\/a> snippet to generate one, or create a form with <strong>FormFields<\/strong> (see the documentation) and then run the extraction code on it. Finally, open the console output or any file you write to and confirm the extracted text and form values match the PDF.<\/p><\/section><section><h2>Common questions<\/h2><p><strong>Do I need to dispose the document?<\/strong> Yes. Prefer <strong>using<\/strong> (as in the snippets) or call <strong>Dispose<\/strong> so file handles and streams are released.<\/p><p><strong>Can I load from a stream instead of a file?<\/strong> Yes. The overloads of <strong>PdfDocument.Load<\/strong> that accept a <strong>Stream<\/strong> are useful when the PDF comes from memory or a web request.<\/p><p><strong>What if Text or OrderedText is null?<\/strong> For pages with no extractable text, the library may return null. Rely on null-coalescing (e.g. <code>text ?? \"\"<\/code>) or explicit null checks before using the value.<\/p><p><strong>How do I know a form field&#8217;s type before casting?<\/strong> Rely on <code>is<\/code> checks (e.g. <code>if (field is TextBoxFormField)<\/code>) or <code>field.GetType()<\/code>. The documentation lists all form field types and their properties.<\/p><p><strong>Where can I see more samples?<\/strong> See the <a href=\"https:\/\/xceed.com\/documentation\/xceed-pdf-for-net\/\">Xceed PdfLibrary for .NET documentation<\/a> for advanced topics, more form field types, and extraction in reading order.<\/p><p><strong>Need help?<\/strong> Visit our <a href=\"https:\/\/xceed.com\/support\/\">support page<\/a>.<\/p><p><strong>Can I use this in an ASP.NET Core app?<\/strong> Yes. The same code runs in any .NET host. Set the license key at startup, then load and extract in your controllers or services. For user-uploaded PDFs, load from the upload stream and extract text or form values to store or return as JSON.<\/p><p><strong>Summary:<\/strong> You&#8217;ve seen how to extract content from a PDF in C#: load with <strong>PdfDocument.Load<\/strong>, use <strong>Pages[i].Text<\/strong> or <strong>GetTextFromArea<\/strong> for text, and use <strong>FormFields<\/strong> with <strong>TextBoxFormField.Text<\/strong> and <strong>CheckBoxFormField.IsChecked<\/strong> for form control values. Dispose the document when done.<\/p><p>The same API works on Windows, macOS, and Linux.<\/p><\/section><section><h2>What else can you do with Xceed PdfLibrary?<\/h2><p>With Xceed PdfLibrary for .NET you can create PDFs, add form fields, sign documents, split by page or bookmark, and add watermarks. The same patterns (load, read or modify, save) apply.<\/p><p>Once you&#8217;re comfortable extracting content from a PDF in C#, try creating or filling form fields, or splitting and extracting in one workflow. The <a href=\"https:\/\/xceed.com\/documentation\/xceed-pdf-for-net\/\">documentation<\/a> has samples for each of these.<\/p><div class=\"cta-box\"><h3>Ready to extract content from PDFs in .NET?<\/h3><p>Download Xceed PdfLibrary for .NET and try it free for 45 days, no commitment.<\/p><p><a class=\"cta-link\" href=\"https:\/\/xceed.com\/products\/net\/pdf-library-for-net\/\">Get it now &#8211; 45-day free trial<\/a><\/p><\/div><\/section><section><h2>Next steps<\/h2><ul><li><a href=\"https:\/\/xceed.com\/products\/net\/pdf-library-for-net\/#download\">Download Xceed PdfLibrary for .NET<\/a> or <a href=\"https:\/\/trial.xceed.com\">get a free trial key<\/a>. Learn more on the <a href=\"https:\/\/xceed.com\/products\/net\/pdf-library-for-net\/\">product page<\/a>.<\/li><li>Install via NuGet: <a href=\"https:\/\/www.nuget.org\/packages\/Xceed.PdfLibrary.NET\">Xceed.PdfLibrary.NET<\/a>. From the .NET CLI run:<\/li><li>Need help? Visit our <a href=\"https:\/\/xceed.com\/support\/\">support page<\/a>.<\/li><\/ul><pre class=\"language-bash\" tabindex=\"0\"><code class=\"language-bash\">dotnet add package Xceed.PdfLibrary.NET<\/code><\/pre><p>Set your license key at startup, then load a PDF and use <strong>Pages[i].Text<\/strong> and <strong>doc.FormFields<\/strong> as shown above to extract content from a PDF in C#.<\/p><\/section><\/article><p><script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/prism\/1.29.0\/prism.min.js\"><\/script><br \/><script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/prism\/1.29.0\/components\/prism-csharp.min.js\"><\/script><br \/><script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/prism\/1.29.0\/components\/prism-bash.min.js\"><\/script><br \/><script>Prism.highlightAll();<\/script><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Get text from every page or from a rectangle, and read form control values (text boxes, checkboxes). Use PdfDocument.Load, page.Text, GetTextFromArea, and doc.FormFields in C#.<\/p>","protected":false},"author":3,"featured_media":3435,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[141,60],"tags":[70,704,705,706],"class_list":["post-3434","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-all","category-tutorials","tag-net","tag-c-pdf","tag-pdf-net","tag-pdf-dotnet"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Extract Content from a PDF in C# with Xceed PdfLibrary for .NET - Xceed<\/title>\n<meta name=\"description\" content=\"See how to extract text and form field values from a PDF in .NET. Try the code with Xceed PdfLibrary for free!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/xceed.com\/es\/blog\/tutoriales\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\/\" \/>\n<meta property=\"og:locale\" content=\"es_MX\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Extract Content from a PDF in C# with Xceed PdfLibrary for .NET - Xceed\" \/>\n<meta property=\"og:description\" content=\"See how to extract text and form field values from a PDF in .NET. Try the code with Xceed PdfLibrary for free!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/xceed.com\/es\/blog\/tutoriales\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\/\" \/>\n<meta property=\"og:site_name\" content=\"Xceed\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-02T21:26:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-02T21:27:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/xceed.com\/wp-content\/uploads\/2026\/01\/extract_data_pdf.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1536\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Mathieu Drimonakos\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mathieu Drimonakos\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/xceed.com\\\/blog\\\/tutorials\\\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/xceed.com\\\/blog\\\/tutorials\\\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\\\/\"},\"author\":{\"name\":\"Mathieu Drimonakos\",\"@id\":\"https:\\\/\\\/xceed.com\\\/fr\\\/#\\\/schema\\\/person\\\/755c0d7faf7423a1e441aa6b79ca8205\"},\"headline\":\"How to Extract Content from a PDF in C# with Xceed PdfLibrary for .NET\",\"datePublished\":\"2026-02-02T21:26:58+00:00\",\"dateModified\":\"2026-02-02T21:27:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/xceed.com\\\/blog\\\/tutorials\\\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\\\/\"},\"wordCount\":1246,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/xceed.com\\\/fr\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/xceed.com\\\/blog\\\/tutorials\\\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/xceed.com\\\/wp-content\\\/uploads\\\/2026\\\/01\\\/extract_data_pdf.png\",\"keywords\":[\".net\",\"c# pdf\",\"pdf .net\",\"pdf dotnet\"],\"articleSection\":[\"All\",\"Tutorials\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/xceed.com\\\/blog\\\/tutorials\\\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/xceed.com\\\/blog\\\/tutorials\\\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\\\/\",\"url\":\"https:\\\/\\\/xceed.com\\\/blog\\\/tutorials\\\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\\\/\",\"name\":\"How to Extract Content from a PDF in C# with Xceed PdfLibrary for .NET - Xceed\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/xceed.com\\\/fr\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/xceed.com\\\/blog\\\/tutorials\\\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/xceed.com\\\/blog\\\/tutorials\\\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/xceed.com\\\/wp-content\\\/uploads\\\/2026\\\/01\\\/extract_data_pdf.png\",\"datePublished\":\"2026-02-02T21:26:58+00:00\",\"dateModified\":\"2026-02-02T21:27:14+00:00\",\"description\":\"See how to extract text and form field values from a PDF in .NET. Try the code with Xceed PdfLibrary for free!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/xceed.com\\\/blog\\\/tutorials\\\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\\\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/xceed.com\\\/blog\\\/tutorials\\\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/xceed.com\\\/blog\\\/tutorials\\\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\\\/#primaryimage\",\"url\":\"https:\\\/\\\/xceed.com\\\/wp-content\\\/uploads\\\/2026\\\/01\\\/extract_data_pdf.png\",\"contentUrl\":\"https:\\\/\\\/xceed.com\\\/wp-content\\\/uploads\\\/2026\\\/01\\\/extract_data_pdf.png\",\"width\":1536,\"height\":1024,\"caption\":\"Extract PDF content in .NET C#\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/xceed.com\\\/blog\\\/tutorials\\\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/xceed.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Extract Content from a PDF in C# with Xceed PdfLibrary for .NET\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/xceed.com\\\/fr\\\/#website\",\"url\":\"https:\\\/\\\/xceed.com\\\/fr\\\/\",\"name\":\"Xceed\",\"description\":\"Provides tools for .NET, Windows Forms, WPF, Silverlight, and ASP.NET developers to create better applications.\",\"publisher\":{\"@id\":\"https:\\\/\\\/xceed.com\\\/fr\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/xceed.com\\\/fr\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/xceed.com\\\/fr\\\/#organization\",\"name\":\"Xceed\",\"url\":\"https:\\\/\\\/xceed.com\\\/fr\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/xceed.com\\\/fr\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/xceed.com\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/cropped-xceed-logo.png\",\"contentUrl\":\"https:\\\/\\\/xceed.com\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/cropped-xceed-logo.png\",\"width\":609,\"height\":150,\"caption\":\"Xceed\"},\"image\":{\"@id\":\"https:\\\/\\\/xceed.com\\\/fr\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/xceed.com\\\/fr\\\/#\\\/schema\\\/person\\\/755c0d7faf7423a1e441aa6b79ca8205\",\"name\":\"Mathieu Drimonakos\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f98fd5ceb0a01e45d9caabde3e75b68779a73f7754af7b814cd2e1008dd870aa?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f98fd5ceb0a01e45d9caabde3e75b68779a73f7754af7b814cd2e1008dd870aa?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f98fd5ceb0a01e45d9caabde3e75b68779a73f7754af7b814cd2e1008dd870aa?s=96&d=mm&r=g\",\"caption\":\"Mathieu Drimonakos\"},\"url\":\"https:\\\/\\\/xceed.com\\\/es\\\/blog\\\/author\\\/drimonakosmxceed-com\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Extract Content from a PDF in C# with Xceed PdfLibrary for .NET - Xceed","description":"See how to extract text and form field values from a PDF in .NET. Try the code with Xceed PdfLibrary for free!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/xceed.com\/es\/blog\/tutoriales\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\/","og_locale":"es_MX","og_type":"article","og_title":"How to Extract Content from a PDF in C# with Xceed PdfLibrary for .NET - Xceed","og_description":"See how to extract text and form field values from a PDF in .NET. Try the code with Xceed PdfLibrary for free!","og_url":"https:\/\/xceed.com\/es\/blog\/tutoriales\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\/","og_site_name":"Xceed","article_published_time":"2026-02-02T21:26:58+00:00","article_modified_time":"2026-02-02T21:27:14+00:00","og_image":[{"width":1536,"height":1024,"url":"https:\/\/xceed.com\/wp-content\/uploads\/2026\/01\/extract_data_pdf.png","type":"image\/png"}],"author":"Mathieu Drimonakos","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Mathieu Drimonakos","Est. reading time":"6 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/xceed.com\/blog\/tutorials\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\/#article","isPartOf":{"@id":"https:\/\/xceed.com\/blog\/tutorials\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\/"},"author":{"name":"Mathieu Drimonakos","@id":"https:\/\/xceed.com\/fr\/#\/schema\/person\/755c0d7faf7423a1e441aa6b79ca8205"},"headline":"How to Extract Content from a PDF in C# with Xceed PdfLibrary for .NET","datePublished":"2026-02-02T21:26:58+00:00","dateModified":"2026-02-02T21:27:14+00:00","mainEntityOfPage":{"@id":"https:\/\/xceed.com\/blog\/tutorials\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\/"},"wordCount":1246,"commentCount":0,"publisher":{"@id":"https:\/\/xceed.com\/fr\/#organization"},"image":{"@id":"https:\/\/xceed.com\/blog\/tutorials\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\/#primaryimage"},"thumbnailUrl":"https:\/\/xceed.com\/wp-content\/uploads\/2026\/01\/extract_data_pdf.png","keywords":[".net","c# pdf","pdf .net","pdf dotnet"],"articleSection":["All","Tutorials"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/xceed.com\/blog\/tutorials\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/xceed.com\/blog\/tutorials\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\/","url":"https:\/\/xceed.com\/blog\/tutorials\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\/","name":"How to Extract Content from a PDF in C# with Xceed PdfLibrary for .NET - Xceed","isPartOf":{"@id":"https:\/\/xceed.com\/fr\/#website"},"primaryImageOfPage":{"@id":"https:\/\/xceed.com\/blog\/tutorials\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\/#primaryimage"},"image":{"@id":"https:\/\/xceed.com\/blog\/tutorials\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\/#primaryimage"},"thumbnailUrl":"https:\/\/xceed.com\/wp-content\/uploads\/2026\/01\/extract_data_pdf.png","datePublished":"2026-02-02T21:26:58+00:00","dateModified":"2026-02-02T21:27:14+00:00","description":"See how to extract text and form field values from a PDF in .NET. Try the code with Xceed PdfLibrary for free!","breadcrumb":{"@id":"https:\/\/xceed.com\/blog\/tutorials\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/xceed.com\/blog\/tutorials\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/xceed.com\/blog\/tutorials\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\/#primaryimage","url":"https:\/\/xceed.com\/wp-content\/uploads\/2026\/01\/extract_data_pdf.png","contentUrl":"https:\/\/xceed.com\/wp-content\/uploads\/2026\/01\/extract_data_pdf.png","width":1536,"height":1024,"caption":"Extract PDF content in .NET C#"},{"@type":"BreadcrumbList","@id":"https:\/\/xceed.com\/blog\/tutorials\/how-to-extract-content-from-a-pdf-in-c-with-xceed-pdflibrary-for-net\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/xceed.com\/"},{"@type":"ListItem","position":2,"name":"How to Extract Content from a PDF in C# with Xceed PdfLibrary for .NET"}]},{"@type":"WebSite","@id":"https:\/\/xceed.com\/fr\/#website","url":"https:\/\/xceed.com\/fr\/","name":"Xceed","description":"Proporciona herramientas para que los desarrolladores de .NET, Windows Forms, WPF, Silverlight y ASP.NET puedan crear mejores aplicaciones.","publisher":{"@id":"https:\/\/xceed.com\/fr\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/xceed.com\/fr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/xceed.com\/fr\/#organization","name":"Xceed","url":"https:\/\/xceed.com\/fr\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/xceed.com\/fr\/#\/schema\/logo\/image\/","url":"https:\/\/xceed.com\/wp-content\/uploads\/2024\/04\/cropped-xceed-logo.png","contentUrl":"https:\/\/xceed.com\/wp-content\/uploads\/2024\/04\/cropped-xceed-logo.png","width":609,"height":150,"caption":"Xceed"},"image":{"@id":"https:\/\/xceed.com\/fr\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/xceed.com\/fr\/#\/schema\/person\/755c0d7faf7423a1e441aa6b79ca8205","name":"Mathieu Drimonakos","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/secure.gravatar.com\/avatar\/f98fd5ceb0a01e45d9caabde3e75b68779a73f7754af7b814cd2e1008dd870aa?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f98fd5ceb0a01e45d9caabde3e75b68779a73f7754af7b814cd2e1008dd870aa?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f98fd5ceb0a01e45d9caabde3e75b68779a73f7754af7b814cd2e1008dd870aa?s=96&d=mm&r=g","caption":"Mathieu Drimonakos"},"url":"https:\/\/xceed.com\/es\/blog\/author\/drimonakosmxceed-com\/"}]}},"_links":{"self":[{"href":"https:\/\/xceed.com\/es\/wp-json\/wp\/v2\/posts\/3434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xceed.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xceed.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xceed.com\/es\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/xceed.com\/es\/wp-json\/wp\/v2\/comments?post=3434"}],"version-history":[{"count":0,"href":"https:\/\/xceed.com\/es\/wp-json\/wp\/v2\/posts\/3434\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xceed.com\/es\/wp-json\/wp\/v2\/media\/3435"}],"wp:attachment":[{"href":"https:\/\/xceed.com\/es\/wp-json\/wp\/v2\/media?parent=3434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xceed.com\/es\/wp-json\/wp\/v2\/categories?post=3434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xceed.com\/es\/wp-json\/wp\/v2\/tags?post=3434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}