Print Page | Close Window

Problems with SetTextExtractionArea

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3368
Printed Date: 25 Nov 24 at 8:09PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Problems with SetTextExtractionArea
Posted By: aantonio
Subject: Problems with SetTextExtractionArea
Date Posted: 13 Aug 16 at 6:56PM
I have installed the library with a test license, using Visual Studio for C++ and linking with static library.

If I try DPLGetPageTextA, DPLExtractFilePageTextA or DPLDAExtractPageTextA every thing works fine.

If I try to use DPLSetTextExtractionArea( 0, 0, DPLPageWidth(InstanceID), DPLPageHeight(InstanceID) before of DPLGetPageTextA I get a blank string.
If I try to use DPLDASetTextExtractionArea before DPLExtractFilePageTextA or DPLDAExtractPageTextA I get blank strings too.

Is it possible to be a problem with the test license or something similar?

Code Sample:
DPLLoadFromFileA(InstanceID, (char *)(const char *)FileName, NULL);
DPLSetMeasurementUnits(InstanceID, 1);
DPLSelectPage(InstanceID, 1);
DPLSetOrigin(InstanceID, 0);

// This line is the problem... if I remove it, the text is extracted
DPLSetTextExtractionArea(InstanceID, 0, 0, DPLPageWidth(InstanceID), DPLPageHeight(InstanceID) );

CString txt = DPLGetPageTextA(InstanceID, 8);

Thank you



Replies:
Posted By: Ingo
Date Posted: 13 Aug 16 at 8:09PM
Hi Antonio,

here's a sample from the official support pages:
http://www.debenu.com/kb/extract-text-from-a-defined-rectangular-area-on-a-page/
Your prob has nothing to do with the test license ;-)

Cheers and welcome here,
Ingo



-------------
Cheers,
Ingo



Posted By: aantonio
Date Posted: 13 Aug 16 at 10:12PM
Hello Ingo

You are right... I have rewritten my code and now it works fine, as described in documentation.

Is was my fault.

Thanks a lot



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk