im extracting form fields from different pdfs but in some pdfs there are fields like checkbox i want to get them as checkbox not treat them as form fileds how i differentiate that these are checkbox present in pdf i want to extract form fields or if there is field and options are to tick checkbox so how do it in .net 7
Could you please provide more details regarding this scenario? It would be greatly beneficial if you could share a relevant sample PDF and specify the expected output. This will enable us to gain a deeper understanding of the situation and assist you more effectively.
this is my code :
string localFilePath = @“C:\Users\star com\Documents\Residential Contract of Sale.pdf”;
using (Parser parser = new Parser(localFilePath))
{
// Extract data from PDF Form
DocumentData data = parser.ParseForm();
// Iterate over the extracted PDF Form fields data
for (int i = 0; i < data.Count; i++)
{
Console.Write(data[i].Name + ": ");
PageTextArea area = data[i].PageArea as PageTextArea;
int page = data[i].PageIndex;
<a class="attachment" href="/uploads/groupdocs/4797">Residential Contract of Sale.pdf</a> (467.6 KB)
Console.WriteLine(area == null ? "Not a template field" : area.Text + " (Page: " + page + ")");
}
}
Residential Contract of Sale.pdf (467.6 KB)
this is my form of pdf i have different like this now i want to extract there fields and there are some fields like checkbox i want to extract them as checkbox 1 DATE OF OFFER: (Page: 1)
3 SELLER: (Page: 1)
4 BUYER: (Page: 1)
HEREINAFTER PROPERTY KNOWN AS 1: (Page: 1)
HEREINAFTER PROPERTY KNOWN AS 2: (Page: 1)
CITYCOUNTY MARYLAND ZIP CODE: (Page: 1)
6 ESTATE THE PROPERTY IS BEING CONVEYED: (Page: 1)
IN FEE SIMPLE OR: (Page: 1)
EXISTING IN THE AMOUNT OF: (Page: 1)
DOLLARS: (Page: 1)
RECORDED AMONG THE LAND RECORDS OF: (Page: 1)
7 PURCHASE PRICE THE PURCHASE PRICE IS: (Page: 1)
DOLLARS_2: (Page: 1)
HAS DELIVERED OR: (Page: 1)
WILL DELIVER WITHIN: (Page: 1)
DAYS OF THE DATE OF CONTRACT ACCEPTANCE AN INITIAL: (Page: 1)
DEPOSIT BY WAY OF: (Page: 1)
IN THE AMOUNT OF: (Page: 1)
UNDEFINED: (Page: 1)
B AN ADDITIONAL DEPOSIT BY WAY OF: (Page: 1)
IN THE AMOUNT OF_2: (Page: 1)
UNDEFINED_2: (Page: 1)
TO BE PAID: (Page: 1)
UNDEFINED_3: (Page: 1)
C ALL DEPOSITS WILL BE HELD IN ESCROW BY: (Page: 1)
A NON INTEREST BEARING ACCOUNT OR: (Page: 1)
AN INTERESTBEARING ACCOUNT THE INTEREST ON WHICH IN ABSENCE OF DEFAULT BY BUYER SHALL ACCRUE TO THE: (Page: 1)
11 ADDENDADISCLOSURES THE ADDENDA CHECKED BELOW WHICH ARE HEREBY ATTACHED ARE MADE A PART OF THIS CONTRACT: (Page: 2)
AFFILIATED BUSINESS DISCLOSURE NOTICE: (Page: 2)
ADDITIONAL AS IS PROVISIONS: (Page: 2)
ATUBAT ONSITE SEWAGE DISPOSAL: (Page: 2)
BACKUP CONTRACT: (Page: 2)
CASH APPRAISAL CONTINGENCY: (Page: 2)
CONDOMINIUM RESALE NOTICE: (Page: 2)
CONSERVATION EASEMENT: (Page: 2)
DISCLOSURE OF LICENSEE STATUS: (Page: 2)
DISCLOSURE OF INFORMATION ON LEADBASED PAINT: (Page: 2)
HOMEOWNERS ASSOCIATION NOTICE: (Page: 2)
INCLUSIONSEXCLUSIONS LEASED ITEMS UTILITIES: (Page: 2)
KICKOUT: (Page: 2)
LOCAL CITYCOUNTY CERTIFICATIONSREGISTRATIONS: (Page: 2)
LOCAL CITYCOUNTY NOTICESDISCLOSURE: (Page: 2)
MARYLAND LEAD POISONING PREVENTION PROGRAM: (Page: 2)
OTHER ADDENDASPECIAL CONDITIONS: (Page: 2)
MD NONRESIDENT SELLER TRANSFER WITHHOLDING TAX: (Page: 2)
NOTICE TO BUYER AND SELLER MARYLAND RESIDENTIAL: (Page: 2)
NOTICE DISCL OF DEFERRED WATER SEWER CHARGES: (Page: 2)
ONSITE SEWAGE DISPOSAL SYSTEM INSPECTION: (Page: 2)
PROPERTY INSPECTIONS: (Page: 2)
PROPERTY SUBJECT TO GROUND RENT: (Page: 2)
PURCHASE PRICE ESCALATION: (Page: 2)
SALE FIN SETTLEMENTLEASE OF OTHER REAL ESTATE: (Page: 2)
SELLER CONTRIBUTION: (Page: 2)
SELLERS PURCHASE OF ANOTHER PROPERTY: (Page: 2)
SOLAR PANEL: (Page: 2)
SHORT SALE: (Page: 2)
TENANT OCCUPIED: (Page: 2)
THIRD PARTY APPROVAL: (Page: 2)
WATER QUALITY: (Page: 2)
WATER YIELD TEST: (Page: 2)
1: (Page: 2)
CONVENTIONAL FINANCING ADDENDUM: (Page: 3)
FHA FINANCING ADDENDUM: (Page: 3)
VA FINANCING ADDENDUM: (Page: 3)
USDA FINANCING ADDENDUM: (Page: 3)
ASSUMPTION ADDENDUM: (Page: 3)
GIFT OF FUNDS CONTINGENCY ADDENDUM: (Page: 3)
OWNER FINANCING CONTINGENCY: (Page: 3)
NO FINANCING CONTINGENCY: (Page: 3)
OTHER: (Page: 3)
20 FINANCING APPLICATION AND COMMITMENT BUYER AGREES TO MAKE A WRITTEN APPLICATION FOR THE FINANCING AS: (Page: 3)
COMMITMENT IS NOT OBTAINED BY BUYER WITHIN: (Page: 3)
DAYS FROM THE DATE OF CONTRACT ACCEPTANCE IF A WRITTEN FINANCING: (Page: 3)
ACCEPTANCE 1 SELLER AT SELLERS ELECTION AND UPON WRITTEN NOTICE TO BUYER MAY DECLARE THIS CONTRACT NULL AND VOID AND OF: (Page: 3)
UNDEFINED_4: (Page: 3)
UNDEFINED_5: (Page: 4)
UNDEFINED_6: (Page: 4)
THE BENEFIT OF ANY LOCAL OWNEROCCUPANCY REDUCTION OFFERED BY THE JURISDICTION WHERE THE PROPERTY IS: (Page: 8)
BUYER SHALL BE ENTITLED TO RECEIVE THE BENEFIT OF ANY LOCAL OWNEROCCUPANCY REDUCTION OFFERED: (Page: 8)
BY THE JURISDICTION WHERE THE PROPERTY IS LOCATED: (Page: 8)
DATE: (Page: 10)
DATE_2: (Page: 10)
DATE_3: (Page: 10)
DATE_4: (Page: 10)
CHECK IF FIRSTTIME MARYLAND HOMEBUYER: (Page: 10)
BUYER NAMES 1: (Page: 11)
BUYER NAMES 2: (Page: 11)
MAILING ADDRESS: (Page: 11)
SELLER NAMES 1: (Page: 11)
SELLER NAMES 2: (Page: 11)
MAILING ADDRESS_2: (Page: 11)
LISTING BROKERAGE COMPANY NAME: (Page: 11)
BROKER OF RECORD NAME: (Page: 11)
LICENSE NUMBER: (Page: 11)
SALES ASSOCIATE NAME: (Page: 11)
LICENSE NUMBER_2: (Page: 11)
OFFICE ADDRESS: (Page: 11)
OFFICE PHONE: (Page: 11)
BROKERSALES ASSOCIATE MLS ID: (Page: 11)
SALES ASSOCIATE PHONE: (Page: 11)
SALES ASSOCIATE EMAIL: (Page: 11)
LISTING BROKER AND SELLER AGENT OR: (Page: 11)
INTRA COMPANY AGENT WITH BROKER AS DUAL AGENT: (Page: 11)
SELLING BROKERAGE COMPANY NAME: (Page: 11)
BROKER OF RECORD NAME_2: (Page: 11)
LICENSE NUMBER_3: (Page: 11)
SALES ASSOCIATE NAME_2: (Page: 11)
LICENSE NUMBER_4: (Page: 11)
OFFICE ADDRESS_2: (Page: 11)
OFFICE PHONE_2: (Page: 11)
BROKERSALES ASSOCIATE MLS ID_2: (Page: 11)
SALES ASSOCIATE PHONE_2: (Page: 11)
SALES ASSOCIATE EMAIL_2: (Page: 11)
SELLER AGENT OR: (Page: 11)
SUBAGENT OR: (Page: 11)
BUYER AGENT OR: (Page: 11)
INTRA COMPANY AGENT WITH BROKER AS DUAL AGENT_2: (Page: 11)
TEXT1: (Page: 10)
TEXT2: (Page: 2) this is my console result but here in this these fields there some checkbox option in pdf so i want to differentiate them as checkbox these are checkbox option in pds now i want to know which extract fields are checkbox
SELLER AGENT OR: (Page: 11)
SUBAGENT OR: (Page: 11)
BUYER AGENT OR: (Page: 11)
INTRA COMPANY AGENT WITH BROKER AS DUAL AGENT_2: (Page: 11) here is field which present as checkbox to tick in pdf 11 ADDENDADISCLOSURES THE ADDENDA CHECKED BELOW WHICH ARE HEREBY ATTACHED ARE MADE A PART OF THIS CONTRACT: (Page: 2)
AFFILIATED BUSINESS DISCLOSURE NOTICE: (Page: 2)
ADDITIONAL AS IS PROVISIONS: (Page: 2)
ATUBAT ONSITE SEWAGE DISPOSAL: (Page: 2)
BACKUP CONTRACT: (Page: 2)
CASH APPRAISAL CONTINGENCY: (Page: 2)
CONDOMINIUM RESALE NOTICE: (Page: 2)
CONSERVATION EASEMENT: (Page: 2)
DISCLOSURE OF LICENSEE STATUS: (Page: 2)
DISCLOSURE OF INFORMATION ON LEADBASED PAINT: (Page: 2)
HOMEOWNERS ASSOCIATION NOTICE: (Page: 2)
INCLUSIONSEXCLUSIONS LEASED ITEMS UTILITIES: (Page: 2)
KICKOUT: (Page: 2)
LOCAL CITYCOUNTY CERTIFICATIONSREGISTRATIONS: (Page: 2)
LOCAL CITYCOUNTY NOTICESDISCLOSURE: (Page: 2)
MARYLAND LEAD POISONING PREVENTION PROGRAM: (Page: 2)
OTHER ADDENDASPECIAL CONDITIONS: (Page: 2)
MD NONRESIDENT SELLER TRANSFER WITHHOLDING TAX: (Page: 2)
NOTICE TO BUYER AND SELLER MARYLAND RESIDENTIAL: (Page: 2)
NOTICE DISCL OF DEFERRED WATER SEWER CHARGES: (Page: 2)
ONSITE SEWAGE DISPOSAL SYSTEM INSPECTION: (Page: 2)
PROPERTY INSPECTIONS: (Page: 2)
PROPERTY SUBJECT TO GROUND RENT: (Page: 2)
PURCHASE PRICE ESCALATION: (Page: 2)
SALE FIN SETTLEMENTLEASE OF OTHER REAL ESTATE: (Page: 2)
SELLER CONTRIBUTION: (Page: 2)
SELLERS PURCHASE OF ANOTHER PROPERTY: (Page: 2)
SOLAR PANEL: (Page: 2)
SHORT SALE: (Page: 2)
TENANT OCCUPIED: (Page: 2)
THIRD PARTY APPROVAL: (Page: 2)
WATER QUALITY: (Page: 2)
WATER YIELD TEST: (Page: 2)
@Aqil
Thanks for the details. We’ll investigate this scenario. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): PARSERNET-2180
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Ok thanks i hope you find solution and share with me. i have already find the solution but this not apply to all form but mostly forms it works defined as checkbox