Free Support Forum - groupdocs.com

Incorrect Excel preview - missing resources


#1

Hi,


when I try to view an Excel document I can see only blank places for the images - images are not loaded - see the attached screenshot. It’s the same with v2.12 and v2.13.

All requests are returned with 200 status but empty:

- - [13/Nov/2015:08:15:55 -0500] “GET /cara/viewers/internal/GetHtmlResources?guid=090186a180142262-excel12book&filePath=textBox_33319_1.png HTTP/1.1” 200 5
93.105.178.60 - - [13/Nov/2015:08:15:55 -0500] “GET /cara/viewers/internal/GetHtmlResources?guid=090186a180142262-excel12book&filePath=textBox_33319_3.png HTTP/1.1” 200 5
93.105.178.60 - - [13/Nov/2015:08:15:55 -0500] “GET /cara/viewers/internal/GetHtmlResources?guid=090186a180142262-excel12book&filePath=textBox_33319_2.png HTTP/1.1” 200 5
93.105.178.60 - - [13/Nov/2015:08:15:55 -0500] “GET /cara/viewers/internal/GetHtmlResources?guid=090186a180142262-excel12book&filePath=textBox_33319_4.png HTTP/1.1” 200 5
93.105.178.60 - - [13/Nov/2015:08:15:55 -0500] “GET /cara/viewers/internal/GetHtmlResources?guid=090186a180142262-excel12book&filePath=textBox_33319_5.png HTTP/1.1” 200 5
93.105.178.60 - - [13/Nov/2015:08:15:55 -0500] “GET /cara/viewers/internal/GetHtmlResources?guid=090186a180142262-excel12book&filePath=cellsDrawing_33319_19.png HTTP/1.1” 200 5
93.105.178.60 - - [13/Nov/2015:08:15:55 -0500] “GET /cara/viewers/internal/GetHtmlResources?guid=090186a180142262-excel12book&filePath=textBox_33319_18.png HTTP/1.1” 200 5
93.105.178.60 - - [13/Nov/2015:08:15:55 -0500] “GET /cara/viewers/internal/GetHtmlResources?guid=090186a180142262-excel12book&filePath=textBox_33319_17.png HTTP/1.1” 200 5
93.105.178.60 - - [13/Nov/2015:08:15:55 -0500] “GET /cara/viewers/internal/GetHtmlResources?guid=090186a180142262-excel12book&filePath=textBox_33319_6.png HTTP/1.1” 200 5
93.105.178.60 - - [13/Nov/2015:08:15:56 -0500] “GET /cara/viewers/internal/GetHtmlResources?guid=090186a180142262-excel12book&filePath=textBox_33319_7.png HTTP/1.1” 200 5
93.105.178.60 - - [13/Nov/2015:08:15:56 -0500] “GET /cara/viewers/internal/GetHtmlResources?guid=090186a180142262-excel12book&filePath=textBox_33319_8.png HTTP/1.1” 200 5
93.105.178.60 - - [13/Nov/2015:08:15:56 -0500] “GET /cara/viewers/internal/GetHtmlResources?guid=090186a180142262-excel12book&filePath=cellsDrawing_33319_21.png HTTP/1.1” 200 5
93.105.178.60 - - [13/Nov/2015:08:15:56 -0500] “GET /cara/viewers/internal/GetHtmlResources?guid=090186a180142262-excel12book&filePath=textBox_33319_9.png HTTP/1.1” 200 5
93.105.178.60 - - [13/Nov/2015:08:15:56 -0500] “GET /cara/viewers/internal/GetHtmlResources?guid=090186a180142262-excel12book&filePath=textBox_33319_20.png HTTP/1.1” 200 5
93.105.178.60 - - [13/Nov/2015:08:15:56 -0500] “GET /cara/viewers/internal/GetHtmlResources?guid=090186a180142262-excel12book&filePath=textBox_33319_10.png HTTP/1.1” 200 5
93.105.178.60 - - [13/Nov/2015:08:15:56 -0500] “GET /cara/viewers/internal/GetHtmlResources?guid=090186a180142262-excel12book&filePath=textBox_33319_11.png HTTP/1.1” 200 5
93.105.178.60 - - [13/Nov/2015:08:15:56 -0500] “GET /cara/viewers/internal/GetHtmlResources?guid=090186a180142262-excel12book&filePath=textBox_33319_13.png HTTP/1.1” 200 5
93.105.178.60 - - [13/Nov/2015:08:15:56 -0500] “GET /cara/viewers/internal/GetHtmlResources?guid=090186a180142262-excel12book&filePath=textBox_33319_12.png HTTP/1.1” 200 5
93.105.178.60 - - [13/Nov/2015:08:15:56 -0500] “GET /cara/viewers/internal/GetHtmlResources?guid=090186a180142262-excel12book&filePath=textBox_33319_14.png HTTP/1.1” 200 5
93.105.178.60 - - [13/Nov/2015:08:15:56 -0500] “GET /cara/viewers/internal/GetHtmlResources?guid=090186a180142262-excel12book&filePath=textBox_33319_15.png HTTP/1.1” 200 5
93.105.178.60 - - [13/Nov/2015:08:15:56 -0500] “GET /cara/viewers/internal/GetHtmlResources?guid=090186a180142262-excel12book&filePath=textBox_33319_16.png HTTP/1.1” 200 5
93.105.178.60 - - [13/Nov/2015:08:15:56 -0500] “GET /cara/viewers/internal/GetHtmlResources?guid=090186a180142262-excel12book&filePath=textBox_33319_0.png HTTP/1.1” 200 5



