Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
2

Show PDF File in Windows Form using Visual Basic 2005

New Here ,
Jan 12, 2007 Jan 12, 2007
Hello.

I am a developer beginner in acrobat products.

I'm developing an application and I need to open one pdf file in one form with various controls, such as Text Boxes and so on, using visual basic 2005. I try to insert the Acrobat control in that form and it not works. What do I need to do to make this possible.

My configuration.

Windows XP Pro.
Visual Studio 2005 Pro.
Acrobat 7 Professional.

In the client computer I have to install Acrobat 7 Professional or I need only the Acrobat Reader?

Thanks.

Fernando Silva.
TOPICS
Acrobat SDK and JavaScript
26.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 12, 2007 Jan 12, 2007
The Acrobat SDK describes which interfaces require Acrobat, and which
ones work in Reader. Most require Acrobat. Check especially the IAC
Overview, "Differences among the Acrobat viewers" in each section.

Aandi Inston
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 16, 2007 Jan 16, 2007
It should be possible to use the free Reader, if you only want to display and print pdf files.

I have been using the Adobe Acrobat ActiveX (COM) with VB.
(Menu: Project / Add Reference / COM tab / select "Adobe Acrobat 7.0 Browser Control Type Library 1.0" ). You then drag it from the Toolbox to your form. You then have access to code commands to size it, make it visible (or not) and to Load pdf files. You can display the file within a window on your form (Load).

Once you have pdf filename, you should be able to display it using only 2 commands :
AcroPDF1.Visible = True
fileNameX = "C:\subdir\Myfile-x.pdf"
AcroPDF1.LoadFile fileNameX
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 26, 2007 Jan 26, 2007
Do we need a license from Adobe to redistribute the DLLs referenced when a COM object is used in the above manner mentioned by Michael?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 26, 2007 Jan 26, 2007
You can't distribute JUST the DLL's - you would need to distribute the entire Adobe Reader.

And yes, for that, you would need a license.

Leonard
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 31, 2007 Jan 31, 2007
I'm not sure I follow the argument for the need of a license.
Why would anyone distribute Adobe Reader? I assume any user machines will correctly obtain their own copy of the free Reader.

If my program calls Reader resources, do I need a license to send my program (but not Reader) to others?

If so, sending anyone a pdf file would seem to require the same license.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 31, 2007 Jan 31, 2007
No, you only need a license to redistribute Reader. More people want
to do this than you might think, e.g. to include it on a CDROM with a
PDF document.

Aandi Inston
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 31, 2007 Jan 31, 2007
and to ensure that users have the latest/correct version of Reader.

Leonard
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 26, 2007 May 26, 2007
I want to do the same thing in C# with Microsoft studio 2005. Just want to open a pdf file and display it into a window form. I have installed Adobe Reader 7.0 and did the same steps as Michael mensioned. When I call axAcroPFD1.LoadFile(my-pdf-file), it failed. The file is there. Could someone helps me to see what is wrong? Do I have to install Acrobat SDK? Do I have to have a license to do this? Thanks!!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 28, 2007 May 28, 2007
Yes, it should work the same way. I'm not sure the format is identical.
what is the error message : no such file, or the command is bad?

you have a typo in your message
axAcroPFD1.LoadFile / should be:
axAcroPDF1.LoadFile

you could also print out the file name within your program, to make sure it is ok.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 28, 2007 May 28, 2007
Thanks, Michael. Yes, it is a typo. I have Visual Studio 2005 and Adobe Reader 7.0. I go through the steps you mensioned with VB and C# both. I added the control called "Adobe PDF Reader" in stead of "Adobe Acrobat 7.0 Browser Control Type Library 1.0" which I saw it when I add a reference to project. When I call LoadFile, it returns false. I don't know how to get the error message from this. This file is there. I don't have Adobe SDK. Do I need to have SDK to make it work?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 29, 2007 May 29, 2007
No, you do not need the SDK. More functions are available with Acrobat or SDK, but you can Load, Zoom, etc with Reader.

You might want to make sure you can open your file with Reader (not via your C program). Or try a different valid pdf file as a test.

