Registry / data / rpaframework-pdf

rpaframework-pdf

JSON →
library11.0.0pypypi✓ verified 87d ago

RPA Framework PDF Library (`rpaframework-pdf`) is a Python library for managing PDF documents. It provides functionalities such as extracting text, adding watermarks, encrypting/decrypting documents, and merging/splitting PDFs. It is part of the broader RPA Framework, an actively maintained collection of open-source libraries for Robotic Process Automation (RPA), designed for both Robot Framework and Python. The current version is 10.0.3, released on March 6, 2026.

pip install rpaframework-pdf
INSTALL
IMPORT
SIG · RPAFRAMEWORK-PDF
R
rpaframework-pdf
datapythonv11.0.0
Install
8.5s avg
Import
3343ms
Disk
148MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v11.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 3.310s · 145.8MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 8.5s · import 3.375s · 150MB
148MB installed
● package 148MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PDF
from RPA.PDF import PDF

This quickstart demonstrates how to use `rpaframework-pdf` to extract text from a PDF. It first creates a simple PDF file using `fpdf2` (which needs to be installed separately) and then uses `RPA.PDF`'s `get_text_from_pdf` keyword to read its content. The extracted text is then printed and saved to a text file. Finally, it cleans up the created files.

import os from fpdf import FPDF from RPA.PDF import PDF def create_dummy_pdf(filename): pdf = FPDF() pdf.add_page() pdf.set_font("Arial", size=12) pdf.cell(200, 10, txt="Hello from RPA Framework!", ln=True, align="C") pdf.cell(200, 10, txt="This is a test document.", ln=True, align="L") pdf.output(filename) def main(): input_pdf = "test_document.pdf" output_pdf = "extracted_text.txt" # Create a dummy PDF for demonstration create_dummy_pdf(input_pdf) print(f"Created: {input_pdf}") pdf_lib = PDF() # Example 1: Get text from PDF print(f"\nExtracting text from {input_pdf}...") text_data = pdf_lib.get_text_from_pdf(input_pdf) # text_data is a dictionary where keys are page numbers (1-indexed) extracted_text = "\n".join(text_data.get(1, [])) # Get text from the first page with open(output_pdf, "w") as f: f.write(extracted_text) print(f"Extracted text saved to {output_pdf}:") print(extracted_text) # Clean up dummy files os.remove(input_pdf) os.remove(output_pdf) print("\nCleaned up dummy files.") if __name__ == "__main__": # Requires 'fpdf2' to create the dummy PDF for this quickstart # pip install rpaframework-pdf fpdf2 main()
Debug
Known issues
gotchaThe library primarily works with text-based PDFs. It cannot reliably extract information from image-based (scanned) PDF files. For such cases, specialized external services wrapped by the `RPA.DocumentAI` library are recommended.
fix
Ensure PDFs are text-based or utilize `RPA.DocumentAI` for image-based PDFs.
affects: All versions
gotchaHistorically, keywords like `Get Text From PDF` would parse the entire document even when only specific pages were requested, leading to performance issues with very large PDF files. While improvements have been made, users should be mindful of performance when processing exceptionally large documents.
fix
Upgrade to the latest version of `rpaframework-pdf`. For extremely large PDFs, consider processing strategies that minimize full document parsing where possible.
affects: < 7.1.6 (improvements in #300, 7.1.6)
gotchaOlder versions of `rpaframework-pdf` (e.g., 7.1.5) and the broader `rpaframework` meta-package had compatibility constraints with `robotframework` versions >= 6.0, often downgrading `robotframework` during installation. While newer versions of `rpaframework` (including `rpaframework-pdf`) have updated their dependencies to support more recent Python and Robot Framework versions, users on older `rpaframework` setups might encounter this dependency conflict.
fix
Ensure you are using the latest `rpaframework-pdf` and `rpaframework` versions, which generally have broader compatibility. If maintaining an older setup, constrain `robotframework` to `~=5.0.0` or use a dedicated virtual environment.
affects: <= 7.1.5
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'RPA.PDF'
The rpaframework-pdf library or its core component RPA.PDF is not installed or not available in the current Python environment.
fix
Install the library using pip: `pip install rpaframework-pdf`
ImportError: cannot import name 'text_content' from 'pdfminer.layout'
This error often indicates a version conflict or incompatibility with 'pdfminer.six', a dependency of rpaframework-pdf, where a required function has been moved or removed.
fix
Upgrade rpaframework-pdf to ensure all its dependencies are updated to compatible versions: `pip install --upgrade rpaframework-pdf`
PyPDF2.errors.PdfReadError: File has not been decrypted
You are attempting to open or process an encrypted PDF document without providing the correct password to the `open_pdf` keyword or method.
fix
Provide the correct password when opening the PDF, for example: `PDF().open_pdf("encrypted_doc.pdf", password="your_password")`
FileNotFoundError: [Errno 2] No such file or directory: 'your_document.pdf'
The specified PDF file path does not exist, is misspelled, or the Python process lacks the necessary permissions to access it.
fix
Verify the file path is correct, the file exists at the specified location, and the program has read access to it. Ensure the path is absolute or relative to the current working directory.
Upgrade
Version history
11.0.0latest on PyPI · released May 3, 2026
Audit
Dependencies
pypdfrequiredCore library for PDF manipulation and processing, upgraded to >=6.6 for security.
pdfminer-sixrequiredUsed for advanced text extraction from PDFs, upgraded to >=20251107 for security.
rpaframework-coreoptionalA foundational support package for other RPA Framework libraries, often included as a transitive dependency.
Agent activity
18 hits · last 30 days
node
14
Amazon
1
OpenAI (training)
1
Resources
rpaframework-pdf — pip install rpaframework-pdf · libregistry