Unexpected carriage returns and linebreaks from Page - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about Android development and PDF
  • Page:
  • 1
  • 2

TOPIC: Unexpected carriage returns and linebreaks from Page

Unexpected carriage returns and linebreaks from Page 7 months 3 weeks ago #13638

  • ziixid
  • ziixid's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
I'm currently working on an app to search through PDF files. Using Page.FindOpen does wonders, but I found it was unreliable when searching phrases, or strings that would span more than one line for some PDF files. For example, searching "Hello world" in the following example:

"Make sure to print Hello world!"

Would be able to highlight "Hello world", but in the next example:

Most professors use the program Hello
world to introduce programming


"Hello world" would not get highlighted. Upon looking at the raw strings of the Page using Page.ObsGetString, I found that some documents had linebreaks and carriage returns (\r\n for example) at the end of each line. This makes searching long strings that span multiple lines with Page.FindOpen unreliable.

Is this an existing issue RadaeePdf is aware of? Will this be fixed/updated? After some light research I found some similar forum topics:
www.radaeepdf.com/forum/Android-developm...nts-extra-characters
www.radaeepdf.com/forum/ios-dev/3384-page-selection-index

If there will not be a fix to these unexpected line breaks and carriage returns, is there existing documentation on how RadaeePdf generates the strings for the pdf? This will help immensely when working with Page.FindOpen to support long search strings and multi line searching.

Thanks!

Please Log in or Create an account to join the conversation.

Unexpected carriage returns and linebreaks from Page 7 months 3 weeks ago #13639

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
We currently working on an update that will introduce the ability to multi-line searching, it will be released soon.

We will update you as soon as this version is released.
The following user(s) said Thank You: ziixid

Please Log in or Create an account to join the conversation.

Unexpected carriage returns and linebreaks from Page 7 months 2 weeks ago #13647

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
We've published a beta version that presents the multiline search feature.

Please follow Enable multiline searching to know how to activate this mode.

Waiting for your feedback.

Please Log in or Create an account to join the conversation.

Unexpected carriage returns and linebreaks from Page 7 months 2 weeks ago #13659

  • ziixid
  • ziixid's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Just an initial comment. Enabling multiline searching is done through the reader package (PDFLayoutView) rather than the pdf package (using Page.FindOpen). Is there no other way to enable multiline searching using the pdf package?

Regardless, will have a more thorough look at the code. Thanks!

Please Log in or Create an account to join the conversation.

Unexpected carriage returns and linebreaks from Page 7 months 2 weeks ago #13662

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
Yes, the PDFLayoutView's method eventually calls the following method:
FindOpen( String str, boolean match_case, boolean whole_word, boolean skip_blank )

Please Log in or Create an account to join the conversation.

Unexpected carriage returns and linebreaks from Page 7 months 2 weeks ago #13663

  • ziixid
  • ziixid's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
So it should be fine to call Page.FindOpen directly then? For example, when Page.FindOpen is called in the www.radaeepdf.com/support/knowledge-base?view=kb&kbartid=123 example, we pass an additional boolean argument (for example, true to search multiline).

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Powered by Kunena Forum