Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 1038

Extracting content/pages

$
0
0
 
    Public filelocation As String
    Public inputfile As String
    'normal
    Dim pages As Array
    Dim count As Integer
    Dim filename As String
    Dim type As String

    Dim typediscription As Array
    Dim reporttype As Array
    Dim filedirectory As String
    Dim PO As String
    Dim Serial As String
    Dim LT As String
    Dim UT As String
    Dim RT As String
    Dim HOLIDAY As String
    Dim HE As String
    Dim ET As String
    Dim MP As String
    Dim LP As String
    Dim pagenumber() As Array


  'Input Document Controls

        inputfile = Form3.TextBox1.Text
        'page Numbers
        ' and removing not needed tests

        'Var
        PO = Form1.POBox.Text
        Serial = Form1.SerielBox.Text
        LT = LTpgno.Text
        UT = UTpgno.Text
        RT = RTpgno.Text
        HOLIDAY = Holidaypgno.Text
        HE = Hepgno.Text
        ET = ETpgno.Text
        MP = MPpgno.Text
        LP = LPpgno.Text
        'Arrays
        pages = {LT, UT, RT, HOLIDAY, HE, ET, MP, LP}
        typediscription = {"LT", "UT", "RT", "HT", "HE", "ET", "MP", "LP"}
        filedirectory = "c:\NDE\NDT Reports\"
        reporttype = {"Hydro\", "UT\", "RT\", "Holiday\", "Helium Leak Tests\", "ET\", "MP\", "LP\"}
        For index = 0 To 7
            If pages(index) = "" = True Then
            Else
                'setting up arrays
                Dim pageorder As String = pages(index)
                Dim pagenumber = Convert.ToInt32(pageorder)
                'nameing
                type = typediscription(index)
                filename = type & PO & " - " & Serial & ".pdf"
                'Creating File Location and name
                filelocation = filedirectory & reporttype(index) & filename
                'extracting files
                Dim pdfEditor As New PdfFileEditor()
                Dim pageinteger As Integer() = New Integer() {pagenumber}
                pdfEditor.OwnerPassword = "password"
                pdfEditor.Extract(inputfile, pagenumber, pagenumber, filelocation)
            End If
        Next

Viewing all articles
Browse latest Browse all 1038

Trending Articles