Spire.PDFViewer 7.12.3 supports the interface zoom effect using Ctrl + scroll wheel in WinForm projects

2023-12-21 07:14:00

We are pleased to announce the release of Spire.PDFViewer 7.12.3. This version supports the interface zoom effect by using Ctrl + scroll wheel in WinForm projects. What’s more, it also fixes the issue that text content could not be displayed. More details are listed below.

Here is a list of changes made in this release

Category ID Description
New feature SPIREPDFVIEWER-579 Supports the interface zoom effect by using Ctrl + scroll wheel in WinForm projects.
this.KeyPreview = true;
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyDown);
this.KeyUp += new System.Windows.Forms.KeyEventHandler(Form1_KeyUp);
this.MouseWheel += new System.Windows.Forms.MouseEventHandler(Form1_MouseWheel);
private bool m_PressCtrl = false;
private float m_ZoomFactor = 1.0f;
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
	m_PressCtrl = e.Control;
}       
private void Form1_KeyUp(object sender, KeyEventArgs e)
{
	m_PressCtrl = false;
}        
private float[] array = new float[] { 0.5f, 0.75f, 1f, 1.25f, 1.5f, 2f, 4f };
private int index = 2;     
private void Form1_MouseWheel(object sender, MouseEventArgs e)
{
	if (m_PressCtrl)
	{
		if (e.Delta > 0)
		{
			index = index < 6 ? index + 1 : 6;
		}
		if (e.Delta < 0)
		{
			index = index == 0 ? 0 : index - 1;
		}
		this.pdfViewer1.SetZoomFactor(array[index]);
	}
}
Bug SPIREPDFVIEWER -577 Fixes the issue that text content could not be displayed.
Click the link to get Spire.PDFViewer 7.12.3:
More information of Spire.PDFViewer new release or hotfix: