bcgov / bcgov/entity

Replace PyPDF2 with pypdf?

Open
#24,710 1 comment 0 reactions 0 assignees View on GitHub
Entities Team techdebt
Dominant language
JavaScript
Stars
23
Forks
62
Avg merge
24m
Merged PRs (30d)
1

Description

## What is the problem?
* Reported as an OPS issue. Based on the analysis found out that some pdf's are not editable using PyPDF2
* OPS ticket: https://sbc-registries.atlassian.net/browse/ITOPS-147634

## What is the impact?
* Validation passes but filing is stuck in “Filed and Pending” state due to pdf error (unable to stamp registrar signature)

## Proposed solution
Based on the initial analysis:
* Tried with latest PyPDF2 version (last released on Dec 2022, may not be maintained), still having error
* Tried with pypdf and its processing (maintained, last released on Oct 2024)

Scope of this ticket is to confirm [PyPDF2](https://pypi.org/project/PyPDF2) can be replaced with [pypdf](https://pypi.org/project/pypdf). Test all the existing scenarios (used in 2 places. legal-api validation and entity-filer stamp registrar signature)

PDF with error: [City In Colour Rules of Association (Signed).pdf](https://api.zenhub.com/attachedFiles/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBd3NCQ0E9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--3d44b99b6de6ae095a45715aa7694f8002e0b234/City%20In%20Colour%20Rules%20of%20Association%20%28Signed%29.pdf)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the existing PyPDF2 usage in legal-api validation and entity-filer registrar-signature stamping. Run the existing scenarios with the linked City In Colour PDF and other PDF cases, then confirm that replacing PyPDF2 with pypdf preserves processing and prevents the filing from remaining in “Filed and Pending” due to the PDF error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, testing-qa
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.