Problem with PDF Viewer

0
0

I think a recent chrome update may have caused a problem w/ the PDFViewer.

I rolled my own reporting capability where I generate my reports as PDFs in memory and stream them to a PDFViewer.  This has worked great, and continues to work – the first time the report is displayed.  If the content of the report changes (i.e. data has changed) and the user clicks the button to refresh the report – it doesn’t refresh.

I have the PDFViewer set to “Mozilla” as that seems to offer the best user experience for my app. Refreshing the report used to work in Chrome, but no longer does.  HOWEVER it still works just fine if I run it in Firefox. So I think Chrome may have changed, somehow causing this problem.

Also – if I refresh the browser – it will show the updated content.

I made a small app that loads two different PDF files on demand (as files, not streams – but that doesn’t seem to matter), and is attached.  You can click the button to show PDF 1, but then clicking Show PDF 2 – it won’t refresh the content (at least when using Chrome).

I am using latest Chrome – Version 67.0.3396.87 (Official Build) (64-bit)

In trying all the settings:

“Mozilla” – displays no problem initially, but no longer refreshes properly in Chrome, but does refresh properly in Firefox.

“Google” – displays an odd “No preview available” notice in chrome and firefox (see setting-google.png).  Haven’t seen that before.

“Auto” – actually works as expected – at least on my browsers, but has a “postback.wx” that I don’t know how to change displayed (see setting-auto.png)

 

Is there some internal method that can force the “Mozilla” version refresh on demand that I could call somehow? If so what is the syntax for that?

pdfViewer.update, .refresh or Application.Refresh have no effect on the problem.

Any insight or a way to deal with this?  Thanks in advance…

 

 

 

  • You must to post comments
0
0
  • Looks like chrome is loading the content but it doesn’t update the screen (shows the loading in the status bar). Looks like the only solution is to replace the element and we have to change this in Wisej.
  • To remove postback.wx you have to serve the pdf file as a URL, the viewers will use the name of the file. You need to enable CORS with IIS in web.config.
  • When using google viewer in debug you see the “No Preview Available” because google loads the document on their servers and they cannot access localhost.

 

  • You must to post comments
0
0

Add the attached file as an embedded resource, it will replace wisej.web.PdfViewer.

  • You must to post comments
0
0

Thank you Luca – I will give this a  try…

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.