C# Tutorial 31: How to open and show a PDF file inside the Form
Why Stack Overflow recommends it
Stack Overflow users link it as a reference for embedding a PDF viewer in a WinForms form with the AxAcroPDF control, both as an answer and as the source of problems people hit when following it.
Recommended by 0 people across 0 different months, 2013 to 2017.
What it is
A short beginner C# tutorial in the ProgrammingKnowledge series showing how to display a PDF inside a Windows Forms app using the Adobe Acrobat (AxAcroPDF) ActiveX control and an OpenFileDialog. It walks through adding the control to the toolbox and setting its src property to the chosen file.
What people said
Cites Gokuldas.Palapatta · 2013-06 · Stack Overflow · on “Viewing PDF in Windows forms using C#”
[this video] Use the above link private void btnopen_Click(object sender, EventArgs e){ OpenFileDialog openFileDialog1 = new OpenFileDialog(); if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK){ axAcroPDF1.src = openFileDialog1.FileName; } }
Cites 3xGuy · 2015-06 · Stack Overflow · on “open a PDF in windows Form”
I am trying to load a pdf into a axAcroPDF using this [LINK] method that I found here. but there isn't a this.axAcroPDF.LoadFile() there. The error message that I get says: "AxacroPDFLib.AxacroPDF doesn't contain a defection for 'LoadFile' and no Extension method excepting first method of a type AxacroPDFLib.AxacroPDF could be found (Are you missing a using directive or an assembly reference?" So I double checked and there are Acrobat , AcroPDFLib, AxAcroPDFLib Referances in the WPF and user control. Next I goggled this again and found this [this video] on YouTube that uses this.axAcroPDF.src =path; however I do not this option either. Please tell me if they have changed the LoadFile(path) to som
Cites Kfir · 2017-02 · Stack Overflow · on “Show embedded pdf file in winforms C#”
I'm trying to show a pdf file in my form. I used this tutorial : [this video] But nothing happens , It opens a new inaccessible blank Adobe Acrobat window. This is my code : OpenFileDialog op1 = new OpenFileDialog(); if (op1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { pdfRead.src = op1.FileName; } What can i do to fix this ?