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

Viewer not refreshed #5

Open
ClassOnLive opened this issue Mar 3, 2016 · 2 comments
Open

Viewer not refreshed #5

ClassOnLive opened this issue Mar 3, 2016 · 2 comments

Comments

@ClassOnLive
Copy link

Hi,
First of all thanks for your contribution.
I have an issue:
In a web page after selecting a pdf with a button, the pdf renders ok, but then If I try to change the file selecting another pdf file, the viewer shows the prevous pdf in its current page. It seems that the viewer is caching, because in the second selection the "loaded" event is not thrown. Any ideas?
Thanksin advance

@loicminghetti
Copy link
Owner

Hi,
You're right, you can't load another PDF once you have already initialized the viewer. I will try to fix this in a future release, but meanwhile, you can easily force the viewer to reinitialize by calling
$("#myPDF").removeData("TouchPDF");
before opening the second PDF.
Let me know if that fixed your problem.
Cheers

@ClassOnLive
Copy link
Author

Hi,
I did a workaround. I removed the div #myPDF and recreate again before
calling the function .pdf.
Thanks for your response.

Sergio Puertas
CEO/CTO en ClassOnLive
http://t.sidekickopen42.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs8pTv1sVRs3fx3LyGy-W8p-VB856dT_df4sR6z-02?t=http%3A%2F%2Fwww.classonlive.com%2F&si=5703881506422784&pi=4d604a47-024c-4592-f245-86565c3291bd
+34 620 60 20 85
http://t.sidekickopen42.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs8pTv1sVRs3fx3LyGy-W8p-VB856dT_df4sR6z-02?t=https%3A%2F%2Fwww.classonlive.com%2F&si=5703881506422784&pi=4d604a47-024c-4592-f245-86565c3291bd
https://www.facebook.com/classonlive?ref=hl
http://t.sidekickopen42.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs8pTv1sVRs3fx3LyGy-W8p-VB856dT_df4sR6z-02?t=https%3A%2F%2Ftwitter.com%2Fclassonlive&si=5703881506422784&pi=4d604a47-024c-4592-f245-86565c3291bd

http://t.sidekickopen42.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs8pTv1sVRs3fx3LyGy-W8p-VB856dT_df4sR6z-02?t=https%3A%2F%2Fwww.linkedin.com%2Fcompany%2Fclassonlive&si=5703881506422784&pi=4d604a47-024c-4592-f245-86565c3291bd

http://t.sidekickopen42.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs8pTv1sVRs3fx3LyGy-W8p-VB856dT_df4sR6z-02?t=https%3A%2F%2Fplus.google.com%2F%2BClassonliveES&si=5703881506422784&pi=4d604a47-024c-4592-f245-86565c3291bd

2016-03-03 17:26 GMT+01:00 loicminghetti [email protected]:

Hi,
You're right, you can't load another PDF once you have already initialized
the viewer. I will try to fix this in a future release, but meanwhile, you
can easily force the viewer to reinitialize by calling
$("#myPDF").removeData("TouchPDF");
before opening the second PDF.
Let me know if that fixed your problem.
Cheers


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

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

2 participants