Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading fields from PDF
Message
From
11/11/2011 17:12:55
 
 
To
11/11/2011 16:52:20
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01528652
Message ID:
01528699
Views:
31
>Yes that is very much like the situation I had and this worked very well.

I tried that earlier on and was unable to make it work. It seems to be related to the same problem I have in this example:
    ' Get all the fields from a PDF file
    ' expC1 File
    Private Function GetFields(ByVal tcFile As String) As Boolean
        Dim loAcroFields As iTextSharp.text.pdf.AcroFields = Nothing
        Dim loDictionaryEntry As DictionaryEntry = Nothing
        Dim loPdfReader As iTextSharp.text.pdf.PdfReader = Nothing

        ' Get the file
        loPdfReader = New iTextSharp.text.pdf.PdfReader(tcFile)

        ' Get the fields
        loAcroFields = loPdfReader.AcroFields

        ' For each field
        For Each loDictionaryEntry In loAcroFields.Fields

        Next

        Return True
    End Function
As you can see, this example is very sample. But, the designer doesn't like the loAcroFields.Fields in the For/Next loop. It says:

"Value of type 'System.Collections.Generic.KeyValuePair(Of String, iTextSharp.text.pdf.AcroFields.Item)' cannot be converted to 'System.Collections.DictionaryEntry'."

I also tried with all the imports. This has no effect. In my code, I include the namespace as is where needed.

This is an example I took from http://blog.pagesd.info/post/2008/09/25/Lister-les-champs-d-un-formulaire-PDF.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform