Resize of the viewer

Hello Alexis,

Just in the form of the intermediate solution, please try to completely remove from the web-page the JavaScript block, that was provided from me and is responsible for justifying the width of the page. After that please try to reproduce an issue once again and please report a result.

Thanks.

Hello, thanks for your answer.


I have removed completely the JavaScript block, but without success.

See attach, thank you.

Hello Alexis,


We are sorry to hear that the issue doesn’t resolved yet. We have reviewed again your code and found out next:

1. You use “Viewer.ClientCode()” inside your “visordiv” div - please close your div and put Viewer code after “visordiv” div like shown on this screenshot .
2. We have fixe the JavaScript code which should change size of the viewer on resize window event. Please add this JavaScript code after Viewer widget code:


Please notify us with the results.

Thanks for your recomendations.


The height is almost ok.

Look at this screencast: Dropbox - Error - Simplify your life, when resize is fired, the horizontal scrollbar disappears, and in the vertical scrollbar disappears the down arrow.

Thanks.

Hello Alexis,


We glad to hear that we on the right way. We have made one more update for the JavaScript code which should fix the issue with scrollbars. Please update this code line $(“#docViewer1”).height(new_height); with this one $(“#docViewer1”).css({ “height”: ‘’, “width”: new_width}); and all should be ok 2014-12-19_1615 .

Perfect, now it’s working great.


Thank you!

In the new dll version 2.7.0 (HTML mode) the resize is not working.


Javascript code:

Hello Alexis,

We are sorry to hear that you have this issue. Unfortunately we cannot reproduce the described issue. We are using the same resizing script, GroupDocs.Viewer ver. 2.7.0.0 and one of your documents (0_INFORMACION FINANCIERA_20141217_171518.pdf). We also checked other documents with both image-based and HTML-based modes. Resizing is working well.

Can you please describe how exactly the resizing is not working in your case? What is happening when you try to resize the browser window? This issue occurs with some specific documents or with all?

Thanks and waiting for your reply.

Can you please describe how exactly the resizing is not working in your case? What is happening when you try to resize the browser window? This issue occurs with some specific documents or with all?


Here is a screencast: Dropbox - File Deleted - Simplify your life

Occurs with all documents (this happened exactly some time ago)

Hello,

Thank you for the screencast. From the screencast we can assume that the JavaScript methods " $(document).ready" and "$(window).resize" doesn't fire up. Could you please check your browser console for error message.

Thank you.

The resize of the height is not working (widht is working ok).


Browser console attached (no errors related that functions).

Hello Alexis,

Thank you for the screencast and for the explanation. Yes, I remember, that very similar (or even identical) problem was in the past, but it was suddenly solved. Now I see the same symptoms.

Unfortunately I was not able to reproduce it, despite the fact that I have the source code of your page (you gave it to me some time ago) and source code of the JavaScript (which was written by me). In order to narrow a set of possible reasons, please disable (comment-in or remove) a JS block, which I gave you before (a “Check” method and “$(document).ready” with “$(window).resize” functions). This JS code performs a dynamic resize; when you will disable it, please see, will there be an empty space in the bottom of the page, with HTML-based mode enabled? Please let us know the result - this will help us to understand, what is the reason of the issue.

Thanks and waiting for your response.

Hello Denis,


I have commented the lines of JS code. I have attached you the screenshot with the result. Exists the empty space at the bottom and at the right of the viewer. The difference is that in this case, the backround is totally white, and with te JS code enabled, the background is gray.

Thank you.

Hello Alexis,

Thanks for the explanation. This issue is a quite interesting, and we still cannot reproduce it. If we understood you correctly, this error has the next “features”:
1. It occurs only when using HTML-based rendering mode.
2. It occurs regardless of specific document and its type.
3. Dynamic width is working well, the problem is especially with height.
If these statements are wrong, please correct us.

We cannot be sure, but want to ask you to check and do several things:
1. You are using a Google Chrome. Can you check this issue using other web-browsers? How it looks like on other browser? Are there any differences?
2. Maybe this issue is caused by some conflict between CSS of the GroupDocs.Viewer and CSS from the page. Please, create a test distinct web-page (ASPX page) on which there is nothing but the GroupDocs.Viewer widget. And then try to open the same document on that page and tell us the result.
3. Maybe, we can reproduce the issue on our side, if you will provide us a full final HTML markup of the page. From this screencast we see, that GroupDocs.Viewer is placed on a specific web-page. In the web-browser make a right click on the page → View source code, and send us all source code that is present there. If it is a CSS conflict, there is a chance for us to reproduce it.

Thanks and waiting for your reply.

Hello Denis,


The statements that you have described are ok.

About your questions:
  1. It happends in Chrome, Firefox and Internet Explorer.
  2. I will try to reproduce in that scenario.
  3. I send you via email the source code.
Thank you.

Hello Alexis, thanks for answering. We have received your email with attached 3 MiB text file, but, unfortunately, due to our corporate security settings, we cannot obtain this script. Can you please re-upload it to the Dropbox, Google Drive, OneDrive or any other web sharing resource, and then post the link for downloading here or send it via email?

Thanks.

Hi,

I’ve been following this thread and would like to confirm that I can reproduce the same or a very similar problem.

I’ve found that setting ‘showOnePageInRow: true’ in the viewer options causes the horizontal behavior I would like - it automatically re-centers and stays at the same zoom level - but the vertical behavior is not correct. This is most noticable when maximising a smaller window - I cna see that my container div is resized using the element inspector, but the div with id=“docViewer1” stays the same size.

I’ve attached a sample html page showing the problem. Note this is just plain html, no ASP involved. I am using Lodash to debounce the resize event. The problem occurs with any document including the sample ‘candy.pdf’, and in Chrome 40, FireFox 35 & IE 11

Hope this helps track down the problem

Phil