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 8541477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:50:28+00:00 2026-06-11T11:50:28+00:00

This will be my first time reading a PDF. I was searching around and

  • 0

This will be my first time reading a PDF.

I was searching around and found so options to do that with C# and choose to use iTextSharp.

So far I’ve done just the basic like reading the file and getting the content without issues.

PdfReader reader = new PdfReader(iPDF.Text);
for (int x = 2; x <= reader.NumberOfPages; x++)
{
    iResult.Text = Encoding.UTF8.GetString(reader.GetPageContent(x));
    break;
}

As you can see it is a very very basic code just to read the 2nd page of the PDF into a text file but, I’ve notice a lot of code into the text file and I am a bit lost on how to parse only the data I need.

What I was wondering is, if there is a pattern or something that will help me get only that part of the PDF. Looking at the plain text file it seems there are things that defines begin/end of lines, colors, etc.

Some of the extract data:

1 0 0 1 0 612 cm 0 0 0 rg
0 0 0 RG
28.35 -28.35 735.3 -526.95 re
W
n
0 0 0.502 sc
28.35 -65.5 735.3 -12.75 re
f
28.35 -543.9 735.3 -11.4 re
f
q
92.25 -28.35 560.9 -18 re
W
n
1 1 1 sc
92.25 -28.35 560.9 -18 re
f
BT
1 0 0 1 95.25 -39.1 Tm
0 0 0 sc
/i 10.75 Tf
(Name - Live) T

NOTE: the above is just partially the initial data from the page 2 to point out what I previously meant.

Is that data in a tabulation sort of thing and how could I extract only that ?

  • 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-06-11T11:50:29+00:00Added an answer on June 11, 2026 at 11:50 am

    Try using a PdfTextExtractor as it will give you a little more human readable text out of the pdf:

    for (int page = 2; page <= reader.NumberOfPages; page++)
    {
        var strategy = new SimpleTextExtractionStrategy();
        string text = PdfTextExtractor.GetTextFromPage(reader, page, strategy);
        iResult.Text = text;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is the first time I have attempted to create a .dll, that will
This is my first time on this site. I will ask you to help
I know one awkward solution for this taks will be : first use ct
First of all, I have some time reading this page and I find very
I will start by saying this is the first time I have done anything
This will be my first iOS app with any bit of complexity. I'd like
I'm fairly new to writing test cases and this will be my first major
long time reader, first time poster. I’m coming with an issue that many of
I'm starting a new project. I intend to use Maven for the first time.
Hi guys this will be my first post and am pretty new to Objective-C

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.