Also make sure you do not have multiple versions of Reader/Acrobat installed / or even a memory effect of previous installations.
... it should work.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 29, 2007 May 29, 2007
Thanks, Michael. You are right. I did have Adobe Acobat writer installed. I rmoved all of them and reinstalled Adobe Reader 7.0. It works now. But it is not a good solution to work like this.

Thanks again!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 05, 2007 Jul 05, 2007
Hello,
I did open PDF file in VB2005 Windows forms using "Adobe Acrobat 7.0 Browser Document" com contorl..

Me.AxAcroPDF1.LoadFile("PDF file")

It's working fine..But my requirement is.. How can get the TextFiled text from currently opened pdf file.

let me explain detailed..

I designed some fillable forms like Invoice,IT request form..i was did opening the fillable form in my vb.net windows application,If user do fill the form and click the button from my windows application..i want to get the Textfield values and to stored in the database.

Advance Thanks for ur kindly service

Regards
N.balamurugan
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 06, 2007 Jul 06, 2007
You cannot use the forms API in conjunction with the "Adobe Acrobat
7.0 Browser Document" . In fact, you can't use the forms API for a
document opened outside the Acrobat window at all.

The way to proceed here is to have a submit button which sends the
form data to a server process. (The server could be one you run
locally).

Aandi Inston
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 03, 2007 Aug 03, 2007
hi,
i am working as a computer engineer in an international NGO, BRAC Afghanistan in Afghanistan. I am designing a form in visual basic. there will be one button and if i press that, one pdf file will open from a particular location. what are the visual basic codes for this?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 04, 2007 Aug 04, 2007
Download the Acrobat SDK and read the documentation
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2007 Nov 04, 2007
Dear Md. Niamul Haque Khan,

Private Sub Command2_Click()
'Use this code. Call OpenSystemFile with the full path to the
pdf file.
'If Acrobat Reader is installed, it will be opened.

OpenSystemFile ("C:\Inetpub\ftproot\Sylvester\dewa.PDF")
End Sub

Public Function OpenSystemFile(ByVal sFileName As String) As Boolean
If Len(sFileName) > 0 Then
ShellExecute GetDesktopWindow(), vbNullString, sFileName, vbNullString, vbNullString, vbNormalFocus
OpenSystemFile = True
End If
End Function
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 18, 2008 Jan 18, 2008
i am doing a project that converts pdf files to xml ones...i wanted to knw if there is a simple way to do this?...coz the acrobat sdk (save as xml plugin looks very complicated 2 me)....is there no easy way , for eg. a free dll file that does the conversion?....a reply would be greatly appreciated ..... thanking u in advance...
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 05, 2008 Mar 05, 2008
Thursday, March 2008.

Hello,

I am using Vs 2005 (VB) and designed a form to display PDF file content. This PDF file is a electronic form with a few fields in it.

How can I reference the PDF form fields so that I can extract the Filled-in values from the PDF form Fileds and use them in VB windows form ???

Any suggestions ?

Thanks.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Mar 05, 2008 Mar 05, 2008
Using the JSObject and the getField() method if it is an AcroForm or the xfa.resolveNode method if it is an XFA form.

There are plenty of demos using the JSObject in the SDK samples.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 01, 2008 Apr 01, 2008
This is for a VB editor not for visual studio 2005 Using (Menu: Project / Add Reference / COM tab / select "Adobe Acrobat 7.0 Browser Control Type Library 1.0" ) adds this to Bin and if you do this in the toolbar it not be usuable, you can not add it to the project. Is their not a solution?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 01, 2008 Apr 01, 2008
> Is their not a solution?

I don't understand your question. All the SDK samples are for VS2005.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 08, 2008 Apr 08, 2008
I have a tree view with checkbox's to select pdf files i have been trying to select a few pdfs and sent them to print. i am using asp.net and vb script help please
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 08, 2008 Apr 08, 2008
How are you working with ASP.NET and Acrobat?

ASP.NET is a server-based language while Acrobat is NOT licensed for use on a server.

Leonard
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines