[cw-discuss] Executing Native Acrobat Reader from CX Windows
Program Passing a Pathname To It. - SOLVED
Frank S. Bernhardt
frank at bcsi.ca
Wed Apr 11 12:36:38 CDT 2007
Frank S. Bernhardt wrote:
> Greetings everyone.
>
> I'm doing a pilot project a customer's site to replace a user's
> windows pc with Linux (isn't this how it always begins?).
>
> She's currently running OpenOffice 1.1.4 for word processing, Mozilla
> Mail for email, Adobe Reader for pdf viewing and MultiView 2000 to
> connect to their Unix server via telnet to run back office applications.
>
> This seemed like a no brainer; new pc, install OpenSuSE 10.2,
> OpenOffice 2, Thunderbird, Adobe Acrobat Reader 7.0.8 native and
> konsole with vt420 emulation to connect to the server. Simple. And it
> works. Sort of.
>
> Here's the problem.
>
> One of the applications she uses on the Unix server allows her to look
> up customer invoices; when were they sent, have they been paid, etc.
> The invoices are stored on the server in PDF format so the application
> shows a link to the pdf document that, under MultiView 2000, is
> click-able and starts up Acrobat Reader passing the link to it. The
> user can then view the invoice, print it or email it using her regular
> email MUA. The command that is run looks something like:
>
> file:///AcroRd32.exe I:CUSTOMER#/123456.pdf
>
> Of course the pdf's are on the server and I mount the SAMBA shared
> invoices directory on the windows box as the I: drive.
>
> So, the first problem is that konsole does not have the facility to
> define rules to execute a program based on a certain received string,
> passing that string to the program.
>
> This is where crossover comes in. CX runs MultiView 2000 beautifully.
> I can create the rules just like under windows. It even runs Acrobat
> Reader and displays the pdf.
>
> But...
>
> Under a win98 bottle:
>
> a) I could only run Adobe 5.0.5 which does not have email capability
> b) When I print the pdf on the remote Unix server laserjet it prints
> the raw PDF code rather than rendering it properly.
>
> Under a win2000 bottle:
>
> a) I can run Adobe 6 which does have email capability but it wants to
> run the email program that's inside the bottle, not the Linux program
> (Thunderbird).
> b) As in the win98 bottle it to prints the pdf on the remote Unix
> server laserjet in raw PDF code rather than rendering it properly.
>
> So...
>
> I managed to get MultiView 2000 to execute the native Acrobat reader
> by using the following command:
>
> file:///Z:/usr/local/Adobe/Acrobat7.0/bin/acroread.exe 000021.pdf
>
> where acroread.exe is a symbolic link to acroread
>
> And the command works. I can view the pdf, email it using the native
> Thunderbird, and it even prints beautifully.
>
> However, I could only get it to work if the pdf file is in:
>
> /home/frank/.cxoffice/win98/drive_c/Windows/profiles/crossover/My
> Documents
>
> Otherwise the native Acrobat Reader executed can't find the file.
>
> I've tried copying 000021.pdf to "/" using paths such as /00021.pdf,
> Z:/00021.pdf, etc.
>
> Copying to:
>
> /home/frank/.cxoffice/win98/drive_c
>
> doesn't work either.
>
> Basically the reason it worked with just the file name is because that
> is the last place where Acrobat Reader looked and found the file, ie.
> Acrobat Reader is not able to find the file when given the path
> through the windows command line yet when I run the exact same command
> line from the bash shell, it finds the file.
>
> So, is there anything special I need to do when executing a native
> Linux program from a crossover windows program in order to pass a
> pathname to the program?
>
I was going about this the wrong way.
Under windows, I was telling the program to run file:///AcroRd32.exe
"pathname-to-pdf"
I was trying to do the same thing under CX using the native Linux
program but for some reason it could never find a fully qualified
pathname to the pdf, only a simple path name.
I didn't realize that just executing the file would cause the extension
to be recognized and the associated application to be run on the file.
Stupid me...
This is what I ended up doing:
a) Executed:
/opt/cxoffice/bin/cxwinassoc --extension pdf \
/usr/local/Adobe/Acrobat7.0/bin/bin/acroread
(I had installed CX as root).
b) I mounted the Unix SAMBA share under the root as /invoices.
c) Changed the application's action on the recognized string to:
file:///Z://invoices//<P2>//<P4>
which expands to:
file:///Z://invoices//BLUESUxxxxxx//000021.pdf
Thanks to Steven Edwards at Codeweavers for setting me on the straight
and narrow. The answer was in faq:
http://www.codeweavers.com/support/docs/crossover-pro/troubleshooting#CXWINASSOC
which I had previously read but didn't clue in at the time that typing
in the pdf file name would cause an associated app to be executed.
Of course I already knew that but was so stuck in a singular mindset
that I didn't SEE it.
Happy CX'ing and Cheers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: frank.vcf
Type: text/x-vcard
Size: 266 bytes
Desc: not available
Url : http://crossover.codeweavers.com/pipermail/discuss/attachments/20070411/77335c19/frank.vcf
More information about the discuss
mailing list