def Run(cls):
     infoApi = groupdocs_parser_cloud.InfoApi.from_config(Common.GetConfig())
     parse_options = groupdocs_parser_cloud.InfoOptions()
     parse_options.file_info = groupdocs_parser_cloud.FileInfo()
     parse_options.file_info.file_path = "words-processing/docx/password-protected.docx"
     parse_options.file_info.password = "******"
     request = groupdocs_parser_cloud.GetInfoRequest(parse_options)
     result = infoApi.get_info(request)
     print("InfoResult.PageCount: " + str(result.page_count))
 def Run(cls):
     infoApi = groupdocs_parser_cloud.InfoApi.from_config(
         Common.GetConfig())
     options = groupdocs_parser_cloud.ContainerOptions()
     options.file_info = groupdocs_parser_cloud.FileInfo()
     options.file_info.file_path = "containers/archive/zip.zip"
     request = groupdocs_parser_cloud.ContainerRequest(options)
     result = infoApi.container(request)
     for item in result.container_items:
         print("Name: " + item.name + ". FilePath: " + item.file_path)
Esempio n. 3
0
    def Run(cls):
        parseApi = groupdocs_parser_cloud.ParseApi.from_config(
            Common.GetConfig())
        options = groupdocs_parser_cloud.TextOptions()
        options.file_info = groupdocs_parser_cloud.FileInfo()
        options.file_info.file_path = "email/eml/embedded-image-and-attachment.eml"

        request = groupdocs_parser_cloud.TextRequest(options)
        result = parseApi.text(request)

        print("Text: " + result.text)
Esempio n. 4
0
    def Run(cls):
        parseApi = groupdocs_parser_cloud.ParseApi.from_config(
            Common.GetConfig())
        options = groupdocs_parser_cloud.TextOptions()
        options.file_info = groupdocs_parser_cloud.FileInfo()
        options.file_info.file_path = "words-processing/docx/formatted-document.docx"
        text_options = groupdocs_parser_cloud.FormattedTextOptions("Markdown")
        options.formatted_text_options = text_options

        request = groupdocs_parser_cloud.TextRequest(options)
        result = parseApi.text(request)
        print("Text:" + result.text)
    def Run(cls):
        parseApi = groupdocs_parser_cloud.ParseApi.from_config(Common.GetConfig())
        options = groupdocs_parser_cloud.ImagesOptions()
        options.file_info = groupdocs_parser_cloud.FileInfo()
        options.file_info.file_path = "slides/three-slides.pptx"

        request = groupdocs_parser_cloud.ImagesRequest(options)
        result = parseApi.images(request)

        for image in result.images:
            print("Image path in storage: " + image.path + ". Download url: " + image.download_url)
            print("Image format: " + image.file_format + ". Page index: " + str(image.page_index))
Esempio n. 6
0
    def Run(cls):
        parseApi = groupdocs_parser_cloud.ParseApi.from_config(
            Common.GetConfig())
        options = groupdocs_parser_cloud.TextOptions()
        options.file_info = groupdocs_parser_cloud.FileInfo()
        options.file_info.file_path = "cells/two-worksheets.xlsx"
        options.start_page_number = 1
        options.count_pages_to_extract = 1

        request = groupdocs_parser_cloud.TextRequest(options)
        result = parseApi.text(request)

        for page in result.pages:
            print("PageIndex: " + str(page.page_index) + ". Text: " +
                  page.text)
    def Run(cls):
        parseApi = groupdocs_parser_cloud.ParseApi.from_config(
            Common.GetConfig())
        options = groupdocs_parser_cloud.TextOptions()
        options.file_info = groupdocs_parser_cloud.FileInfo()
        options.file_info.file_path = "pdf/PDF with attachements.pdf"
        options.file_info.password = "******"
        container_info = groupdocs_parser_cloud.ContainerItemInfo()
        container_info.relative_path = "template-document.pdf"
        options.container_item_info = container_info
        options.start_page_number = 2
        options.count_pages_to_extract = 1

        request = groupdocs_parser_cloud.TextRequest(options)
        result = parseApi.text(request)

        print("Text: " + result.pages[0].text)
    def Run(cls):
        parseApi = groupdocs_parser_cloud.ParseApi.from_config(Common.GetConfig())
        options = groupdocs_parser_cloud.ParseOptions()
        options.file_info = groupdocs_parser_cloud.FileInfo()
        options.file_info.file_path = "containers/archive/companies.zip"
        container_info = groupdocs_parser_cloud.ContainerItemInfo()
        container_info.relative_path = "companies.docx"
        options.container_item_info = container_info
        options.template = Common.GetTemplate()
        request = groupdocs_parser_cloud.ParseRequest(options)
        result = parseApi.parse(request)
        
        for data in result.fields_data:
            if data.page_area.page_text_area is not None:
                print("Field name: " + data.name + ". Text :" + data.page_area.page_text_area.text)

            if data.page_area.page_table_area is not None:
                print("Table name: " + data.name)
                for cell in data.page_area.page_table_area.page_table_area_cells:
                    print("Table cell. Row " + str(cell.row_index) + " column " + str(cell.column_index) + ". Text: " + cell.page_area.page_text_area.text);
Esempio n. 9
0
    def Run(cls):
        # For example purposes create template if not exists.
        Common.CreateIfNotExist("templates/companies.json")

        parseApi = groupdocs_parser_cloud.ParseApi.from_config(Common.GetConfig())
        options = groupdocs_parser_cloud.ParseOptions()
        options.file_info = groupdocs_parser_cloud.FileInfo()
        options.file_info.file_path = "words-processing/docx/companies.docx"
        options.template_path = "templates/companies.json"
        
        request = groupdocs_parser_cloud.ParseRequest(options)
        result = parseApi.parse(request)
        
        for data in result.fields_data:
            if data.page_area.page_text_area is not None:
                print("Field name: " + data.name + ". Text :" + data.page_area.page_text_area.text)

            if data.page_area.page_table_area is not None:
                print("Table name: " + data.name)
                for cell in data.page_area.page_table_area.page_table_area_cells:
                    print("Table cell. Row " + str(cell.row_index) + " column " + str(cell.column_index) + ". Text: " + cell.page_area.page_text_area.text);
    def Run(cls):
        parseApi = groupdocs_parser_cloud.ParseApi.from_config(
            Common.GetConfig())
        options = groupdocs_parser_cloud.ImagesOptions()
        options.file_info = groupdocs_parser_cloud.FileInfo()
        options.file_info.file_path = "pdf/PDF with attachements.pdf"
        options.file_info.password = "******"
        container_info = groupdocs_parser_cloud.ContainerItemInfo()
        container_info.relative_path = "template-document.pdf"
        options.container_item_info = container_info
        options.start_page_number = 2
        options.count_pages_to_extract = 1

        request = groupdocs_parser_cloud.ImagesRequest(options)
        result = parseApi.images(request)

        for page in result.pages:
            print("Images from " + str(page.page_index) + " page.")
            for image in page.images:
                print("Image path in storage: " + image.path +
                      ". Download url: " + image.download_url)
                print("Image format: " + image.file_format + ". Page index: " +
                      str(image.page_index))