# Splitting multi-page PDF document containing multiple document types

**URL:** <https://forum.uipath.com/t/splitting-multi-page-pdf-document-containing-multiple-document-types/459377>\
**Category:** Document Understanding\
**Tags:** digitize, classify-scope, intelligent-ocr, document-understanding, activities\
**Created:** [July 25, 2022, 2:42pm UTC](https://forum.uipath.com/t/splitting-multi-page-pdf-document-containing-multiple-document-types/459377 "2022-07-25T14:42:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrewh](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/andrewh/32/266704_2.png) [@andrewh](https://forum.uipath.com/u/andrewh)\
**Post date:** [July 25, 2022, 2:42pm UTC](https://forum.uipath.com/t/splitting-multi-page-pdf-document-containing-multiple-document-types/459377/1 "2022-07-25T14:42:12Z")

</div>

Hi all

Pretty big ramble here so please bear with me

We are working on a problem where we are using DU to ultimately ingest files of one type into a system, lets call these cover pages. We will be performing text extraction on these at a later stage (performer) but for now, in the dispatcher, the goal is to extract a number of documents from a large, single master pdf.

Now, I am using DU & the Intelligent Keyword Classifier to split these documents based on the cover pages.

I manually split one of these documents up and carefully extracted only the cover pages out to train this model which I have done.

So the plan is the document gets digitized and then classified and using these classification results, I use the Extract PDF Page Range activity feeding in the DocumentBounds.StartPage and a little logic using DocumentBounds.PageCount to generate a string of the format “2” or “2-4” etc for the range. This approach works nicely.

My first question.

The example I am using to dev with is a 96 page pdf and the digitization process takes a r-e-a-l-l-y long time and absolutely pins the cores on my cpu for the duration. That in itself is no big issue but I do have concerns when this scales up to dealing with bigger numbers of these. Does anyone know of any optimizations I can make with the digitization step?

Another question.

Some of these cover pages actually stretch to 2 pages depending on the volume of content in them, so I have trained with these as 2 pages and some are single page documents. Does that pose a problem? I only ask as I am getting mixed results in classification.

Ultimately, I think we are going to be using the Classification station within the Action Centre to provide human in the loop input to help us split these initially, feeding that back into the training using the Train Classifiers scope but I had hoped for better results without that out of the gate.

I did actually think that I should perhaps train the system using the worst case first page of a covering document. For example, work out a worst case document and see what content is on that and use that to train?

I guess this is difficult as the Intelligent Keyword Classifier takes granular control of the word list it has built away from me and would appreciate your thoughts

Andy

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [July 27, 2022, 4:00pm UTC](https://forum.uipath.com/t/splitting-multi-page-pdf-document-containing-multiple-document-types/459377/2 "2022-07-27T16:00:45Z")

</div>

Hello @andrewh!

It seems that you have trouble getting an answer to your question in the first 24 hours.  
Let us give you a few hints and helpful links.

First, make sure you browsed through our [**Forum FAQ Beginner’s Guide**](https://forum.uipath.com/t/forum-faq-beginner-s-guide/200562). It will teach you what should be included in your topic.

You can check out some of our resources directly, see below:

1. **Always search first**. It is the best way to quickly find your answer. Check out the [![image](https://global.discourse-cdn.com/uipath/original/3X/d/f/df7370d76626e03b84e2bf049481f5a20d345ef9.png)](https://forum.uipath.com/search) icon for that.  
Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.

2. Topic that contains most common solutions with example project files can be found [**here**](https://forum.uipath.com/t/your-xaml-solutions-for-most-common-issues-wiki-post-anyone-can-edit/108894).

3. Read our [**official documentation**](https://docs.uipath.com) where you can find a lot of information and instructions about each of our products:

4. Watch the videos on our [**official YouTube channel**](https://www.youtube.com/user/UiPath) for more visual tutorials.

5. Meet us and our users on our [**Community Slack**](https://join.slack.com/t/uipathcommunity/shared_invite/zt-19ovcbo1u-S7xNszAzcJcdlG9o4A1CTA) and ask your question there.

Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.

Thank you for helping us build our UiPath Community!

Cheers from your friendly  
[Forum\_Staff](https://forum.uipath.com/new-message?groupname=Forum_Staff)

---

<div class="post-metadata">

**Author:** ![sharon.palawandram](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/sharon.palawandram/32/257521_2.png) [@sharon.palawandram](https://forum.uipath.com/u/sharon.palawandram)\
**Post date:** [October 4, 2022, 4:56pm UTC](https://forum.uipath.com/t/splitting-multi-page-pdf-document-containing-multiple-document-types/459377/3 "2022-10-04T16:56:58Z")

</div>

> [@andrewh](#):
>
> The example I am using to dev with is a 96 page pdf and the digitization process takes a r-e-a-l-l-y long time and absolutely pins the cores on my cpu for the duration. That in itself is no big issue but I do have concerns when this scales up to dealing with bigger numbers of these. Does anyone know of any optimizations I can make with the digitization step?

The speed of digitization depends on what OCR engine you use. It’s pretty straightforward that you might see a decent time spent to digitize 90+ pages, but you have a small window to increase the speed of digitization, through the OCR engine used, if it’s in the server you can increase the memory allocated for it, GPU etc.

Another approach on speeding up the digitization process.

> [@How to speed up OCR and digitize document part](https://forum.uipath.com/t/how-to-speed-up-ocr-and-digitize-document-part/192801):
>
> I have created a workflow for the invoice AI processing stuff and am trying to get it ready for our AP folks using. Everything seems to work pretty well, but there are certain invoices that really slow down the workflow to a point where it is too long of a wait without some kind of loading screen to show the user. Some PDF invoices have a second page with a bunch of small text terms and stuff, which I have found slows things down exponentially. Most invoices only take 5-10 seconds. This workflow…

> [@andrewh](#):
>
> Some of these cover pages actually stretch to 2 pages depending on the volume of content in them, so I have trained with these as 2 pages and some are single page documents. Does that pose a problem? I only ask as I am getting mixed results in classification.

I dont see a problem here as long as you have trained them they should be fine.

> [@andrewh](#):
>
> I guess this is difficult as the Intelligent Keyword Classifier takes granular control of the word list it has built away from me and would appreciate your thoughts

You can improve the accuracy of the model over time by using an intelligent keyword classifier trainer, this will retrain the model with human in the loop validated data.

> **[Activities - Intelligent Keyword Classifier Trainer](https://docs.uipath.com/activities/other/latest/document-understanding/intelligent-keyword-classifier-trainer)**
>
> The UiPath Documentation Portal - the home of all our valuable information. Find here everything you need to guide you in your automation journey in the UiPath ecosystem, from complex installation guides to quick tutorials, to practical business...
