Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Wed Feb 15, 2017 9:39 am

Hi,

I'm trying to follow this article :
https://www.e-iceblue.com/Tutorials/Spire.DocViewer/Spire.DocViewer-Program-Guide/How-to-Zoom-Word-Document-using-Spire.DocViewer.html

But I can't see the ZoomMode.

I'm using assemblies :
C:\Program Files (x86)\e-iceblue\Spire.Office\Bin\NET4.0\Spire.DocViewer.Forms.dll
Version : 2.3.10.4040 / v4.0.30319

C:\Program Files (x86)\e-iceblue\Spire.Office\Bin\NET4.0\Spire.Doc.dll
Version : 5.8.51.4040 / v4.0.30319

Another problem :
---------------------
- The Add to Visual Studio Toolbox don't seems to work with VS 2017 RC.
- Maybe a little screenshot with GUI update to article for latest version to match latest Windows & VS releases ? (https://www.e-iceblue.com/Tutorials/Spire.Doc/Demos/Quick-guide/How-to-add-Controls-to-Toolbox.html)

Thanks,

Vincent

nolme
 
Posts: 79
Joined: Fri Apr 24, 2015 3:56 pm

Wed Feb 15, 2017 10:09 am

Dear Vincent,

Thanks for your inquiry.
For the first question, did you add the namespace(using Spire.DocViewer.Forms;) in your project ?
For the second question, sorry that at present we don't have VS 2017 RC, we need to install it and then investigate. Once there is any progress, we will inform you soon.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Wed Feb 15, 2017 10:39 am

1) Yes I have. Here's the class content :
DocViewer.PNG


2) You can download for free the RC with offline install from here
https://docs.microsoft.com/en-us/visualstudio/install/create-an-offline-installation-of-visual-studio

nolme
 
Posts: 79
Joined: Fri Apr 24, 2015 3:56 pm

Thu Feb 16, 2017 3:06 am

Dear nolme,

Thanks for the information.
1) I have checked the same version as yours, but I can see the ZoomMode, please check the attachement. Could you please provide us a screenshot for showing this issue ?
2)Thanks for the link, we will download the VS 2017 RC and then install it. And will inform you once there is any progress.

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Thu Feb 16, 2017 9:34 am

Here's a short project with the same problem here.

Can you reproduce it ?

nolme
 
Posts: 79
Joined: Fri Apr 24, 2015 3:56 pm

Thu Feb 16, 2017 10:16 am

Dear nolme,

Thanks for your project.
I found that you use docViewer, sorry that it doesn't have ZoomMode, and the ZoomMode is only in docDocumentViewer.
Please use docDocumenViewer which has ZoomMode.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Thu Feb 16, 2017 10:39 am

ok, I've got it now :)

But changing :
this.docViewer1.ZoomMode = ZoomMode.FitPage;
to
this.docViewer1.ZoomMode = ZoomMode.FitWidth;

after LoadFromFile always display the same thing. It there any refresh to do ?

nolme
 
Posts: 79
Joined: Fri Apr 24, 2015 3:56 pm

Fri Feb 17, 2017 6:31 am

Dear nolme,

Thanks for the information.
Let me take your sample project as exsample, if you just add that code in the event QuickTestForm_Load, it will not work since after initializing the control, it has some default setting.
To achieve your target, please add below event in the file(QuickTestForm.Designer.cs), it can set the ZoomMode correctly.
Code: Select all
this.docDocumentViewer4.DocLoaded += docDocumentViewer4_DocLoaded;
...
void docDocumentViewer4_DocLoaded(object sender, System.EventArgs args)
  {
     this.docDocumentViewer4.ZoomMode = Spire.DocViewer.Forms.ZoomMode.FitPage;
   }
 

If there is any question, please let me know.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri Feb 17, 2017 7:33 am

Hi,

I cannot test, the compiler don't compile any more.

- Load the 'Quick test (ok 2).
- Add the control 'Spire.OfficeViewer.Forms.DocumentViewer' on the designer view
- Compile and get lc.exe error -1

(got on 2 machines Win 7x64 Fr+VS2017 RC and Win10x64+VS2015)

IF we remove the control and the licence file in the project :
'<EmbeddedResource Include="Properties\licenses.licx" />'
and reload the project, compile succeed.

nolme
 
Posts: 79
Joined: Fri Apr 24, 2015 3:56 pm

Fri Feb 17, 2017 7:58 am

Dear nolme,

Thanks for your response.
You needn't remove the control 'Spire.OfficeViewer.Forms.DocumentViewer', only need to remove the licence file and the below statement in the project. And then rebuild it.
'<EmbeddedResource Include="Properties\licenses.licx" />'

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri Feb 17, 2017 8:36 am

When I remove the line
<EmbeddedResource Include="Properties\licenses.licx" />
using notepad++, Visual Studio ask me to reload the project. So I reload it, and compile and get the same error.
Going back to notepad++, it ask me to reload and the removed line appears again.

EDIT : Removing the licenses.licx from Visual Studio, deletes the control in the Designer

nolme
 
Posts: 79
Joined: Fri Apr 24, 2015 3:56 pm

Fri Feb 17, 2017 8:54 am

Dear nolme,

Thank for your peompt response.
Please try to delete the license file first and then rebuild the project again.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri Feb 17, 2017 9:07 am

Doing this remove the control in the Designer (so compile it OK but control has left)

nolme
 
Posts: 79
Joined: Fri Apr 24, 2015 3:56 pm

Fri Feb 17, 2017 9:14 am

Dear nolme,

Sorry that maybe I made you confused.
The "LC.EXE error" is caused by the "licenses.licx" file in the properties folder, please delete it and rebuild it again, and check if it can work.
If there still is issue after delecting the license file, please provide us the sample project that we can reproduce the issue directly.

Sincerely,
Betsy
E-iceblue support team
Last edited by Betsy.jiang on Tue Feb 21, 2017 4:07 am, edited 1 time in total.
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri Feb 17, 2017 9:58 am

It works until you open the Designer.
Once you open it, it adds again the licence.licx.
So I have to delete it each time.

nolme
 
Posts: 79
Joined: Fri Apr 24, 2015 3:56 pm

Return to Spire.Doc