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

Links inside pdf crashes the app when tapped #85

Closed
raunak-many-ac opened this issue Jul 7, 2020 · 7 comments
Closed

Links inside pdf crashes the app when tapped #85

raunak-many-ac opened this issue Jul 7, 2020 · 7 comments

Comments

@raunak-many-ac
Copy link

raunak-many-ac commented Jul 7, 2020

I just put a link inside a pdf it works fine on desktop, but in my app these links just crashes the application with following errors:-

Screenshot_2020-07-07-09-31-07-419_com google android apps playconsole

Screenshot_2020-07-07-09-31-58-015_com google android apps playconsole

Sir its my humble request., please help because links are crucial part of documents...

@raunak-many-ac
Copy link
Author

I tried a lot, but don't know how to launch an intent from inside of a pdf in the app to a browser....

@sekharjha
Copy link

@endigo I also faced the same issue but never found a way to solve it ..would be helpful if this is fixed.

@endigo
Copy link
Owner

endigo commented Jul 11, 2020

@stefalda Did face the same issue? Can you give them some explanation?

@stefalda
Copy link
Contributor

Are you using complete URLsuch as https://www.google.com?
Can you provide me an example?

@stefalda
Copy link
Contributor

stefalda commented Jul 11, 2020

It depends on what you're trying to achieve.
If you want to open a link you have two options:

  1. implement the onLinkHandler just to be notified of the clicked link
  2. setting the preventLinkNavigation=true and implement your link logic inside the onLinkHandler method

In the second case you could handle custom urls embedded in the pdf or using something like the url_launcher package to open the link.

Can you post some of your code to take a look?
In the meantime I'm updating to latest version of Flutter and doing some test...

Thanks

@raunak-many-ac
Copy link
Author

raunak-many-ac commented Jul 11, 2020

@stefalda My very sincere thanks to you first.... here is an example link..... https://atcoder.jp/contests/dp/tasks/dp_a

It seems like i got what you said, i will try doing the same as you said in the last comment and will get back to you if i get stuck....

The code is is not too complex it simply displays a pdf... no link handling stuff... just open and show using PDFView.... now i realised that i need to handle things around

Thanks again...

@stefalda
Copy link
Contributor

stefalda commented Jul 11, 2020

@akatski316 I've made some tests with latest version and everything seems to work as described in the comment above...
let me know if it works for you too...

@endigo endigo closed this as completed Jul 29, 2020
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

4 participants