Posted by a ceTe Software moderator
Hello,
You are seeing this behavior most likely because of the size set to the hosting control and Viewer in the main window. Please try setting the width and height of the main window to the WindowsFormsHost and the Viewer dynamically and see if it works for you. Below is the code sample for it.
private void Window_Loaded(object sender, RoutedEventArgs e)
{
PdfViewer viewerObj = new PdfViewer();
PdfDocument pdf = new PdfDocument("DocumentB.pdf");
windowsFormsHost1.Child = viewerObj;
windowsFormsHost1.Width = this.Width;
windowsFormsHost1.Height = this.Height;
viewerObj.Width = (int)windowsFormsHost1.Width;
viewerObj.Height = (int)windowsFormsHost1.Height;
viewerObj.Open(pdf);
}
If you continue getting the similar behavior then please send over the following details to
support@cete.com so that we can look into it further.
1.Sample project which uses static data using which we can recreate the behavior.
2.Steps to recreate the behavior.
Thanks,
ceTe Software Support Team.