Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reading fields from PDF
Message
De
11/11/2011 14:36:35
 
 
À
11/11/2011 14:17:21
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01528652
Message ID:
01528689
Vues:
38
>>I think this is the only line that uses iTextsharp in this routine
>>
>> pdffields = GetPDFFormFields(pdffile)
>
>I also check for GetPDFFormFields and this does not appear in the iTextSharp.text.pdf namespace. How do you get it?


Sorry, it has been about 3 years since I wrote that code. i forget that is my function
    Private Function GetPDFFormFields(ByVal pdfform As String) As String

        Dim pdfformfields As String

        ' create a new PDF reader based on the PDF template document

        Dim PdfReader As PdfReader = New PdfReader(pdfform)


        Dim fieldlist As New ArrayList(PdfReader.AcroFields.Fields.Keys)

        fieldlist.Sort()

        ' create and populate a string builder with each of the 
        ' field names available in the subject PDF
        Dim sb As New StringBuilder()

        'Dim de As New DictionaryEntry
        'For Each de In pdfReader.AcroFields.Fields
        '    sb.Append(de.Key.ToString() + Environment.NewLine)
        'Next


        For i As Integer = 0 To fieldlist.Count - 1
            sb.Append(fieldlist(i).ToString + Environment.NewLine)
        Next
        ' Write the string builder's content to the form's textbox

        pdfformfields = sb.ToString()

        Return pdfformfields
    End Function


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform