--
You received this message because you are subscribed to a topic in the Google Groups "PDFTron WebViewer" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pdfnet-webviewer/pJ2FDATvLno/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pdfnet-webviewer+unsubscribe@googlegroups.com.
To post to this group, send email to pdfnet-webviewer@googlegroups.com.
Visit this group at https://groups.google.com/group/pdfnet-webviewer.
For more options, visit https://groups.google.com/d/optout.
decrypt = window.CoreControls.Encryption.decrypt;
decryptOptions = {
type: 'aes',
p: queryParams.getString('pass')
};
Hi Matt,Thanks for providing your recent reference.For the interim whilst I wait for additional lead on configuring encryption, I've been trying to instantiate WebViewer to no-avail. No error is visible in console and we see a loading animation modal.Will update you as I progress..RegardsMike
Hi Mike,Would you be able to send a screenshot of the what you see in the failed load of the mobile viewer?For encryption we don't put the document password as a query parameter because it would make it very obvious for someone looking at the URL what the password was, especially because often the mobile viewer is configured to redirect to a new window. For your app in a WebView this isn't such a big deal so you could add the password as a parameter in the URL and then make a small modification to loadDocument to use it.The modification would be in the loadDocument function in BaseReaderControl.js. Add the following lines just before the part retriever is chosen and instantiated:
decrypt = window.CoreControls.Encryption.decrypt;
decryptOptions = {
type: 'aes',
p: queryParams.getString('pass')
};Then as part of your URL you would add "&pass=mydocumentpassword".For loading a normal document in WebViewer I'm assuming you're trying to open one that isn't encrypted. It's hard to say what's going on without seeing the code so if you're able to send some sample code that might be helpful.Thanks,Matt ParizeauSoftware DeveloperPDFTron Systems Inc.
On Wednesday, December 14, 2016 at 5:08:25 PM UTC-8, Michael Lee wrote:
Hi Matt,Thanks for providing your recent reference.For the interim whilst I wait for additional lead on configuring encryption, I've been trying to instantiate WebViewer to no-avail. No error is visible in console and we see a loading animation modal.Will update you as I progress..RegardsMike
Awesome thanks Matt,I'm working through this now, taking our MobileReaderControl.html and pointing it to my loginlogic.nz server for the XOD.This url presents an initialised WebViewer but no content. Within the AngularJS environment, it does not initialise however I'm sure I can overcome that, screenshot below.Initial reaction is that no errors exist in the console.I've also looked for a debug flag I can switch.Q. Does a debug flag exist somewhere ?Best regardsMike
On Thu, Dec 15, 2016 at 2:36 PM, Matt Parizeau via PDFTron WebViewer <pdfnet-webviewer+APn2wQfzwjN3K1PXhwB2EpteOBUOrXzBt3Iu_yTiKOGMlKG@googlegroups.com> wrote:
Hi Mike,Would you be able to send a screenshot of the what you see in the failed load of the mobile viewer?For encryption we don't put the document password as a query parameter because it would make it very obvious for someone looking at the URL what the password was, especially because often the mobile viewer is configured to redirect to a new window. For your app in a WebView this isn't such a big deal so you could add the password as a parameter in the URL and then make a small modification to loadDocument to use it.The modification would be in the loadDocument function in BaseReaderControl.js. Add the following lines just before the part retriever is chosen and instantiated:
decrypt = window.CoreControls.Encryption.decrypt;
decryptOptions = {
type: 'aes',
p: queryParams.getString('pass')
};Then as part of your URL you would add "&pass=mydocumentpassword".For loading a normal document in WebViewer I'm assuming you're trying to open one that isn't encrypted. It's hard to say what's going on without seeing the code so if you're able to send some sample code that might be helpful.Thanks,Matt ParizeauSoftware DeveloperPDFTron Systems Inc.
On Wednesday, December 14, 2016 at 5:08:25 PM UTC-8, Michael Lee wrote:
Hi Matt,Thanks for providing your recent reference.For the interim whilst I wait for additional lead on configuring encryption, I've been trying to instantiate WebViewer to no-avail. No error is visible in console and we see a loading animation modal.Will update you as I progress..RegardsMike
You'll want to use a "#" instead of a "?" before the parameters otherwise you are effectively passing it no parameters. The reason it's using a hash is because when we implemented offline mode we wanted WebViewer to work with AppCache and AppCache considers different query parameters as different URLs which caused problems with caching. If you really need to you can change this behavior by passing false into getQueryStringMap inside ControlUtils.js but by default WebViewer is expecting #.Matt ParizeauSoftware DeveloperPDFTron Systems Inc.
On Wednesday, December 14, 2016 at 5:44:56 PM UTC-8, Michael Lee wrote:
Awesome thanks Matt,I'm working through this now, taking our MobileReaderControl.html and pointing it to my loginlogic.nz server for the XOD.This url presents an initialised WebViewer but no content. Within the AngularJS environment, it does not initialise however I'm sure I can overcome that, screenshot below.Initial reaction is that no errors exist in the console.I've also looked for a debug flag I can switch.Q. Does a debug flag exist somewhere ?Best regardsMike