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.7K
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 ,
Jun 10, 2008 Jun 10, 2008
Hi All,<br /><br />I'm using Acrobat 7.0 professional. I created a fillable form. I entered some data and exported the data into a test file. Now, given the text format this form is using, I would like to automate the same formatted text file with real user information.<br /><br />Right now, I can get the information from my database, create the text file needed. I double click on my PDF file that I would like to fill, click <File>,<Form_Data>,<Import Data to Form..>, then browse for my text data file select it and the form is filled...<br /><br />Is there a way I can automate this process???<br /><br />Thanks in advance and any help or difference approach would be highly appreciated...<br /><br />Tony
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 ,
Jun 10, 2008 Jun 10, 2008
What format will your data files be in, FDF or XDP?
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 ,
Jun 27, 2008 Jun 27, 2008
Hi,
How to get pagecount of PDF?
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 ,
Jun 29, 2008 Jun 29, 2008
Using what programming language on what OS platform?

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 ,
Jul 30, 2008 Jul 30, 2008
I dropped the Adobe Acrobat pdf reader browser control on my web form. I can assign a path in the data property and upon opening the form the pdf file displays in the window. However, I would like the ability to change the pdf document upon certain events in the form, (let's say a button event). The problem is I do not know how to assign a new path to the reader. If I use this:
AcroPDF1.Visible = True
fileNameX = "C:\subdir\Myfile-x.pdf"
AcroPDF1.LoadFile(fileNameX)

The program does not recognize AcroPDF1? I am asuming I need to import a library in the code? like Imports AcroPDFlib ???? But I do not know which one. Can you help? 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 ,
Jul 30, 2008 Jul 30, 2008
You say you already have a PDF displaying in the form. What is the variable name you are using for that control? Reference the same control.
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 30, 2008 Jul 30, 2008
I am not referencing a varible name.
As a test I hard coded a path in the 'Data' property of the reader.

In code I tried me. ...and there is no prompt. I even gave the reader an ID name, and still it can not be found.
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 ,
Jul 30, 2008 Jul 30, 2008
> I am not referencing a varible name.

If the Reader control is on your Form, it has a variable name since it is a variable. What language are you using for your form, VB.NET?
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 30, 2008 Jul 30, 2008
Yes VB.net, vs 2003.

What would the variable name be? If I try AcroPDF1 I get a compiler message stating that the name 'is not declared.'

If I just drop the control on the form, a generic name should be given. Like a datagrid, is Datagrid1.

???
Shouldn't there be some kind of an 'imports' statement at the top of the code for the reader?
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 ,
Jul 30, 2008 Jul 30, 2008
> Shouldn't there be some kind of an 'imports' statement at the top of the code for the reader?

Depends which source file you're looking in. There will be one in the source for the form, which is not usually the same file you will do your coding in.

The variable name will be declared in your Form.Designer.vb file, you can also see it by clicking on the object in Design mode, it will be in the header of the property list.

If you don't know how object name assigning works, you should probably take a refresher in VB before trying to develop in it. Pretty much a bedrock principle of the language.
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 30, 2008 Jul 30, 2008
Thanks for your input. I have not used these types of objects before. I am used to standard web controls where each has a name or at least where one can assign a name. Here is the html code for the adobe reader object:<br /><br /><OBJECT id="ReaderPDF" style="Z-INDEX: 102; LEFT: 264px; WIDTH: 504px; POSITION: absolute; TOP: 56px; HEIGHT: 480px"<br /> data="http://ip address/BulletinBoard/PDF_Folder/BulletinBoardMessage.pdf"<br /> classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" VIEWASTEXT><br /> </OBJECT> <br /><br />With my limited experiense, I thought I could just type in code, <br />me.ReaderPDF.Data = etc... <br />I guess that is not the case. All is not lost though since, I can create a datagrid which contains links to pdf documents on the server and I can open that way. I was just trying to figure out how to use the reader. 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 ,
Jul 30, 2008 Jul 30, 2008
"OBJECT id="ReaderPDF" style="Z-INDEX: 102; LEFT: 264px; WIDTH: 504px; POSITION: absolute; TOP: 56px; HEIGHT: 480px"
data="http://ipaddress/BulletinBoard/PDF_Folder/BulletinBoardMessage.pdf"
classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" VIEWASTEXT>
"/OBJECT"

I did not know the forum would not let me post html. Not sure if the above will display with tags removed.
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 ,
Jul 30, 2008 Jul 30, 2008
HTML code? You just said you were using VB in Windows Forms. That's very different and needs to be accessed in different ways.

So you're actually using ASP.NET in an HTML page and not VB in a Windows Form, correct?
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 30, 2008 Jul 30, 2008
I don't think I said VB in Windows Forms.
"I dropped the Adobe Acrobat pdf reader browser control on my web form"
This is a web form.
The Adobe Reader control is a component I added in the toolbox.
I am trying to change the 'src' of the reader control within my VB.Net code.

I just showed how the control is defined in the HTML, as an aid in the event the control itself is somehow declared wrong. It also shows how I can assigned the data property the path to a pdf, which does display.

In further research, I found that the pdf displayed can be changed by assigning the path to AdobeReader.src, but again "AdobeReader" or
the id name I gave it "ReaderPDF" show in code that it is not declared. That is the problem. And among the namespace for Acrobat there are many, many different choices.
Sorry for the confusion. Hopefully this makes more sense? 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 ,
Jul 30, 2008 Jul 30, 2008
That's because ReaderPDF doesn't exist inside your VB application. It exists on the web page, since you added it as an HTML object. You'll need to get to it hierarchically, by accessing your web document as an object and then the ReaderPDF control off of that.
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 30, 2008 Jul 30, 2008
Yes, I think it may be a findcontrol command. Thanks for your time. Hopefully I'll get this working. 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 ,
Jul 30, 2008 Jul 30, 2008
LATEST
> I think it may be a findcontrol command

I don't think so, because the control is still not part of the VB application, it is embedded in the HTML.
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