• Post Reply Bookmark Topic Watch Topic
  • New Topic

Handling PDF files

 
PramilaT Thakur
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,

I would like to have some pointers from all our remarakable readers.

Here is what I want to achieve.
I have few 100's of files in pdf format.(very large in size)
all the pages are scanned and are images.
No consistent page numbers
No bookmarks.

What I want to do is split the pdf files into smaller chunks. To do this I have a tokenString that I want to look into the document text.
Save the individual chunk into separate pdf files.

Reading the whole stream is a problem as the file is too big.
What are the other options I have.

Can someone help me here with some pointers, please.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "smaller chunks"? If the PDFs contain more than one page you can split them into individual pages (he iText library can do that). If the PDFs are already single-page, then there's no meaningful way to cut them down into even smaller units.
 
PramilaT Thakur
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf Dittmer ,

I know we can do that, i.e have each page as a pdf file. I tried that and it worked.

But I do not want my resultant pdf's to be of single page.

For e.g
My original pdf contains 25,000 pages
All pages are images. I will run OCR to get the text out of them.

Now the pdf has several chapters in them.(Say 100 chapters)
The heading of each chapter has a particular string of a Unique font.

So I want to split the pdf into chapters, so the resultant pdf's contain one full chapter from start to finish.
So the result I want to see is 100 pdf with 100 different chapters.

This is what I am expecting and I need help with it or any pointers.

Thanks in advance.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24213
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since you want to split them up according to the text, you can't split them until you've interpreted the text -- i.e., you have to OCR first, and then split the files based on that, right?
 
PramilaT Thakur
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ernest Friedman-Hill ,

you are right. I files go through OCR.
the text is extracted from the images.
The way I can differentiate each Chapter is from their heading in a special font.
So I need to read the whole text in one short.
But because the text is too long, the machine could run out of memory.
So, I am looking for someother alternative.

Page numbers are also not in sequence.
Each chapter begings with page 1, in image

Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!