Client Side Resize
Client Side Resize
Hi.
Is there any way to resize the docuvieware control from the client side?
I tried this:
var dvw = document.getElementById('dvw1');
dvw.style.width = '1300px';
and that changed the size of the div, but the control seemed unaware of it and didn't re-center the image of the document.
Thanks,
ErikD
Is there any way to resize the docuvieware control from the client side?
I tried this:
var dvw = document.getElementById('dvw1');
dvw.style.width = '1300px';
and that changed the size of the div, but the control seemed unaware of it and didn't re-center the image of the document.
Thanks,
ErikD
Re: Client Side Resize
Any luck getting it to work as I also need the ability to set height and width client side...
Thanks
Thanks
Re: Client Side Resize
Hello there,
Please check the docuvieware demo, especially at the page standalone_viewer_demo.
You will see that the DocuVieware control is automatically resized. For such purpose, just embed it within a container (a div, a span or a form) and set the Width & Height values to "100%".
Please let me know if you need further information.
Cheers,
Loïc
Please check the docuvieware demo, especially at the page standalone_viewer_demo.
You will see that the DocuVieware control is automatically resized. For such purpose, just embed it within a container (a div, a span or a form) and set the Width & Height values to "100%".
Code: Select all
<cc1:DocuVieware ID="DocuVieware1" runat="server" Height="100%" Width="100%" SinglePageView="false" ForceScrollBars="False" AllowedExportFormats="*" MaxUploadSize="52428800" CollapsedSnapIn="True" EnableMouseModeButtons="False" />
Cheers,
Loïc
Re: Client Side Resize
Hello,
Tried your suggestion and it was a partial success...
The width of the viewer resizes correctly but the height does not adjust.
Here is the code used to test
Tried your suggestion and it was a partial success...
The width of the viewer resizes correctly but the height does not adjust.
Here is the code used to test
Code: Select all
<body style="overflow: hidden; margin: 0; height: 100%;">
<form id="form1" runat="server" style="width: 100%; height: 100%;">
<a href="javascript:void();" onclick="Test(); return false;">Test</a>
<br />
<div id="divViewer" style="width: 400px; height: 400px; border: 1px solid;">
<cc1:docuvieware id="DocuVieware1" runat="server" height="100%" width="100%" />
</div>
</form>
<script type="text/javascript">
function Test()
{
$("#divViewer").height('800px');
$("#divViewer").width('800px');
}
</script>
</body>
Re: Client Side Resize
Hi,
You need to resize the form, not the viewer.
Let me know if the problem persists.
Cheers,
Loïc
You need to resize the form, not the viewer.
Let me know if the problem persists.
Cheers,
Loïc
Re: Client Side Resize
So resize the form element vs the div element to properly resize the viewer...???Loïc wrote:Hi,
You need to resize the form, not the viewer.
Let me know if the problem persists.
Cheers,
Loïc
That seems very strange to me.
Thanks.
Re: Client Side Resize
Hello again,
Yes you are absolutely right. Please ignore my previous reply, there is definitively a bug in DocuVieware.
We will fix it for the next minor release that will be published this week.
Best regards,
Loïc
Yes you are absolutely right. Please ignore my previous reply, there is definitively a bug in DocuVieware.
We will fix it for the next minor release that will be published this week.
Best regards,
Loïc
Re: Client Side Resize
OK. This is actually not a bug as it is impossible to handle resize event of a non window control but a feature is clearly needed.
Into the next minor release you will have to use the new UpdateLayout() api.
Here an example based on your code:
Note for readers: calling UpdateLayout() is not required when the browser's window is re-sized.
I hope this will help!
If you have any comment please let me know.
Kind regards,
Loïc
Into the next minor release you will have to use the new UpdateLayout() api.
Here an example based on your code:
Code: Select all
<script type="text/javascript">
function Test() {
$("#divViewer").height('800px');
$("#divViewer").width('800px');
DocuViewareAPI.UpdateLayout("DocuVieware1");
}
</script>
I hope this will help!
If you have any comment please let me know.
Kind regards,
Loïc
Re: Client Side Resize
Awesome.
Looking forward to the release later this week.
Any ideas when it may be available?
Thanks
Looking forward to the release later this week.
Any ideas when it may be available?
Thanks
Re: Client Side Resize
It should be within a couple of days.
If you can't wait, we can offer a beta. Just open a ticket on our helpdesk to request it.
Cheers,
Loïc
If you can't wait, we can offer a beta. Just open a ticket on our helpdesk to request it.
Cheers,
Loïc
Who is online
Users browsing this forum: No registered users and 1 guest