Splitting PDF by Keyword While Preserving Original Page Formatting in Pega and Create new PDF

Tharushi Kuruwitage
Fri, 03 Apr 2026 11:24:11 +0000
General

Hi everyone,

I have a requirement to split a PDF document in Pega based on a specific keyword. The expectation is that when the keyword is found on certain pages, those entire pages should be extracted and compiled into a new PDF document (maintaining the original formatting). I am working on Pega Constellation 25.1.2 version.

I have already attempted an approach using GenAI, where I:

Search for the keyword within the document

Extract the relevant page containing the keyword

Generate a new PDF using the Create PDF automation

While this approach works to some extent, it only extracts the text content and does not preserve the original formatting. Additionally, it does not include the full page only the extracted section.

What I’m looking for is a way to:

Identify the pages containing the keyword

Extract those full pages (not just sections)

Generate a new PDF that preserves the original layout and formatting

Has anyone implemented a similar requirement or can suggest an approach or best practice to achieve this in Pega?

Thanks in advance!

7 posts - 3 participants