November 3rd, 2021 12:00 PM EDT
Automation for Field Services & DistributionNovember 3rd, 2021 12:00 PM EDT
Learn how creating a digital workforce can improve your supply chain processes!

PDF is a library for managing PDF documents.

It can be used to extract text from PDFs, add watermarks to pages, and decrypt/encrypt documents.

There is also limited support for updating form field values.

Input PDF file can be passed as an argument to the keywords, or it can be omitted if you first call Open PDF. Reference to the current active PDF will be stored in the library instance.


Robot Framework

Library    RPA.PDF

Extract Data
    ${text}=    Get Text From PDF    ./tmp/sample.pdf

Fill Form
    Open PDF    ./tmp/sample.pdf
    Set Field Value    phone_nr   080123123
    Set Field Value    address    robot street 14
    Save Field Values  output_path=output.pdf
from RPA.PDF import PDF

pdf = PDF()

def extract_data():
    text = pdf.get_text_from_pdf("./tmp/sample.pdf")

def fill_form():
    pdf.set_field_value("phone_nr", 080123123)
    pdf.set_field_value("address", "robot street 14")