Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

how to use this pdf viewer component?

$
0
0

http://wpfpdfviewer.codeplex.com/

'The invocation of the constructor on type 'WPFPdfViewer.WinFormPdfHost' that matches the specified binding constraintsthrew an exception.' Line number '10' and line position '14'.

Could not load file or assembly 'Interop.AcroPDFLib

public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();

            var location = System.Reflection.Assembly.GetExecutingAssembly().Location;
            var path = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(location), "sample.pdf");
            pdfViewer.LoadFile(path);
            //pdfviwer.LoadFile(@"C:\Users\LAB-User2\Downloads\PdfViewer");
        }
    }

<Window x:Class="testPDFwpf.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:WPFPdfViewer="clr-namespace:WPFPdfViewer;assembly=WPFPdfViewer" 
        Title="MainWindow" Height="350" Width="525"><Grid><WPFPdfViewer:PdfViewer x:Name="pdfViewer"></WPFPdfViewer:PdfViewer></Grid></Window>

then i find https://app.box.com/shared/2ad00kml4n  after copy UserControl1 to own project and follow all code in sample, got error

"Could not find any resources appropriate for the specified culture or the neutral culture The invocation of the constructor on type 'testPDFwpf.MainWindow' that matches the specified binding constraints threw an exception.' Line number '3' and line position '9'. the call stack contains only external code


Designer





Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>