PDF Viewer


Aim is to display a PDF document



XAML


∇ xaml←PdfViewerXAML
⍝ XAML for the PdfViewer example
 xaml←⊂'<Window'
 xaml,←⊂'    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"'
 xaml,←⊂'    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"'
 xaml,←⊂'    xmlns:sfpdfviewer="clr-namespace:Syncfusion.Windows.PdfViewer;assembly=Syncfusion.PdfViewer.WPF"'
 xaml,←⊂'    SizeToContent="WidthandHeight">'
 xaml,←⊂'    <StackPanel>'
 xaml,←⊂'        <sfpdfviewer:PdfViewerControl Name="sfpdfviewer" Width="800">'
 xaml,←⊂'        </sfpdfviewer:PdfViewerControl>'
 xaml,←⊂'    </StackPanel>'
 xaml,←⊂'</Window>' 


Code


PdfViewer w;⎕IO;⎕ML;xaml;⎕USING
⍝ Simple PdfViewer example
 ⎕IO ⎕ML←0 3
 xaml←PdfViewerXAML
 #.window←#.UTIL.WPF.LoadXaml xaml(⊂'SyncPdfViewer')
 window_pdfviewer←#.window.FindName⊂'sfpdfviewer'
 window_pdfviewer.Load⊂w
 #.window.Show  


As usual the untidiness (in terms of global variables) which is endemic to WPF-based code.

The 'SyncPdfViewert' argument to #.UTIL.LoadXAML has the effect of adding 'Syncfusion.Windows.PdfViewer,Syncfusion/4.5/Syncfusion.PdfViewer.WPF.dll' to the ⎕USING list of LoadXAML


Bear in mind that while this example shows PdfViewer as the sole content of a window, it may be just one of many controls (the contained toolbar is misleading)

Operation


#.PdfViewer.PdfViewer 'd:\dick\temp\pdf viewer.pdf'    

Unresolved Issues

More control over appearance.