PDA

View Full Version : Accessing Pdf Files With Acrobat Reader Via Cd


plutopluto
04-15-2006, 03:19 AM
I try to access multiple pdf files using acrobat reader on my cd without any interference on the acrobat reader on my system. I noticed that whenever I opened one of the pdf files, and I try to open another only the previous pdf file always appear. what did i do wrong. Anyone with useful ideas. Thanks

bule
04-15-2006, 01:34 PM
Did you try using Foxit Reader instead of Acrobat Reader? Works much better, faster and cleaner.

plutopluto
04-16-2006, 01:13 AM
I tried using Foxit Reader but all the same , I used the following Script.

ComboBox Properties:ComboBox1

on select

01 ---get selected
02 selected = ComboBox.GetSelected("ComboBox1");
03 path_short = File.GetShortName(_SourceFolder);
04 File.Open ("AutoPlay\\Foxit\\Reader.exe", "\\AutoPlay\\Files\\Open_PDF", SW_MAXIMIZE, false);

I used above script to access multiple pdf files, but only the reader opened not the files. Please help. Thanks

yosik
04-16-2006, 04:38 PM
You should use File.Run instead:

Suppose you have all your PDF docs in the Docs folder and the Reader in the Foxit Directory under Autoplay, you should use the following:

01 selected = ComboBox.GetSelected("ComboBox1");--names of PDF files in the ComboBox
02 File.Run ("AutoPlay\\Foxit\\Reader.exe", "AutoPlay\\Docs\\"..selected, "C:\\Temp", SW_MAXIMIZE, true);-- will open ONE file in the reader at a time

Good luck

Yossi

bule
04-16-2006, 05:10 PM
Yeah and also add command line switch -NoRegister to the File.Run Command so that Foxit doesn't ask about file associations.

Intrigued
04-16-2006, 05:14 PM
Remember, Foxit Reader is free for non-commercial use. (from their Website)

plutopluto
04-17-2006, 05:45 PM
Thanks Yossi, but I am lost, I would love it if I could get a demonstration. Anyone with Examples please.

Jason Pate
04-17-2006, 06:08 PM
Big problem you have is that you cant select more than a single item with a combo box you might want to change to a Listbox if you want the users to beable to open more than a single PDF, "combobox only let you SELECT a single item".

But code should look something like this:
-- "selected" is the number of the item the users selected
-- "selected_txt" is the text of that item (I assume its file names) you use use the ComboBox.GetItemData and store file names in it, and more user friendly names for the Text
-- path_short assumed that the pdf files are soo the _SourceFolder "\\AutoPlay\\Files\\Open_PDF\\

---get selected
selected = ComboBox.GetSelected("ComboBox1"); --Returns a number of the selected item
selected_txt = ComboBox.GetItemText("ComboBox1", selected) -- Used the selected number to get the text of that number ComboBox.GetItemData could be used to get the data
path_short = File.GetShortName(_SourceFolder);
--File.Open ("AutoPlay\\Foxit\\Reader.exe", "\\AutoPlay\\Files\\Open_PDF", SW_MAXIMIZE, false);
File.Open ("AutoPlay\\Foxit\\Reader.exe", path_short.."\\AutoPlay\\Files\\Open_PDF\\"..selected_txt, SW_MAXIMIZE, false);





Listbox sample code

Selected_ListBox = ListBox.GetSelected("ListBox1")
if Selected_ListBox ~= nill then
path_short = File.GetShortName(_SourceFolder);
List_count = Table.Count(Selected_ListBox)
while List_count > 0 do
selected_txt = ListBox.GetItemData("ListBox1", count)
File.Open ("AutoPlay\\Foxit\\Reader.exe", path_short.."\\AutoPlay\\Files\\Open_PDF\\"..selected_txt, SW_MAXIMIZE, false);

end
lst_box = ListBox.GetCount("ListBox1")

elseif Selected_ListBox == nill then
Dialog.Message("Selected_ListBox","nil")
end


Hopefully that gives you something to work with, I did not get a chance to run the code so I am sure there are little errors but that should give you a better idea.

The while loop is incomplete, it needs a count = count - 1 :) I would store the file names in the data and use the text to display a nice user frendly name for the end user. If you need more help let me know if I have time I can work up a better example.

plutopluto
04-17-2006, 06:41 PM
Jason Pate, thanks for the hints. I am working on it, looking forward for best examples, preferrably the tested and working ones.

Jason Pate
04-18-2006, 09:09 AM
Upload your project file or email it to me ;).

plutopluto
04-22-2006, 03:43 AM
Back again! anybody with usefull examples (apz) about how to Accessing Pdf Files With Acrobat Reader or foxit reader Via Cd.

johnraus
04-22-2006, 03:52 PM
Found this info in the How do I ... section for AMS 6

http://www.indigorose.com/webhelp/ams60/How_do_I/Run_Adobe_Acrobat_Reader_directly_from_the_CD-ROM.htm

I've tried this once with acrobat 5, end worked perfectly

