Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Problem with text extraction
  FAQ FAQ  Forum Search   Register Register  Login Login

Problem with text extraction

 Post Reply Post Reply
Author
Message
rstojnic View Drop Down
Beginner
Beginner


Joined: 23 Nov 13
Location: United Kingdom
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote rstojnic Quote  Post ReplyReply Direct Link To This Post Topic: Problem with text extraction
    Posted: 23 Nov 13 at 8:56PM
Hi all,

I am trying to extract text from this PDF (on Mac):

http://research.microsoft.com/pubs/145347/bodypartrecognition.pdf

These are the results of my current efforts:

[pdfText appendString:[DQPL ExtractFilePageText:pdfFilePath :@"" :nPage+1 :0]];

-> crashes with unmapped memory exception deep in the Debenu code. Options 7 and 8 work, but return the text only partially, roughly half of the text is missing. 

[pdfText appendString:[DQPL ExtractFilePageText:pdfFilePath :@"" :nPage+1 :5]];

Returns only half of the text on the page. The last line of CSV file is only partially written to the string which makes me think it silently crashes, although the code apparently runs fine and outputs to the file. The same is true for options 3,4 and 6. 

Using the following code:

        int textblockID = [DQPL ExtractFilePageTextBlocks:pdfPath :@"" :1 :3];

        int count = [DQPL GetTextBlockCount:textblockID];        

        for(int i=0;i<count;i++){

            NSString *line = [DQPL GetTextBlockText:textblockID :i+1];

            NSLog(@"Page 1 block %d = %@", i+1, line);

        }

I can extracts only every alternate text block on the page, but manages to get to the end of the page. Therefore, again half is missing, but a different half than before! 

Any pointers on what I might be doing wrong would be greatly appreciated! The PDF renders fine, which makes me thing that the problem is the text extraction code.

On a related note: is it possible to get glyph information _before_ it is put into blocks. E.g. the CSV file on the individual glyph basis, without any processing? I think that would be very useful. 

Cheers, R.

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store