【发布时间】:2020-07-10 02:54:24
【问题描述】:
我想解析pdf并使用c#提取姓名地址联系方式等数据
PDF 数据解析是使用 pdfpig 完成的 任何人都可以建议或帮助数据提取吗? 如何从可用数据中提取准确的键值对。? 提前致谢!!
BajajAllianzGeneralInsuranceCompanyLtd.RegisteredandHeadOffice:GEPlaza,AirportRoad,Yerwada,PuneTranscriptofProposalforPrivateCar-PackagePolicyDearRAJINDERKUMARGUPTA,Wewishtoinformyouthatthecontractunderpolicynumber'OG-17-1104-1801-00011267'hasbeenfinalizedbasedontheinformationanddeclarationgivenbyyou,thetranscriptwhereofismentionedbelow.Youarerequestedtoreconfirmthesame.Incaseofanydisagreementorobjectionoranychangeswithrespecttoinformationmentionedbelow,werequestyoutopleaserevertbackwithinaperiodof15daysfromdateofyourreceiptofthis,failingwhichitwillbedeemedthatyouaresatisfiedwiththecorrectnessofthedetailsmentionedbelow.Kindlynotethatasthecontentsanddeclarationscontainedinthistranscriptisthebasisonwhichwehaveissuedthepolicytoyou,weadviseyoutopleaseensurethatyouhaveprovided/disclosedandornotwithheldanymaterialfacts/informationanddeclarations,asPolicybecomesVoidabinitioifmaterialfactsarenotprovided/disclosedandorwithheldandinsuchcasenoclaim,ifany,willbeconsideredbyusapartfromforfeitureofthepremium.Detailsprovidedbyyou:A.Proposerdetails1.ProposerName:RAJINDERKUMARGUPTA2.ProposerAddress:NEARPIPALCHOWK,ASSANDH,,KARNAL,HARYANA-1320393.ProposerMobileNumber:4.ProposerResidentialNumber:NA5.Proposere-mailid:NA6.ProposerProfession:NAB.VehicleDetailsRegistrationNumberMonth/YearofRegnVehicleMakeVehicleModelVehicleSubTypeCubicCapa-cityFuelTypeYearofMan-ufactureSeatingCa-pacityHR40A4511OCT/2004MARUTIALTOSTANDARD796Petrol20045EngineNumberChassisNumberVehicleIDV(inRs.)ElectricalAccessoriesIDV(inRs.)Non-ElectricalAccessoriesIDV(inRs.)CNG/LPGUnit(Extrafitted)IDV(inRs.)TotalIDV(inRs.)0109910973478100000081000C.Coverageopted1.PeriodofInsurance:From20-OCT-201600:01(Hrs)To19-OCT-2017Midnight2.IsyourvehiclefittedwithexternalLPG/CNGkit:No.3.ElectricalAccessoriescoverOpted(IfApplicable):No.4.Non-ElectricalAccessoriescoverOpted(IfApplicable)::No.5.IsVoluntaryExcessopted:No.Amountofvoluntaryexcessopted:Rs.NA.6.WhetherPAcoverisoptedforowner-driver:Yes.7.Isanyadditionalcompulsorydeductibleimposedandagreedupon:No.Amountofadditionalcompulsorydeductibleimposed:NA.8.Whethergeographicalareaextensionisopted:No.DetailsofCountriestowhichgeographicalareaextensioncoverisgiven:NA.9.IsLLtopersonforPaiddriver/Operation/Maintenanceopted:Yes.10.WhetherPAcoverisoptedforpaiddriverotherthanownerdriver:No.SumInsuredforPaidDriver:Rs.NA.11.WhetherPAcoverisoptedforpassengers:No.SumInsuredperPassenger:Rs.NA.12.IsTPPDrestrictedtostatutorylimitofRs.6000?:No.13.PreExistingdamagesinthevehicle:CostofRepair/ReplacementtowardsthedamagedpartsnoticedduringtheinspectionofyourvehiclepriortoenrolmentunderthispolicyasperInspectionreportreferencenumber2016-02305432dulysignedbyyouoryourrepresentativeaswellasthephotographsshallbeexcludedintheeventofanyfutureclaims.14.PremiumforLiabilitycoverage,quotedandagreeduponis:Rs.2205.15.PremiumforODcoverage,quotedandagreeduponis:Rs.861.16.TotalPremium(excludingServiceTaxandEducationCess)forLiabilityandODcoverages,quotedandagreeduponis:Rs.306617.NCB(NoClaimBonus)claimedbyyouandgrantedbyusbasedonyourdeclarationofnoclaimduringyourpreviouspreviouspolicy:-50%.18.Aboutthelastinsurancecompany(i)InsuranceProvider:IFFCOTokioGeneralInsuranceCompanyLimited..(ii)PreviousPolicyNo:1-3S5LBHC,PreviousPolicyExpiryDate:01-SEP-1619.WhetheryourvehicleisHypothecatedandifsothedetailsofPledgeewhosenameisregisteredbyus:No.NameofPledgee:NA.20.AddonCover(s)opted:No.Planname:NAPleasenoteCoverNoteNo.DY1303078914/19-OCT-201610:20issuedtoyoubasingontheaboveinformation.IncaseofDisagreementorobjectionoranychangeswithrespecttoinformationandcontentsmentionedhereinabove,pleasecontactourtollfreenumber®isteryourobjections/changes/disagreementtothecontentsofthistranscriptoryoumayalsosendusemailorwrittencorrespondenceatthefollowingdetailswithinaperiodof15daysfromdateofyourreceiptofthistranscriptalongwithPolicy:I/WeherebyunconditionallyallowtheCompanytoshareallmy/ourinformationbeingcollectedinthisproposalformorthroughtelephonic/email/web-inputsmeansorothermeans,asupdatedfromtimetotimewithingroupentities.TollfreeNumber:1800-22-5858,1800-102-5858,1800-209-5858Emailaddress:customercare@bajajallianz.co.inWebsite:www.bajajallianz.comContactourpolicyservicingbranchat:BlockNo-4,7thFloor,DLFTowers,,15,ShivajiMarg,,-,NewDelhi-110015PH:011-66278000.♦♣♠
我想提取 ProposerName
【问题讨论】:
-
让我明白,您可以成功地将 pdf 转换为文本,现在您要提取数据吗?好吧,这取决于您的最终文本文件的外观。您可以使用正则表达式模式,或者如果它具有 .csv 格式或其他格式,您可以将文本拆分为行(通过“\n”),然后按列拆分每一行。视情况而定。
-
如果你还没有做,你可以使用pdftotext将它转换成文本xpdfreader.com/pdftotext-man.html然后你提取数据。
-
我已经更新了问题描述。这是一种选择 ProposerName 及其值的方法。
-
我昨天已经回答了:D 刚刚修复了
regexPattern字符串中的一些细节。试试看!
标签: c# pdf extract data-extraction pdf-extraction