I want to adjust the size automatically after loading a file using LoadFromStream method.(MemoryStream)
The code below is from the example file.
public Form1()
{
InitializeComponent();
MemoryStream ms = new MemoryStream(File.ReadAllBytes(@"..\..\..\..\..\..\Data\Spire.Office.pdf"));
this.documentViewer1.LoadFromStream(ms);
documentViewer1.ZoomTo(Spire.OfficeViewer.Forms.ZoomMode.FitPage);
}
right after LoadFromStream method, it doesn't work.
But after loading file completely,(When the viewer is finished rendering and the screen is visible,) Zoomto method works well.
If I can set the time when the rendering ends, I think I can apply it with a function right after that point.
How do i know the end of rendered point from stream loading?
-------------------------------------------------------------------------------------------
I found the event DocLoaded.
but could I set the size of file loading?