Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about Android development and PDF

Unexpected carriage returns and linebreaks from Page

More
IP: 192.168.0.71 8 years 3 months ago #13638 by ziixid
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!
More
IP: 192.168.0.71 8 years 3 months ago #13639 by nermeen
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.
More
IP: 192.168.0.71 8 years 3 months ago #13647 by nermeen
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.
More
IP: 192.168.0.71 8 years 3 months ago #13659 by ziixid
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!
More
IP: 192.168.0.71 8 years 3 months ago #13662 by nermeen
Yes, the PDFLayoutView's method eventually calls the following method:
Code:
FindOpen( String str, boolean match_case, boolean whole_word, boolean skip_blank )
More
IP: 192.168.0.71 8 years 3 months ago #13663 by ziixid
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).
Time to create page: 0.552 seconds
Powered by Kunena Forum