Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong positioning of the search marks #85

Open
kenneth488 opened this issue Jun 5, 2015 · 14 comments
Open

Wrong positioning of the search marks #85

kenneth488 opened this issue Jun 5, 2015 · 14 comments

Comments

@kenneth488
Copy link

Hi KurtCode

I have the library with different PDF files, and it does often place the search marks wrong. In my fork, there is a PDF file called amazon-dynamo-sosp2007.pdf. Searching for the string "re" will show you that the position of the marks a sometimes calculated wrong, since they are misplaced. The same goes for the string "in" and probably others.

Is this something you might be able to fix?

Have a great day

Regards,

Kenneth

@viezel
Copy link

viezel commented Jun 9, 2015

+1 could be nice to get sorted out.

@kenneth488
Copy link
Author

I have almost fixed the issue now, so the general solution works. Will commit and push today.

@kenneth488
Copy link
Author

I will commit it as soon as all the bugs are fixed! Are working on it atm! :)

@kenneth488
Copy link
Author

I will commit the fixes soon. I also implemented support for newline word searching, so we can mark search words spanning more than one line.

When I commit, you can fork it and implement your fixes.

@nattapon21
Copy link

.....

2015-06-12 16:18 GMT+07:00 TryMyBest [email protected]:

Ok. Will check your new version. Nice work guy! :)


Reply to this email directly or view it on GitHub
#85 (comment).

@kenneth488
Copy link
Author

The commit is up. Now remember that there might be more bugs. If so, post them. I am still working on making it a lot better.

@kenneth488
Copy link
Author

Yes just saw that. Though that is only in the test project. It does work when you give it the correct page size. The way Kitten sets up a page, is pretty weird. It works fine otherwise:
http://postimg.org/image/f5py9l2d7/
http://postimg.org/image/ksmb724vv/

I will see if I can fix it in Kitten.

@kenneth488
Copy link
Author

What you need to pass to the convertPDFRectToViewRect method is the frame of the userSpace PDF page aka. the visible pdf page you are viewing. Anything else will fail.

@timeflying
Copy link

timeflying commented Aug 1, 2016

Still mark on the wrong position~

http://www.takming.edu.tw/study/upload/filedownload150318163116.pdf

simulator screen shot aug 1 2016 3 47 00 pm

@timeflying
Copy link

timeflying commented Aug 1, 2016

I use the app preview which embedded in mac os . It works great on the same pdf.
screen shot 2016-08-01 at 3 52 49 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@viezel @timeflying @kenneth488 @nattapon21 and others