Page cannot be found

Hello Team,

I am testing Viewer plugin with website that is installed on my computer. When I access this website from another computer in company network, viewer is not displaying the document (only thumbnails with document pages are visible).
Please see the attached image with error description.
Chrome console is displaying request:
http://localhost/tttt_viewer/document-viewer/GetResourceForHtml?documentPath=testdoc.pdf&relativeToOriginal=False&resourcePath=1_0.svg

Thank you in advance for your help!

Hello Deric,


We are sorry to hear that you have such issue. From this error we can assume that you use the HTML rendering mode. To resolve the issue please delete the “Temp” folder from the root storage of the documents for view (folder which you set in the Viewer initialization method) and then try to access the web site from the network by using the correct (network) URL.

Also please note that since you share the web site to the network you should use the same network URL for access the web site even from your computer (on which the web site is hosted)

Thank you.

Hi Pavel,



That was it! Deleting cache and accessing the site from same url was the solution.



Can you tell me what might be the problem with loading multiple pages that happens when you zoom out? First two pages were loaded fine, but the next two don’t show up and I don’t see an error.

pavelteplitsky:
Hello Deric,

We are sorry to hear that you have such issue. From this error we can assume that you use the HTML rendering mode. To resolve the issue please delete the "Temp" folder from the root storage of the documents for view (folder which you set in the Viewer initialization method) and then try to access the web site from the network by using the correct (network) URL.

Also please note that since you share the web site to the network you should use the same network URL for access the web site even from your computer (on which the web site is hosted)

Thank you.


Hello,

Do you have any new information about the issue described in the first post? Deleting temp files will affect performance and someone might accidentally open document from localhost instead from website url (issue would then be detected only by another user that tries to access the document).

Thank you!

Hello Deric,


Glad to hear that the first issue is resolved. Could you please share with us the Viewer widget code that you use.

Thank you.

Hello Deric,

Thank you for the question. Unfortunately there is no other way to resolve such issue because in HTML rendering mode Viewer generates HTML and CSS representation of the document and all images which you have in the document are saved as images and included in to the document via html code:
Since that if you will open document from localhost the URL for the images will be: http://localhost/image and then when open the document from correct URL the images will be inaccessible.
The only way to prevent such issue is to configure redirecting for the web site in the IIS - in case that somebody open web site via localhost it will be redirected to the proper URL.
Best regards.

Hi Pavel,

Sure, here it is:

<%= Viewer.CreateScriptLoadBlock().LoadJquery(false).LoadJqueryUi(false).UseHttpHandlers(false) %>

</head>

<body>

<div>

<div id="test" style="margin-bottom:20px"></div>

<%= Html.ViewerClientCode()

.TargetElementSelector("#test")

.FilePath("testdoc.pdf")

.EnableRightClickMenu(true)

.ShowThumbnails(true)

.OpenThumbnails(true)

.ZoomToFitWidth(true)

.Width(1200)

.Height(900)

.DownloadPdfFileIfPossible(false)

.PreloadPagesCount(1)

.UseHtmlBasedEngine(true)

.ShowDownload(true)

//.ShowPrint(false)

.SupportTextSelection(true)

.Watermark("test watermark").ShowFolderBrowser(false)%>

</div>

</body>

</html>

Global.asax.cs:

protected void Application_Start()

{

XmlConfigurator.Configure();

Groupdocs.Web.UI.Viewer.InitRoutes();

Groupdocs.Web.UI.Viewer.SetLicensePath("C:/testDocuments/licence/GroupDocs.Viewer.for.NET.lic");

Groupdocs.Web.UI.Viewer.SetRootStoragePath("C:/testDocuments");

Viewer.EnableFileListRequestHandling(true);

AreaRegistration.RegisterAllAreas();

RegisterRoutes(RouteTable.Routes);

}

Thank you!

Hi Deric,


We have checked your code and all works fine for us. Since that could you please share with us which Viewer Layout you use (Double page flip, two pages in row etc.) and the document that you use, could be that this issue is document related.

Thank you.

Hi Pavel,


Please find the attached ziped document. Layout seems to be two pages in row (image in first post). I clicked on Zoom Out button a couple of times - that is when the layout changed to two pages in a row, and the loading wouldn’t finish.

Thank you!

Hello,


Thank you for the examples. I will investigate them and come back to you with the updates.

Thank you.

Hello,


I have checked your documents and all works well. I see that you use your own jQueary and jQuery UI, could you try with our (build in) jQueary libraries.

The best way to resolve the issue is to share with us example of your project , if possible.

Thank you.
Hi Pavel,

I have done as you suggested, unfortunately it is not the solution. I think that if I zoom out enough so that two pages per row are shown and then scroll too fast and don't wait for each page to render, then something happens that breaks the loading. It is not a critical issue, but definitely something you can look into for future releases.

Thank you!

Hello Deric,


Thank you for the notification. Yes, sure we will add such issue to our road map for the brand new Viewer library.

Thank you.