plutopluto
04-22-2006, 06:50 PM
Thanks johnraus, I want something like this. But apz that can open many pdf files not single file. The link gives example of single file.

Wonderboy
04-22-2006, 07:29 PM
This will load 3 PDFs on same action , if you want more to load at the same time just put more benif each one


path_short = File.GetShortName(_SourceFolder);
File.Run("C:\\Program Files\\Adobe\\Acrobat 7.0\\Reader\\AcroRd32.exe", path_short .. "\\AutoPlay\\Docs\\pdf1.pdf", "", SW_SHOWNORMAL, false);
File.Run("C:\\Program Files\\Adobe\\Acrobat 7.0\\Reader\\AcroRd32.exe", path_short .. "\\AutoPlay\\Docs\\pdf2.pdf", "", SW_SHOWNORMAL, false);
File.Run("C:\\Program Files\\Adobe\\Acrobat 7.0\\Reader\\AcroRd32.exe", path_short .. "\\AutoPlay\\Docs\\pdf3.pdf", "", SW_SHOWNORMAL, false);

for cd
path_short = File.GetShortName(_SourceFolder);
File.Run("Acrobat 7.0\\Reader\\AcroRd32.exe", path_short .. "\\AutoPlay\\Docs\\pdf1.pdf", "", SW_SHOWNORMAL, false);
File.Run("Acrobat 7.0\\Reader\\AcroRd32.exe", path_short .. "\\AutoPlay\\Docs\\pdf2.pdf", "", SW_SHOWNORMAL, false);
File.Run("Acrobat 7.0\\Reader\\AcroRd32.exe", path_short .. "\\AutoPlay\\Docs\\pdf3.pdf", "", SW_SHOWNORMAL, false);

plutopluto
04-22-2006, 07:52 PM
That is possible but my files are close to 6,000 files so it is going to take time and space to list them all. That is the more reason why the use of listbox or combobox is neccessary but i do not know how to go about it.

Jason Pate
04-24-2006, 10:48 AM
I am emailing your project file back to you, take a look let me know.

plutopluto
04-30-2006, 12:59 AM
After many weeks of posting, I keep roaming arround finding how to read 6,0000 pdf files using foxit reader on cd, and no solution yet.

Could anybody please find me solution, (Remember using foxit reader directly on cd not on system).

Thank you.

Jason Pate
05-01-2006, 09:50 AM
Why worry about reader on CD? AKA whats stopping you from just making Adobe a requirment?

plutopluto
05-01-2006, 06:42 PM
Thanks Jason Pate, i am deeply worried about reader on cd because I need to protect my pdf files from ripping, and only acrobat reader 4.x does not has 'save' or 'save as' features.

I have been looking for any other third party application that can encrypt my files in order to disable the 'save as' in order to make adobe a requirement but found none. I now decided to use acrobat 4 on cd and make further cd copy protection and encryption to prevent duplication of my cd. I have been looking for third party application besides acrobat that can disable the 'save as' from the pdf files but those I found can only disable 'save' function not 'save as' function.

That is why I want my problem solved.

Jason Pate
05-01-2006, 08:01 PM
I take it you want to Protect the content of these files, so a user cant pass the file around to friends ect. Are you creating these files??? Do they have graphics as well as TXT files. Crazy idea here but, you could forget about PDF, and simply disply them in AM6 via a paragraph object or HTML object. Have to have the files inside of the AM6 EXE anyways. Because they could just copy the pdf files, no need for save as. In adobe you can restrick some actions, but dont think you can prevent them from actually copying the files pdf files, and opening as vew only.

If you used web object in AM5/6 you can display them inside your project and you have more control, might be able to copy txt out of HTML object maybe, i just did some testing you can have it Visible but not Enabled, cant click on anything VIEW only ;)

plutopluto
05-01-2006, 09:52 PM
This is a great idea Jason Pate, let me have the sample in apz if it could work for me. You always been there for me, thanks a lot.

Wonderboy
05-02-2006, 12:57 AM
If you were to use the standalone executable option, you could simply disable the users abillity to be able to copy files from the temp folder, by using the Clipboard plugin and then putting this on Preload Page.StartTimer(500);
and this on Timer Clipboard.CopyText(""); that will prevent the user from being able to copy and paste anything while your application is running, this is one way out of a couple of ways to protect your files,
you could use this with cd option aswell , it will just be a little more complicated,

Jason Pate
05-02-2006, 09:23 AM
Wonderboy,

Thats just evil LOL, tricky, I would be so p**** if I knew someone did that to me LOL, cause that kills copy past system wide not just inside the application LOL.


plutopluto,

I would love to build an example, but I am way to busy at work right now dont even have time to do this posting but what you have to do is get some of your documents into HTML, and then just load them using the web object. Have to play and see if you can make this fit your need.

osamazaied
06-07-2006, 02:12 PM
Hi
I have pdf files in may project, the user may be have'nt any programe to play thes pdf
I want a code which 1-check first the existence of the playing programe
2- if the user have not the programe , the project confirm to insall the required programe which i will put it in my project i.e adobe Acrobat
thk in advance