After a DICOM PDF is loaded into DicomViewer control - DicomObjects creates a PDF viewer control to display the PDF pages.

If user wishes to take control of the PDF viewer control to make changes in code (such as change the default ZoomMode from FitWidth to FitPage or ActualSize), the following code might be useful.

DicomObjects.NET

    
 // ZoomMode enum values supported by the PDF viewer
 private enum ZoomMode
 {
    FitPage = 0,        // Make the page to fit on the display either vertical or horizontal.
    FitWidth = 1,       // Make the page to fit on the display only horizontal.
    FitHeight = 2,      // Make the page to fit on the display only vertical.
    ActualSize = 3,     // Shows the page in its actual size.
    ZoomPercent = 4     // Shows the page at a zoom factor specified by the user.
 } 
 
 [DllImport("psapi.dll", SetLastError = true)]
 static extern bool EnumProcessModules(IntPtr hProcess, [Out] IntPtr[] lphModule, int cb, out int lpcbNeeded);

 [DllImport("psapi.dll", SetLastError = true)]
 static extern uint GetModuleFileNameEx(IntPtr hProcess, IntPtr hModule, [Out] StringBuilder lpFilename, int nSize);
 
 // Try to locate the ceteDynamic PDF assembly
 private static List<string> GetNativeModules()
 {
    var process = Process.GetCurrentProcess();
    IntPtr[] modules = new IntPtr[1024];
    int bytesNeeded;

    if (!EnumProcessModules(process.Handle, modules, modules.Length * IntPtr.Size, out bytesNeeded))
        return null;

    int count = bytesNeeded / IntPtr.Size;
    List<string> strings = new List<string>();

    for (int i = 0; i < count; i++)
    {
        StringBuilder sb = new StringBuilder(1024);
        GetModuleFileNameEx(process.Handle, modules[i], sb, sb.Capacity);
        if (sb.ToString().Contains("DPDFViewerNative"))
            strings.Add(sb.ToString());
    }

    return strings;
 }
 
 // sample routine to change Zoom mode
 private void ChangeZoomMode()
 {
    if (Viewer.Controls.Count > 0)
    {
        var pdfViewer = Viewer.Controls[0];
        var names = GetNativeModules();
        if (names.Any())
        {
            var assembly = Assembly.LoadFrom(names.First());
            Type pdfviewerType = assembly.GetType("ceTe.DynamicPDF.Viewer.PdfViewer");

            PropertyInfo ZoomModeProperty =
            pdfviewerType.GetProperty("ZoomMode", BindingFlags.Public | BindingFlags.Instance);
            if (ZoomModeProperty != null && ZoomModeProperty.CanWrite)
                ZoomModeProperty.SetValue(pdfViewer, ZoomMode.FitPage, null);
        }
    }
}