Run Properties Extraction

This guide will show you how to extract and work with run properties.

Before you begin

You should get your API key from your UniCloud account.

If this is your first time using UniOffice SDK, follow this guide to set up a local development environment.

Clone the project repository

In your terminal, clone the examples repository. It contains the Go code we will be using for this guide.

git clone https://github.com/unidoc/unioffice-examples

To get the example navigate to the path document/run-properties folder in the unioffice-examples directory.

cd unioffice-examples/document/run-properties/

How it works

Lines 5-13 import the UniOffice packages and other required dependencies.

The init function in lines 15-22 authenticates your request with your UNIDOC_LICENSE_API_KEY.

The main function, spanning from line 24 to 76, begins by opening the new_resume_001.docx document at line 25. Subsequently, at line 30, it iterates through all the paragraphs using a loop. Within each paragraph, it processes various runs, extracting content from runs and hyperlinks in the document. The extracted text is printed to the console, and the file is ultimately saved at line 75.

Run the code

Run this command to display all the contents of the runs on the console.

go run main.go

Sample output

0
Phone
1
:

0
+49 800 600 600

0
E-Mail:
1

0
Hyperlink:
[email protected]

0
Linkedin:

0
linkedin.com/christopher.morgan

0
Skill Highlights

0
Skill Highlights

0
Project management

0
Strong decision maker

0
Complex problem solver

0
Creative design

0
Innovative

0
Service-focused

0
Languages

0
Spanish – C2

0
Chinese – A1

0
Experience

0
09/2015 to 05/2019

0
Web Developer -
1
Luna Web Design, New York

2
Cooperate with designers to create clean interfaces and simple, intuitive interactions and experiences.

0
Develop project concepts and maintain optimal workflow.

0
Work with senior developer to manage large, complex design projects for corporate clients.

0
Complete detailed programming and development tasks for front-end public and internal websites as well as challenging back-end server code.

0
Carry out quality assurance tests to discover errors and optimize usability.

0
Education

0
2014-2019

0
Bachelor of Science: Computer Information Systems -
1
Columbia University, NY

0
Certifications

0
PHP Framework (certificate):
1
Zend, Codeigniter, Symfony.

0
Programming Languages:

0

0
CHRISTOPHER MORGAN

0
Senior Web Developer
1
specializing in front-end development. Experienced with all stages of the development cycle for dynamic web projects. Well-versed in numerous programming languages including HTML5, PHP OOP, JavaScript, CSS, MySQL. Strong background in project management and customer relations.

Got any Questions?

We're here to help you.