• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Handling PDF files

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic