PdfiumAndroid icon indicating copy to clipboard operation
PdfiumAndroid copied to clipboard

Expose a few functions from fpdf_text.h for getting text on a page.

Open billmoyers opened this issue 8 years ago • 9 comments

Hi, this exposes some of the FPDFText_* functions which are useful for getting text. Thanks.

billmoyers avatar Dec 11 '17 15:12 billmoyers

What is the purpose of nativeBitmapFillRect() function? You can fill bitmap with color using Android API

barteksc avatar Dec 15 '17 21:12 barteksc

My impression was that FPDFBitmap_FillRect would fill in between the text and the background layer which I believe would be difficult to do after the bitmap has been rendered by FPDF. Maybe I missed something?

billmoyers avatar Dec 15 '17 22:12 billmoyers

There are no layers, this just a bitmap. FillRect will fill given region with given color

barteksc avatar Dec 15 '17 22:12 barteksc

I just realized that I didn't mean to include the FillRect in the pull request anyway because I hadn't really tested it. I removed the FillRect commit from this PR. The other commit was tested. How does that one look?

billmoyers avatar Dec 15 '17 23:12 billmoyers

Thank you for your work, I will review commit source and add it to next release

barteksc avatar Dec 15 '17 23:12 barteksc

@johngray1965 is right, we don't need the extra class. I removed it for RectF and pushed the commit.

billmoyers avatar Dec 18 '17 14:12 billmoyers

Is this feature still in the Works? We would like to use this with Pdfium. Thanks.

envolva avatar Jul 04 '18 16:07 envolva

I've been using this branch, I'd love to see it get merged.

johngray1965 avatar Jul 05 '18 10:07 johngray1965

  1. Is it needed to clear mNativeTextPagesPtr and call nativeCloseTextPages for each of them when disposing?

  2. And I wonder why openTextPage calls openPage also. Are textPages different from usual pages?(why does it load usual pages too?)

  3. What does 'length' mean in textPageGetBoundedText? How long do you recommend for me?

oceanwaves90 avatar Apr 03 '19 02:04 oceanwaves90