Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Sat Aug 27, 2016 9:50 am

Hi,

Maybe I misunderstood something here, but setting .ViewerPreferences.FitWindow to true or false doesn't seem to have any effect on the zoom level when the document is opened, e.g. in Acrobat Reader. - Is there alternatively an option to set the initial zoom level e.g. to 100% when opening the generated PDF in an external viewer? Thnaks for your help.

marsu
 
Posts: 26
Joined: Sat Aug 27, 2016 8:42 am

Mon Aug 29, 2016 6:11 am

Dear marsu,

Thanks for your inquiry.
Here is a guide to set zoom factor/percentage for your reference:
http://www.e-iceblue.com/Tutorials/Spir ... B.NET.html
If there is any question, welcome to get it back to us.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Mon Aug 29, 2016 7:35 am

Your link works, thanks, and indirectly provided a workaround for ViewerPreferences.FitWindow, which currently does not work as expected:

Replacing PDFDestinationMode.Zoom by PDFDestinationMode.FitToPage in the sample code indeed does what ViewerPreferences.FitWindow=true should do: The document is opened so that each page completely fits the available display space in any viewer.

marsu
 
Posts: 26
Joined: Sat Aug 27, 2016 8:42 am

Mon Aug 29, 2016 8:07 am

Dear marsu,

Thanks for your feedback.
We will investigate the issue that the method ViewerPreferences.FitWindow=true doesn't work and then update to you.
Sorry for inconvenience caused.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Mon Aug 29, 2016 9:20 am

Dear marsu,

In PDF standard, the bool FitWindow means that a flag specifying whether to resize the document’s window to fit the size of the first displayed page. Default value: false.
After investigation, we found that the result is correct, as we open the result document with setting the FitWindow as true in Adobe Acrobat, the property is checked. I have attached the screenshot, please check.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Return to Spire.PDF