Selector issue in Editable PDF

@Rishi1,

There may be many ways achieve/extract the data from pdf
all am using to extract the data from the pdf which is in an editable from

So here it goes am using the itextsharp.dll which will allow me to set and get pdf data from editable pdfforms.

AcroFields.feilds will give the list of editable fields in the form of dictionary
as a key value pair

for instance

if you see in the above their are some couple of fields in the pdf
using the key i can GET/SET the value of the Pdf

You can use below method to retrieve the value
$PDFDoc.AcroFields.GetField()

:slight_smile:
Thanks & Regards
Sanjay Shankhla

Hi @sanjay21051990
0204-AO - MB.pdf (58.1 KB)
I have this pdf and I want all the values like from , to ,invoice no, po , order details and bank details, I have tried lots of OCR like google , Microsoft, abby and free ocr space api and also tried screen capturing but nothing worked . I also tried the acrofield.fields but it is not giving any key value pair for the pdf.

Hi @Rishi1,

AcroFields
Will only work onto the Editable pdf forms
not on the Printable forms

This is why you getting the count of dictonary as Zero

Regards
Sanjay shankhla

Hi @sanjay21051990
can you suggest any way to fetch the data from pdf , I mean the perfect data .

hi @Rishi1,

In such Pdf Cases all you have to do is
1.String manipulation or Pattern matching
2.Conversion of pdf text and importing to xlsx.for reference you can use conversions below

hi @sanjay21051990
All the links u have shared not working and this are related to excel to pdf conversion but I need pdf to excel conversion and I think if this type of conversion is there then it will give all the data in the first column of the excel.

Hi @Rishi1,

check the number 3
3. Importing into excel from a Text file
Try writing you pdf data to a text file and take the input of your text file to excel
this may convert you the pdf data to excel column

regards
Sanjay Shankhla

Hi @sanjay21051990

Iā€™m unable to download this zip file, it redirects to another page and throws an error (screenshot attached). Could you please try upload the file again?

Am not sure,
This is the issue with the fourm i guess

Can you please re-upload the file again?

Hi @nishakankaria,
There is some issue with forum and it would be fix soon check this out

Regards
sanjay shankhla

sanjay21051990

Hello!
I am trying to do the same but passing variables into the paths, in such a way:

[System.Reflection.Assembly]::LoadFrom($path1) | Out-Null
$PDFDoc = New-Object iTextSharp.text.pdf.PdfReader -ArgumentList $path2
$PDFDoc_ = New-Object iTextSharp.text.pdf.PdfStamper($PDFDoc,[System.IO.File]::Create($path3))

But it does not work. Why? The error is this one:

image
image
image