Rank: Newbie
Groups: Registered
Joined: 10/7/2020(UTC) Posts: 1  Location: Valley Home
|
I need to open a multi-page pdf and extract the values in the fields. I either need to do this page by page, or I need to determine which page each field is on. How do I do this? I can do this: Code: var forms = new PdfForms();
var frm = PdfDocument.Load(fqn, forms);
foreach (var field in forms.InterForm.Fields)
{
if (field.FieldType == Patagames.Pdf.Enums.FormFieldTypes.FPDF_FORMFIELD_TEXTFIELD)
{
switch (field.FullName.ToUpper().Trim())
{
... and then evaluate the fields I'm looking for
But isn't this looking at the entire collection of fields for the entire document? Nothing here determines which page the field is on. I can also do this: Code:using (var doc = PdfDocument.Load(fqn)) // C# Read PDF File
{
foreach (var pg in doc.Pages)
{
// Here I'm stuck. I can't figure out how to get to forms fields from here.
p++;
pg.Dispose();
}
}
Note fqn is my fully qualified file name, a string Edited by moderator Thursday, October 15, 2020 3:06:20 AM(UTC)
| Reason: Not specified
|
|
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 1,138
Thanks: 10 times Was thanked: 133 time(s) in 130 post(s)
|
|
|
|
|
|
|
Forum Jump
You can post new topics in this forum.
You can reply to topics in this forum.
You can delete your posts in this forum.
You can edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.
Important Information:
The Patagames Software Support Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close