RadaeePDF.com :: Topic: Identify a searchable PDF (1/2)
Welcome, Guest
Username: Password: Remember me

Signin/Signup with:

Submit your requests and polls about new features
  • Page:
  • 1
  • 2

TOPIC: Identify a searchable PDF

Identify a searchable PDF 2 years 6 months ago #8567

How to identify whether a PDF is searchable or not ?
Kindly provide the API

Searchable PDF is essentially a PDF image file. Unlike static image formats such as TIFF, JPEG and BMP, every PDA document has the ability to contain several layers of information i.e. image layer and text layer. The image layer carries information including the actual image, resolution, compression method, color depth, etc. Similarly, the text layer includes the actual ASCII text and an identification of the text's location on the page. In simple terms the Searchable PDF's text portions of the scanned document gets stored in a text layer, allowing the user to easily search for and locate any keyword within the scanned document.
Last Edit: 2 years 6 months ago by arcmobile.div.
The administrator has disabled public write access.

Identify a searchable PDF 2 years 6 months ago #8568

Any update ?
The administrator has disabled public write access.

Identify a searchable PDF 2 years 6 months ago #8573

Kindly update
Last Edit: 2 years 6 months ago by arcmobile.div.
The administrator has disabled public write access.

Identify a searchable PDF 2 years 6 months ago #8631

  • support
  • support's Avatar
  • OFFLINE
  • Administrator
  • Posts: 497
  • Thank you received: 40
  • Karma: 6
Dear user, we evaluated that actually this kind of API isn't interesting for our user base.
The request has been market and put in our requests' list with a low priority.

It's simply reproducible from your side extracting page text, looking for non empty text string.

Note: I invite you not to add new empty post to your thread.
Even if your aim is to push us providing you an answer, you're getting the opposite result: the thread seems containing replies and disappear from "thread without answer" list and it could happen we miss the request.
Last Edit: 2 years 6 months ago by support.
The administrator has disabled public write access.

Identify a searchable PDF 2 years 6 months ago #8633

  • Davide
  • Davide's Avatar
  • OFFLINE
  • Moderator
  • Posts: 678
  • Thank you received: 47
  • Karma: 14
Hi,
to extract text from a pdf you can use:
ObjsStart();
that gets text objects to memory and then:
ObjsGetString(int from, int to);
that gets string from range.

For more info check this: http://www.radaeepdf.com/documentation/javadocs/com/radaee/pdf/Page.html#ObjsGetString(int, int)
Last Edit: 2 years 6 months ago by Davide.
The administrator has disabled public write access.

Identify a searchable PDF 2 years 6 months ago #8680

Using the following code to determine whether the PDF is searchable or not.
I call the method after the document is loaded but with a searchable PDF also , the String text is returning a null value.

private boolean checkSearchablePDF() {
boolean isSearchablePDF = false;
if (mDoc != null) {
int totalPageCount = mDoc.GetPageCount();
for (int pageCount = 0; pageCount < totalPageCount; pageCount++) {
Page page = mDoc.GetPage(pageCount + 1);
page.ObjsStart();
String text = page.ObjsGetString(0, page.ObjsGetCharCount() - 1);
if (text != null && text.trim().length() > 0) {
isSearchablePDF = true;
break;
}
}
}
return isSearchablePDF;
}


Kindly provide your inputs.
Last Edit: 2 years 6 months ago by arcmobile.div.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Powered by Kunena Forum