This is our servlet implementation:

public class GetHtmlResourcesHandlerServlet extends ViewerServlet {


@Override

public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

try {

writeOutput(

viewerHandler(request).getHtmlResourcesHandler(request.getParameter("filePath"), request.getParameter("guid"),

StringUtils.toInt(request.getParameter("page")), request.getParameter("resourceName"), response), response);

} catch (final Exception ex) {

logger.error("", ex);

}

}


}


Can you tell us what is wrong?
Thanks,
Mariusz

#2

I can see request to GetHtmlResources?guid=090186a180168335-excel12book&filePath=textBox_33319_1.png.


Then in ViewerHandler.getHtmlResourcesHandler I can see the following code:

File localFile = new File(filePath);

if (!localFile.exists()) {

Since filePath is just a file name not a full path how that suppose to work?

My cache folder is configured to the c:\TEMP\cara\cache.

That file exists in c:\TEMP\cara\cache\090186a180168335-excel12book\html\090186a180168335-excel12book_files\

So it doesn't work?

Regards,
Mariusz


#3
Hello Mariusz,

Thank you for your request .

Could you please try to check this code and put it to the "try" section:

String guid = request.getParameter("guid");
String page = request.getParameter("page");
String resourceName = request.getParameter("resourceName");
writeOutput(
viewerHandler.getHtmlResourcesHandler(
request.getParameter("filePath"),
guid,
page == null ? null : Integer.valueOf(page),
resourceName,
response),
response);

If this code will not help you, then please share with us your file example and we will investigate it .

-------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+


#4

Thanks! That helped! But I can see another issue. The bottom of the preview windows looks strange, it’s incorrectly positioned. I’m attaching my custom viewer source. Can you advise what’s wrong?


Thank you,
Mariusz

#5
Hello again,

Try to add such code to your "style" section:

.tab_control_wrapper{
position: fixed !important;
}

This code should help you .

-----------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+


#6

Now I cannot see the sheet tabs at all.


#7

It works fine for small files, if the preview is bigger than the screen it doesn’t work correctly -see screenshot.


#8
Hello ,

The issue reason is that you use custom .css styles which covers each other . Basically you can configure the styles in the browser console and then add configured styles to .html of the web page. Also you can share with us your bigger file that we can reproduce the issue on our side and help you to resolve it.

-------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+