I'm working on a program that is attempting to parse data within a PDF file. The issue is we need to parse a certain section of the PDF that is formatted in a three-tier hierarchy: Heading, sub-heading, paragraph. So far we're using line breaks (\n) to try and parse the data, but it is largely inefficient. Even if we had all the possible values for the headings and sub-headings the solution would still not be ideal since new PDFs might be created with new heading and sub-heading values.
However, the PDFs are created in such a way that the heading is the closest to the left margin, with the sub-heading being indented further away, and the indentation being even greater on the paragraph. We'd like to be able to use the indentations to identify the lines we want to parse. Is there a PDF library for Visual Studio that can do this? I'm coding in C#.