how to use this wpfpdfviewer?

0

http://wpfpdfviewer.codeplex.com/

inner Exception {"Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))"

after find a free pdf viewer, got error, any other better free pdf viewer? if no, how to use this without error?

'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

c#
wpf
pdf-viewer
asked on Stack Overflow Aug 2, 2013 by ControlPoly • edited Aug 6, 2013 by ControlPoly

1 Answer

0

You are trying to use WPFPdfViewer.dll this dll needs one of the adobe acrobat products to be installed on your pc. try that and let us know

answered on Stack Overflow Feb 15, 2019 by Saeed Asgari

User contributions licensed under CC BY-SA 3.0