PDF viewers

dwhite

Member
I have recently been looking at how to access the Adobe PDF ocx control within Progress. However, it appears that control is only available if everyone is updated to version 9 of Adobe (another developer in the office wasn't and didn't have the control).

While it's not impossible for us to get the clients up to that version of Adobe, the other concern appears to be that eventually we are going to need a way to read data from a particular PDF file and take that data and insert it into the database. The Adobe control doesn't appear to do this from what I can tell (if it does, could someone show me how?)

Anyways, we decided to start looking at some free PDF viewer/readers out there that we might be able to use to do both of these things. But we also need to make sure that anything we use can also be accessed by Progress.

Has anyone had any experience with a free control like this (or maybe one that has a small cost to it)?
 
Greetings dude,

Why do U need a third party OCX? Just use the control FREE with windows.
windows\system32\shdocvw.dll

microsoft Web Browser

!webBrowser
Example syntax: chCtrlFrame:WebBrowser:Navigate (cUrl,,,,).
drop the web browser onto a frame/window to display the pdf u require.
then use the line of syntax provided, which will display the document. What ever is installed locally eg PDF/Word/Excel, will open and display.
Good luck
BFN
 

dwhite

Member
Hi,
We ended up trying the Microsoft Web Browser, but here's my dilemma(s). One, I have no way to prevent the user from saving the file in their own directory and name. I want to write my own save functionality where the file will be saved to a specific directory and name but the save functionality in the web browser won't prevent the "Save As" dialog box from coming up. (Apparently Microsoft used to allow it, but that code no longer works due to security reasons). Saving to their own directory becomes problematic for us because we want to store the files in such a manner that it is easy for us to retreive them.

I thought I could manage this despite this problem by simply making sure that the directory that pops open in the "Save As" dialog is one of my own choosing and we could just train the users to save to that directory always. However, I have no control as far as setting what that directory is. I searched the registry to no avail. I'm guessing that since the MS Web Browser control is at least 10 years old, that it might be storing that location in an .INI file. However, I can't use Windows Grep to search my C: drive and find it for some reason. Windows Grep will allow me to search some folders in C: but not allof C: itself or in C:\Windows. (Guessing that's a security issue too). I'm using Windows 7 as well which might be a problem.

We also need the ability to pull data from a pdf file for the purpose of putting it into the database. Additionally we need the ability to take data from a database and put it into a file. The web browser doesn't allow either of these options.
 
Greetings,

Instead of using the windows system-dialog boxes, create UR own.
That way U can specifically limit the parts of the operating system that could be pointed to.
Instead U can create UR own dialog box that only shows information U wish, limiting the location where U would like to point the file to.
Happy playing
 

dwhite

Member
The problem is that I can't grab the "instance" of the changed file and save it. I don't see a way to get that file. If I could do that, I'd be able to do what you're suggesting fairly simply I think.
 
Cant grab the "instance" of the saved file? I am sorry, how are U sure it is a changed file?
Simple directory attributes can be accessed, if the file has a different attribute ( e.g date/time stamp) then it has been edited.
 
The FILENAME in the directory, will enable you to grab the instance.
Once you have the identifier then you know what to do.
 

dwhite

Member
I'm not sure I'm explaining it right so I'll try again. In the Microsoft Web Browser, I can open up a PDF just fine. It opens it up and has save buttons just as if you have opened it up in Adobe. I don't want to use those save buttons because I want to have total control over where the file is saved and under what name. So instead of using that save button, I was going to right my own save button. The Microsoft Web Browser has a method that allows you to pass in parameters to save a file. It has parameters that you can use that are supposed to save the file without prompting the user for a location and a name. Those parameters DON'T WORK. This is apparently because Microsoft decided that a "silenet save" is a security risk. So no matter what I try, a prompt is given to the user. So I wanted to try to at least control the location of what shows up in the windows dialog box. I can't find a way to control that either.

I have no other way to save this file. I can't just copy the file from one location to another because it copies the original file, not the changed one. This is what I mean about having no way to grab the instance of the saved file.

If there is a way to save this file under my complete control, I just don't see what it is. If you have some examples of how to do this, I would really appreciate it!
 

dwhite

Member
It'll depend on the user. The user has the ability to create the pdf and then we have a process that gets it into our system. I'm assuming they'll use Acrobat...?
 
Greetings,

The Operating System, generally Windows handles this.
As long as the local machine has adobe installed and able create a PDF file.
 
Top